Move netgraph node type man pages from section 8 to section 4.

This commit is contained in:
archie 2000-05-04 17:54:37 +00:00
parent e306b417ff
commit 44be3a44bd
78 changed files with 241 additions and 3438 deletions

View File

@ -1077,25 +1077,28 @@ and
.Sh SEE ALSO
.Xr socket 2 ,
.Xr netgraph 3 ,
.Xr ng_async 4 ,
.Xr ng_bpf 4 ,
.Xr ng_cisco 4 ,
.Xr ng_ether 4 ,
.Xr ng_echo 4 ,
.Xr ng_frame_relay 4 ,
.Xr ng_hole 4 ,
.Xr ng_iface 4 ,
.Xr ng_ksocket 4 ,
.Xr ng_lmi 4 ,
.Xr ng_mppc 4 ,
.Xr ng_ppp 4 ,
.Xr ng_pppoe 4 ,
.Xr ng_rfc1490 4 ,
.Xr ng_socket 4 ,
.Xr ng_tee 4 ,
.Xr ng_tty 4 ,
.Xr ng_UI 4 ,
.Xr ng_vjc 4 ,
.Xr ng_{type} 4 ,
.Xr ngctl 8 ,
.Xr nghook 8 ,
.Xr ng_async 8 ,
.Xr ng_cisco 8 ,
.Xr ng_echo 8 ,
.Xr ng_frame_relay 8 ,
.Xr ng_hole 8 ,
.Xr ng_iface 8 ,
.Xr ng_ksocket 8 ,
.Xr ng_lmi 8 ,
.Xr ng_ppp 8 ,
.Xr ng_pppoe 8 ,
.Xr ng_rfc1490 8 ,
.Xr ng_socket 8 ,
.Xr ng_tee 8 ,
.Xr ng_tty 8 ,
.Xr ng_UI 8 ,
.Xr ng_vjc 8 ,
.Xr ng_{type} 8 .
.Xr nghook 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_UI.8,v 1.4 1999/01/25 02:37:56 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_UI 8
.Dt NG_UI 4
.Os FreeBSD
.Sh NAME
.Nm ng_UI
@ -81,7 +81,7 @@ This node shuts down upon receipt of a
control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ngctl 8 .
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_async.8,v 1.6 1999/01/25 23:46:25 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_ASYNC 8
.Dt NG_ASYNC 4
.Os FreeBSD
.Sh NAME
.Nm ng_async
@ -90,14 +90,14 @@ This node type supports the following hooks:
.It Dv async
Asynchronous connection.
Typically this hook would be connected to a
.Xr ng_tty 8
.Xr ng_tty 4
node, which handles transmission of serial data over a tty device.
.It Dv sync
Synchronous connection. This hook sends and receives synchronous frames.
For PPP, these frames should contain address, control, and protocol fields,
but no checksum field.
Typically this hook would be connected to an individual link hook of a
.Xr ng_ppp 8
.Xr ng_ppp 4
type node.
.El
.Sh CONTROL MESSAGES
@ -147,9 +147,9 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_tty 8 ,
.Xr ngctl 8 .
.Xr ng_ppp 4 ,
.Xr ng_tty 4 ,
.Xr ngctl 8
.Rs
.%A W. Simpson
.%T "PPP in HDLC-link Framing"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_bpf.8,v 1.2 1999/12/03 01:57:12 archie Exp $
.\"
.Dd December 2, 1999
.Dt NG_BPF 8
.Dt NG_BPF 4
.Os FreeBSD
.Sh NAME
.Nm ng_bpf
@ -149,6 +149,6 @@ node type was implemented in
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr bpf 4 ,
.Xr ngctl 8 .
.Xr ngctl 8
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_cisco.8,v 1.5 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_CISCO 8
.Dt NG_CISCO 4
.Os FreeBSD
.Sh NAME
.Nm ng_cisco
@ -68,7 +68,7 @@ and
hooks, which transmit and receive raw IP, AppleTalk, and IPX packets,
respectively. Typically these hooks would connect to the corresponding
hooks on an
.Xr ng_iface 8
.Xr ng_iface 4
type node.
.Sh IP Configuration
In order to function properly for IP traffic, the node must be informed
@ -96,9 +96,9 @@ If the
hook is connected to the
.Dv inet
hook of an
.Xr ng_iface 8
.Xr ng_iface 4
node, as is usually the case, then configuration is automatic as the
.Xr ng_iface 8
.Xr ng_iface 4
understands the
.Dv NGM_CISCO_GET_IPADDR
message.
@ -151,8 +151,8 @@ the node does not support querying the remote end for its IP address
and netmask.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Xr ng_iface 4 ,
.Xr ngctl 8
.Rs
.%A D. Perkins
.%T "Requirements for an Internet Standard Point-to-Point Protocol"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_ECHO 8
.Dt NG_ECHO 4
.Os FreeBSD
.Sh NAME
.Nm ng_echo
@ -62,8 +62,8 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_hole 8 ,
.Xr ngctl 8 .
.Xr ng_hole 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_frame_relay.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_FRAME_RELAY 8
.Dt NG_FRAME_RELAY 4
.Os FreeBSD
.Sh NAME
.Nm ng_frame_relay
@ -49,7 +49,7 @@ The
node type performs encapsulation, de-encapsulation, and multiplexing
of packets using the frame relay protocol. It supports up to 1024 DLCI's.
The LMI protocol is handled by a separate node type (see
.Xr ng_lmi 8 ).
.Xr ng_lmi 4 ).
.Pp
The
.Dv downstream
@ -87,8 +87,8 @@ on a DLCI hook to
Instead, it should query the LMI node first.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_lmi 8 ,
.Xr ngctl 8 .
.Xr ng_lmi 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_hole.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_HOLE 8
.Dt NG_HOLE 4
.Os FreeBSD
.Sh NAME
.Nm ng_hole
@ -62,8 +62,8 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_echo 8 ,
.Xr ngctl 8 .
.Xr ng_echo 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_IFACE 8
.Dt NG_IFACE 4
.Os FreeBSD
.Sh NAME
.Nm ng_iface
@ -118,9 +118,9 @@ Set the interface to broadcast mode.
The interface must not currently be up.
.It Dv NGM_CISCO_GET_IPADDR
This message is defined by the
.Xr ng_cisco 8
.Xr ng_cisco 4
node type; see
.Xr ng_cisco 8
.Xr ng_cisco 4
for a description.
.El
.Sh SHUTDOWN
@ -141,8 +141,8 @@ control message is required.
.Sh SEE ALSO
.Xr bpf 4 ,
.Xr netgraph 4 ,
.Xr ng_cisco 4 ,
.Xr ifconfig 8 ,
.Xr ng_cisco 8 ,
.Xr ngctl 8
.Sh HISTORY
The

View File

@ -35,7 +35,7 @@
.\" $FreeBSD$
.\"
.Dd November 15, 1999
.Dt NG_KSOCKET 8
.Dt NG_KSOCKET 4
.Os FreeBSD
.Sh NAME
.Nm ng_ksocket
@ -51,7 +51,7 @@ node type allows one to open a socket inside the kernel and have
it appear as a Netgraph node. The
.Nm
node type is the reverse of the socket node type (see
.Xr ng_socket 8 ) :
.Xr ng_socket 4 ) :
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
@ -176,8 +176,8 @@ Shutdown of the node closes the associated socket.
.Sh SEE ALSO
.Xr socket 2 ,
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ngctl 8 .
.Xr ng_socket 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_lmi.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_LMI 8
.Dt NG_LMI 4
.Os FreeBSD
.Sh NAME
.Nm ng_lmi
@ -56,7 +56,7 @@ To enable a specific LMI type, connect the corresponding hook (
or
.Dv group4 ")"
to DLCI 0 or 1023 of a
.Xr ng_frame_relay 8
.Xr ng_frame_relay 4
node.
Typically, Annex A and Annex D live on DLCI 0 while Group-of-four
lives on DLCI 1023.
@ -118,8 +118,8 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_frame_relay 8 ,
.Xr ngctl 8 .
.Xr ng_frame_relay 4 ,
.Xr ngctl 8
.Rs
.%T "ANSI T1.617-1991 Annex D"
.Re

View File

@ -36,7 +36,7 @@
.\" $FreeBSD$
.\"
.Dd December 8, 1999
.Dt NG_MPPC 8
.Dt NG_MPPC 4
.Os FreeBSD
.Sh NAME
.Nm ng_mppc
@ -58,7 +58,7 @@ for compression and
.Dv "decomp"
for decompression.
Typically one or both of these hooks would be connected to the
.Xr ng_ppp 8
.Xr ng_ppp 4
node type hook of the same name.
Each direction of traffic flow is independent of the other.
.Sh HOOKS
@ -67,14 +67,14 @@ This node type supports the following hooks:
.Bl -tag -compact -width vjc_vjuncomp
.It Dv comp
Connection to
.Xr ng_ppp 8
.Xr ng_ppp 4
.Dv "comp"
hook.
Incoming frames are compressed and/or encrypted, and sent
back out the same hook.
.It Dv decomp
Connection to
.Xr ng_ppp 8
.Xr ng_ppp 4
.Dv "decomp"
hook.
Incoming frames are decompressed and/or decrypted, and sent
@ -165,7 +165,7 @@ However, Microsoft combined both compression and encryption into their
``compression'' algorithm, which is confusing.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_ppp 4 ,
.Xr ngctl 8
.Rs
.%A G. Pall

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_PPP 8
.Dt NG_PPP 4
.Os FreeBSD
.Sh NAME
.Nm ng_ppp
@ -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 4
type node.
.Sh ENABLING FUNCTIONALITY
In general, the PPP node enables a specific link or functionality when
@ -152,11 +152,11 @@ and
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
.Xr ng_vjc 4
node. The PPP node is compatible with the
.Dq pass through
modes of the
.Xr ng_vjc 8
.Xr ng_vjc 4
node type.
.Sh BYPASS HOOK
When a frame is received on a link with an unsupported protocol,
@ -249,22 +249,22 @@ Connection to encryption engine
Connection to decryption engine
.It Dv vjc_ip
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv ip
hook
.It Dv vjc_vjcomp
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv vjcomp
hook
.It Dv vjc_vjuncomp
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv vjuncomp
hook
.It Dv vjc_vjip
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv vjip
hook
.It Dv inet
@ -342,15 +342,15 @@ but also atomically clears the statistics as well.
.El
.Pp
This node type also accepts the control messages accepted by the
.Xr ng_vjc 8
.Xr ng_vjc 4
node type. When received, these messages are simply forwarded to
the adjacent
.Xr ng_vjc 8
.Xr ng_vjc 4
node, if any. This is particularly useful when the individual
PPP links are able to generate
.Dv NGM_VJC_RECV_ERROR
messages (see
.Xr ng_vjc 8
.Xr ng_vjc 4
for a description).
.Sh SHUTDOWN
This node shuts down upon receipt of a
@ -358,11 +358,12 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_async 8 ,
.Xr ng_iface 8 ,
.Xr ng_vjc 8 ,
.Xr ng_pppoe 8 ,
.Xr ngctl 8 .
.Xr ng_async 4 ,
.Xr ng_iface 4 ,
.Xr ng_mppc 4 ,
.Xr ng_pppoe 4 ,
.Xr ng_vjc 4 ,
.Xr ngctl 8
.Rs
.%A W. Simpson
.%T "The Point-to-Point Protocol (PPP)"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
.\"
.Dd October 28, 1999
.Dt NG_PPPOE 8
.Dt NG_PPPOE 4
.Os FreeBSD
.Sh NAME
.Nm ng_pppoe
@ -382,9 +382,9 @@ setup(char *ethername, char *service, char *sessname,
.Sh SEE ALSO
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ng_ppp 8 ,
.Xr ngctl 8 .
.Xr ng_socket 4 ,
.Xr ng_ppp 4 ,
.Xr ngctl 8
.Rs
.%A L. Mamakos
.%A K. Lidl

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_pptpgre.8,v 1.2 1999/12/08 00:20:53 archie Exp $
.\"
.Dd November 29, 1999
.Dt NG_PPTPGRE 8
.Dt NG_PPTPGRE 4
.Os FreeBSD
.Sh NAME
.Nm ng_pptpgre
@ -55,13 +55,13 @@ the TCP control protocol or call negotiation defined by PPTP.
The typical use for this node type would be to connect the
.Dv upper
hook to one of the link hooks of a
.Xr ng_ppp 8
.Xr ng_ppp 4
node, and the
.Dv lower
hook to the
.Dv "inet/raw/gre"
hook of a
.Xr ng_ksocket 8
.Xr ng_ksocket 4
node.
.Sh HOOKS
This node type supports the following hooks:
@ -111,9 +111,9 @@ This node shuts down upon receipt of a
control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ng_ppp 8 ,
.Xr ngctl 8 .
.Xr ng_ksocket 4 ,
.Xr ng_ppp 4 ,
.Xr ngctl 8
.Rs
.%A K. Hamzeh
.%A G. Pall

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_rfc1490.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_RFC1490 8
.Dt NG_RFC1490 4
.Os FreeBSD
.Sh NAME
.Nm ng_rfc1490
@ -69,7 +69,7 @@ Typically the
hook is connected to the
.Dv inet
hook of an
.Xr ng_iface 8
.Xr ng_iface 4
node.
.Sh HOOKS
This node type supports the following hooks:
@ -92,9 +92,9 @@ control message, or when all hooks have been disconnected.
Not all of RFC 1490 is implemented.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_frame_relay 8 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Xr ng_frame_relay 4 ,
.Xr ng_iface 4 ,
.Xr ngctl 8
.Rs
.%A C. Brown, A. Malis
.%T "Multiprotocol Interconnect over Frame Relay"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_socket.8,v 1.5 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_SOCKET 8
.Dt NG_SOCKET 4
.Os FreeBSD
.Sh NAME
.Nm ng_socket
@ -167,8 +167,8 @@ socket).
.Xr socket 2 ,
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ngctl 8 .
.Xr ng_ksocket 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_tee.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_TEE 8
.Dt NG_TEE 4
.Os FreeBSD
.Sh NAME
.Nm ng_tee
@ -114,7 +114,7 @@ control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr tee 1 ,
.Xr netgraph 4 ,
.Xr ngctl 8 .
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_tty.8,v 1.5 1999/01/25 23:46:28 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_TTY 8
.Dt NG_TTY 4
.Os FreeBSD
.Sh NAME
.Nm ng_tty
@ -74,7 +74,7 @@ but introduces potentially infinite latency.
The default hot character is 0x7e, consistent with
.Dv hook
being connected to a
.Xr ng_async 8
.Xr ng_async 4
type node. The hot character has no effect on the transmission of data.
.Pp
The node will attempt to give itself the same netgraph name as the name
@ -128,8 +128,8 @@ serial driver, and sub-optimal performance may result.
.Xr ioctl 2 ,
.Xr netgraph 4 ,
.Xr tty 4 ,
.Xr ng_async 8 ,
.Xr ngctl 8 .
.Xr ng_async 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_vjc.8,v 1.4 1999/01/25 23:46:28 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_VJC 8
.Dt NG_VJC 4
.Os FreeBSD
.Sh NAME
.Nm ng_vjc
@ -78,7 +78,7 @@ Other non-TCP IP packets are forwarded unchanged to
.Dv vjip .
.Pp
When connecting to a
.Xr ng_ppp 8
.Xr ng_ppp 4
node, the
.Dv ip ,
.Dv vjuncomp ,
@ -86,7 +86,7 @@ node, the
and
.Dv vjip
hooks should be connected to the
.Xr ng_ppp 8
.Xr ng_ppp 4
node's
.Dv vjc_ip ,
.Dv vjc_vjcomp ,
@ -201,9 +201,9 @@ copies of the file do not interfere.
However, this may change in the future.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Xr ng_ppp 4 ,
.Xr ng_iface 4 ,
.Xr ngctl 8
.Rs
.%A V. Jacobsen
.%T "Compressing TCP/IP Headers"

View File

@ -3,6 +3,6 @@
KMOD= ng_UI
SRCS= ng_UI.c
MAN8= ng_UI.8
MAN4= ng_UI.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_UI.8,v 1.4 1999/01/25 02:37:56 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_UI 8
.Dt NG_UI 4
.Os FreeBSD
.Sh NAME
.Nm ng_UI
@ -81,7 +81,7 @@ This node shuts down upon receipt of a
control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ngctl 8 .
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,91 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_UI.8,v 1.4 1999/01/25 02:37:56 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_UI 8
.Os FreeBSD
.Sh NAME
.Nm ng_UI
.Nd UI netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_UI.h>
.Sh DESCRIPTION
The
.Nm UI
node type has two hooks,
.Dv upstream
and
.Dv downstream .
Packets received on
.Dv downstream
must have 0x03 (indicating unnumbered information) as their first byte;
if not the packet is dropped. This byte is then stripped and the
remainder of the packet sent out on
.Dv upstream .
.Pp
Conversely, packets received on
.Dv upstream
will have a 0x03 byte prepended to them before being forwarded out on the
.Dv downstream
hook.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobar
.It Dv downstream
Downstream connection. Packets on this side of the node have a 0x03 as
their first byte.
.It Dv upstream
Upstream connection. Packets on this side of the node have the
initial 0x03 byte stripped off.
.El
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_async
SRCS= ng_async.c
MAN8= ng_async.8
MAN4= ng_async.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_async.8,v 1.6 1999/01/25 23:46:25 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_ASYNC 8
.Dt NG_ASYNC 4
.Os FreeBSD
.Sh NAME
.Nm ng_async
@ -90,14 +90,14 @@ This node type supports the following hooks:
.It Dv async
Asynchronous connection.
Typically this hook would be connected to a
.Xr ng_tty 8
.Xr ng_tty 4
node, which handles transmission of serial data over a tty device.
.It Dv sync
Synchronous connection. This hook sends and receives synchronous frames.
For PPP, these frames should contain address, control, and protocol fields,
but no checksum field.
Typically this hook would be connected to an individual link hook of a
.Xr ng_ppp 8
.Xr ng_ppp 4
type node.
.El
.Sh CONTROL MESSAGES
@ -147,9 +147,9 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_tty 8 ,
.Xr ngctl 8 .
.Xr ng_ppp 4 ,
.Xr ng_tty 4 ,
.Xr ngctl 8
.Rs
.%A W. Simpson
.%T "PPP in HDLC-link Framing"

View File

@ -1,169 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_async.8,v 1.6 1999/01/25 23:46:25 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_ASYNC 8
.Os FreeBSD
.Sh NAME
.Nm ng_async
.Nd asynchronous framing netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_async.h>
.Sh DESCRIPTION
The
.Nm async
node type performs conversion between synchronous frames and
asynchronous frames, as defined for the PPP protocol in RFC 1662.
Asynchronous framing uses flag bytes and octet-stuffing
to simulate a frame oriented connection over an octet-oriented
asynchronous serial line.
.Pp
The node transmits and receives asynchronous data on the
.Dv async
hook. Mbuf boundaries of incoming data are ignored.
Once a complete packet has been received, it is decoded and
stripped of all framing bytes, and transmitted out the
.Dv sync
hook as a single frame.
.Pp
Synchronous frames are transmitted and received on the
.Dv sync
hook.
Packets received on this hook are encoded as asynchronous frames
and sent out on
.Dv async .
Received packets should start with the address and control fields,
or the PPP protocol field if address and control field compression
is employed, and contain no checksum field. If the first four bytes are
.Dv "0xff 0x03 0xc0 0x21"
(an LCP protocol frame) then complete control character escaping
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
.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.
Flag sharing between frames is disabled after one second of transmit
idle time.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobar
.It Dv async
Asynchronous connection.
Typically this hook would be connected to a
.Xr ng_tty 8
node, which handles transmission of serial data over a tty device.
.It Dv sync
Synchronous connection. This hook sends and receives synchronous frames.
For PPP, these frames should contain address, control, and protocol fields,
but no checksum field.
Typically this hook would be connected to an individual link hook of a
.Xr ng_ppp 8
type node.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_ASYNC_CMD_GET_STATS
This command returns a
.Dv "struct ng_async_stat"
containing node statistics for packet, octet, and error counts.
.It Dv NGM_ASYNC_CMD_CLR_STATS
Clears the node statistics.
.It Dv NGM_ASYNC_CMD_SET_CONFIG
Sets the node configuration, which is described by a
.Dv "struct ng_async_cfg" :
.Bd -literal -offset 4n
struct ng_async_cfg {
u_char enabled; /* Turn encoding on/off */
u_int16_t amru; /* Max receive async frame len */
u_int16_t smru; /* Max receive sync frame len */
u_int32_t accm; /* ACCM encoding */
};
.Ed
.Pp
The
.Dv enabled
field enables or disables all encoding/decoding functions (default disabled).
When disabled, the node operates in simple
.Dq pass through
mode.
The
.Dv amru
and
.Dv smru
fields are the asynchronous and synchronous MRU (maximum receive unit) values,
respectively. These both default to 1600; note that the async MRU
applies to the incoming frame length after asynchronous decoding.
The
.Dv accm
field is the asynchronous character control map, which controls the escaping
of characters 0x00 thorough 0x1f (default 0xffffffff).
.It Dv NGM_ASYNC_CMD_GET_CONFIG
This command returns the current configuration structure.
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_tty 8 ,
.Xr ngctl 8 .
.Rs
.%A W. Simpson
.%T "PPP in HDLC-link Framing"
.%O RFC 1662
.Re
.Rs
.%A W. Simpson
.%T "The Point-to-Point Protocol (PPP)"
.%O RFC 1661
.Re
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -3,7 +3,7 @@
KMOD= ng_bpf
SRCS= ng_bpf.c bpf_filter.c
MAN8= ng_bpf.8
MAN4= ng_bpf.4
.PATH: ${.CURDIR}/../../../net

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_bpf.8,v 1.2 1999/12/03 01:57:12 archie Exp $
.\"
.Dd December 2, 1999
.Dt NG_BPF 8
.Dt NG_BPF 4
.Os FreeBSD
.Sh NAME
.Nm ng_bpf
@ -149,6 +149,6 @@ node type was implemented in
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr bpf 4 ,
.Xr ngctl 8 .
.Xr ngctl 8
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -1,154 +0,0 @@
.\" Copyright (c) 1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_bpf.8,v 1.2 1999/12/03 01:57:12 archie Exp $
.\"
.Dd December 2, 1999
.Dt NG_BPF 8
.Os FreeBSD
.Sh NAME
.Nm ng_bpf
.Nd Berkeley packet filter netgraph node type
.Sh SYNOPSIS
.Fd #include <net/bpf.h>
.Fd #include <netgraph/ng_bpf.h>
.Sh DESCRIPTION
The
.Nm bpf
node type allows Berkeley Packet Filter (see
.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 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 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
entire packet is delivered out the non-match destination hook.
Returning a value greater than zero causes the packet to be truncated
to that length and delivered out the match destination hook.
Either or both destination hooks may be the empty string, or may
not exist, in which case the packet is dropped.
.Pp
New hooks are initially configured to drop all packets.
A new filter may be installed using the
.Dv NGM_BPF_SET_FILTER
control message.
.Sh HOOKS
This node type supports any number of hooks having arbitrary names.
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_BPF_SET_FILTER
This command sets the filter program that will be applied to incoming
data on a hook. The following structure must be supplied as an argument:
.Bd -literal -offset 4n
struct ngm_bpf_hookprog {
char thisHook[NG_HOOKLEN+1]; /* name of hook */
char ifMatch[NG_HOOKLEN+1]; /* match dest hook */
char ifNotMatch[NG_HOOKLEN+1]; /* !match dest hook */
int32_t bpf_prog_len; /* #isns in program */
struct bpf_insn bpf_prog[0]; /* bpf program */
};
.Ed
.Pp
The hook to be updated is specified in
.Dv thisHook .
The BPF program is the sequence of instructions in the
.Dv bpf_prog
array; there must be
.Dv bpf_prog_len
of them.
Matching and non-matching incoming packets are delivered out the hooks named
.Dv ifMatch
and
.Dv ifNotMatch ,
respectively. The program must be a valid
.Xr bpf 4
program or else
.Er EINVAL
is returned.
.It Dv NGM_BPF_GET_FILTER
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
.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
.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
.Dv NGM_BPF_GET_STATS ,
except that the statistics are also atomically cleared.
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh BUGS
When built as a loadable kernel module, this module includes the file
.Pa net/bpf_filter.c .
Although loading the module should fail if
.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 AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -3,7 +3,7 @@
KMOD= ng_cisco
SRCS= ng_cisco.c opt_inet.h opt_atalk.h opt_ipx.h
MAN8= ng_cisco.8
MAN4= ng_cisco.4
IFACE_INET?= 1 # 0/1 - requires INET configured in kernel
IFACE_NETATALK?= 0 # 0/1 - requires NETATALK configured in kernel

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_cisco.8,v 1.5 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_CISCO 8
.Dt NG_CISCO 4
.Os FreeBSD
.Sh NAME
.Nm ng_cisco
@ -68,7 +68,7 @@ and
hooks, which transmit and receive raw IP, AppleTalk, and IPX packets,
respectively. Typically these hooks would connect to the corresponding
hooks on an
.Xr ng_iface 8
.Xr ng_iface 4
type node.
.Sh IP Configuration
In order to function properly for IP traffic, the node must be informed
@ -96,9 +96,9 @@ If the
hook is connected to the
.Dv inet
hook of an
.Xr ng_iface 8
.Xr ng_iface 4
node, as is usually the case, then configuration is automatic as the
.Xr ng_iface 8
.Xr ng_iface 4
understands the
.Dv NGM_CISCO_GET_IPADDR
message.
@ -151,8 +151,8 @@ the node does not support querying the remote end for its IP address
and netmask.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Xr ng_iface 4 ,
.Xr ngctl 8
.Rs
.%A D. Perkins
.%T "Requirements for an Internet Standard Point-to-Point Protocol"

View File

@ -1,171 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_cisco.8,v 1.5 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_CISCO 8
.Os FreeBSD
.Sh NAME
.Nm ng_cisco
.Nd Cisco HDLC protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <netinet/in.h>
.Fd #include <netgraph/ng_cisco.h>
.Sh DESCRIPTION
The
.Nm cisco
node type performs encapsulation and de-encapsulation of packets
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
.Dq keep alive
and an
.Dq inquire
capability.
.Pp
The
.Dv downstream
hook should connect to the synchronous line. On the other side
of the node are the
.Dv inet ,
.Dv atalk ,
and
.Dv ipx
hooks, which transmit and receive raw IP, AppleTalk, and IPX packets,
respectively. Typically these hooks would connect to the corresponding
hooks on an
.Xr ng_iface 8
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
.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
.Dv NGM_CISCO_GET_IPADDR
control message to the peer node connected to the
.Dv inet
hook (if any).
If the peer responds, then that response is used. This is the automatic method.
.Pp
If the peer does not respond, the node falls back on its cached value
for the IP address and netmask. This cached value can be set at any time
with a
.Dv NGM_CISCO_SET_IPADDR
message, and this is the manual method.
.Pp
If the
.Dv inet
hook is connected to the
.Dv inet
hook of an
.Xr ng_iface 8
node, as is usually the case, then configuration is automatic as the
.Xr ng_iface 8
understands the
.Dv NGM_CISCO_GET_IPADDR
message.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobarbazio
.It Dv downstream
The connection to the synchronous line.
.It Dv inet
IP hook.
.It Dv atalk
AppleTalk hook.
.It Dv ipx
IPX hook
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_CISCO_SET_IPADDR
This command takes an array of two
.Dv "struct in_addr"
arguments. The first is the IP address of the corresponding interface
and the second is the netmask.
.It Dv NGM_CISCO_GET_IPADDR
This command returns the IP configuration in the same format used by
.Dv NGM_CISCO_SET_IPADDR .
This command is also
.Em sent
by this node type to the
.Dv inet
peer whenever an IP address inquiry packet is received.
.It Dv NGM_CISCO_GET_STATUS
Returns a
.Dv "struct ngciscostat" :
.Bd -literal -offset 4n
struct ngciscostat {
u_int32_t seq_retries; /* # unack'd retries */
u_int32_t keepalive_period; /* in seconds */
};
.Ed
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh BUGS
Not all of the functionality has been implemented. For example,
the node does not support querying the remote end for its IP address
and netmask.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Rs
.%A D. Perkins
.%T "Requirements for an Internet Standard Point-to-Point Protocol"
.%O RFC 1547
.Re
.Sh LEGAL
.Tn Cisco
is a trademark of Cisco Systems, Inc.
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com ,
.An Archie Cobbs Aq archie@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_echo
SRCS= ng_echo.c
MAN8= ng_echo.8
MAN4= ng_echo.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_ECHO 8
.Dt NG_ECHO 4
.Os FreeBSD
.Sh NAME
.Nm ng_echo
@ -62,8 +62,8 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_hole 8 ,
.Xr ngctl 8 .
.Xr ng_hole 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,73 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_ECHO 8
.Os FreeBSD
.Sh NAME
.Nm ng_echo
.Nd netgraph echo node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_echo.h>
.Sh DESCRIPTION
The
.Nm echo
node type reflects all data and control messages back to the sender.
This node type is used for testing and debugging.
.Sh HOOKS
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.
Any other control messages are reflected back to the sender.
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_hole 8 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_frame_relay
SRCS= ng_frame_relay.c
MAN8= ng_frame_relay.8
MAN4= ng_frame_relay.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_frame_relay.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_FRAME_RELAY 8
.Dt NG_FRAME_RELAY 4
.Os FreeBSD
.Sh NAME
.Nm ng_frame_relay
@ -49,7 +49,7 @@ The
node type performs encapsulation, de-encapsulation, and multiplexing
of packets using the frame relay protocol. It supports up to 1024 DLCI's.
The LMI protocol is handled by a separate node type (see
.Xr ng_lmi 8 ).
.Xr ng_lmi 4 ).
.Pp
The
.Dv downstream
@ -87,8 +87,8 @@ on a DLCI hook to
Instead, it should query the LMI node first.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_lmi 8 ,
.Xr ngctl 8 .
.Xr ng_lmi 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,98 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_frame_relay.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_FRAME_RELAY 8
.Os FreeBSD
.Sh NAME
.Nm ng_frame_relay
.Nd frame relay netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_frame_relay.h>
.Sh DESCRIPTION
The
.Nm frame_relay
node type performs encapsulation, de-encapsulation, and multiplexing
of packets using the frame relay protocol. It supports up to 1024 DLCI's.
The LMI protocol is handled by a separate node type (see
.Xr ng_lmi 8 ).
.Pp
The
.Dv downstream
hook should be connected to the synchronous line, i.e., the switch.
Then hooks
.Dv dlci0 ,
.Dv dlci1 ,
through
.Dv dlci1023
are available to connect to each of the DLCI channels.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobar
.It Dv downstream
The connection to the synchronous line.
.It Dv dlciX
Here X is a decimal number from 0 to 1023. This hook corresponds
to the DLCI X frame relay virtual channel.
.El
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh BUGS
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
node type ignores this restriction, and will always pass data received
on a DLCI hook to
.Dv downstream .
Instead, it should query the LMI node first.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_lmi 8 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_hole
SRCS= ng_hole.c
MAN8= ng_hole.8
MAN4= ng_hole.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_hole.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_HOLE 8
.Dt NG_HOLE 4
.Os FreeBSD
.Sh NAME
.Nm ng_hole
@ -62,8 +62,8 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_echo 8 ,
.Xr ngctl 8 .
.Xr ng_echo 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,73 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_hole.8,v 1.4 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_HOLE 8
.Os FreeBSD
.Sh NAME
.Nm ng_hole
.Nd netgraph discard node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_hole.h>
.Sh DESCRIPTION
The
.Nm hole
node type silently discards all data and control messages it receives.
This type is used for testing and debugging.
.Sh HOOKS
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.
Other control messages are silently discarded.
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_echo 8 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_iface
SRCS= ng_iface.c
MAN8= ng_iface.8
MAN4= ng_iface.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_IFACE 8
.Dt NG_IFACE 4
.Os FreeBSD
.Sh NAME
.Nm ng_iface
@ -118,9 +118,9 @@ Set the interface to broadcast mode.
The interface must not currently be up.
.It Dv NGM_CISCO_GET_IPADDR
This message is defined by the
.Xr ng_cisco 8
.Xr ng_cisco 4
node type; see
.Xr ng_cisco 8
.Xr ng_cisco 4
for a description.
.El
.Sh SHUTDOWN
@ -141,8 +141,8 @@ control message is required.
.Sh SEE ALSO
.Xr bpf 4 ,
.Xr netgraph 4 ,
.Xr ng_cisco 4 ,
.Xr ifconfig 8 ,
.Xr ng_cisco 8 ,
.Xr ngctl 8
.Sh HISTORY
The

View File

@ -1,153 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_IFACE 8
.Os FreeBSD
.Sh NAME
.Nm ng_iface
.Nd interface netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_iface.h>
.Sh DESCRIPTION
An
.Nm iface
node is both a netgraph node and a system networking interface. When an
.Nm iface
node is created, a new interface appears which is accessible via
.Xr ifconfig 8 .
.Nm Iface
node interfaces are named
.Dv ng0 ,
.Dv ng1 ,
etc.
When a node is shutdown, the corresponding interface is removed
and the interface name becomes available for reuse by future
.Nm iface
nodes; new nodes always take the first unused interface.
The node itself is assigned the same name as its interface, unless the name
already exists, in which case the node remains unnamed.
.Pp
An
.Nm iface
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
packets received into the corresponding protocol stack.
The currently supported protocols are IP, IPv6, AppleTalk, IPX, ATM,
NATM, and NS.
.Pp
An
.Nm iface
node be configured as a point-to-point interface or a broadcast interface.
The configuration can only be changed when the interface is down.
The default mode is point-to-point.
.Pp
.Nm Iface
nodes support the Berkeley Packet Filter (BPF).
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobar
.It Dv inet
Transmission and reception of IP packets.
.It Dv inet6
Transmission and reception of IPv6 packets.
.It Dv atalk
Transmission and reception of AppleTalk packets.
.It Dv ipx
Transmission and reception of IPX packets.
.It Dv atm
Transmission and reception of ATM packets.
.It Dv natm
Transmission and reception of NATM packets.
.It Dv ns
Transmission and reception of NS packets.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_IFACE_GET_IFNAME
Returns the name of the interface corresponding to this node in a
.Dv "struct ng_iface_ifname" :
.Bd -literal -offset 4n
struct ng_iface_ifname {
char ngif_name[NG_IFACE_IFACE_NAME_MAX + 1];
};
.Ed
.It Dv NGM_IFACE_POINT2POINT
Set the interface to point-to-point mode.
The interface must not currently be up.
.It Dv NGM_IFACE_BROADCAST
Set the interface to broadcast mode.
The interface must not currently be up.
.It Dv NGM_CISCO_GET_IPADDR
This message is defined by the
.Xr ng_cisco 8
node type; see
.Xr ng_cisco 8
for a description.
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message. The associated interface is removed and becomes available
for use by future
.Nm iface
nodes.
.Pp
Unlike most other node types, an
.Nm iface
node does
.Em not
go away when all hooks have been disconnected; rather, and explicit
.Dv NGM_SHUTDOWN
control message is required.
.Sh SEE ALSO
.Xr bpf 4 ,
.Xr netgraph 4 ,
.Xr ifconfig 8 ,
.Xr ng_cisco 8 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm iface
node type was implemented in
.Fx 4.0 .
.Sh AUTHOR
.An Archie Cobbs Aq archie@whistle.com

View File

@ -2,6 +2,6 @@
KMOD= ng_ksocket
SRCS= ng_ksocket.c
MAN8= ng_ksocket.8
MAN4= ng_ksocket.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -35,7 +35,7 @@
.\" $FreeBSD$
.\"
.Dd November 15, 1999
.Dt NG_KSOCKET 8
.Dt NG_KSOCKET 4
.Os FreeBSD
.Sh NAME
.Nm ng_ksocket
@ -51,7 +51,7 @@ node type allows one to open a socket inside the kernel and have
it appear as a Netgraph node. The
.Nm
node type is the reverse of the socket node type (see
.Xr ng_socket 8 ) :
.Xr ng_socket 4 ) :
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
@ -176,8 +176,8 @@ Shutdown of the node closes the associated socket.
.Sh SEE ALSO
.Xr socket 2 ,
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ngctl 8 .
.Xr ng_socket 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,187 +0,0 @@
.\" Copyright (c) 1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\"
.Dd November 15, 1999
.Dt NG_KSOCKET 8
.Os FreeBSD
.Sh NAME
.Nm ng_ksocket
.Nd kernel socket netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_ksocket.h>
.Sh DESCRIPTION
A
.Nm ksocket
node is both a netgraph node and a BSD socket. The
.Nm
node type allows one to open a socket inside the kernel and have
it appear as a Netgraph node. The
.Nm
node type is the reverse of the socket node type (see
.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
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
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.
.Sh HOOKS
This node type supports a single hook connection at a time.
The name of the hook must be of the form
.Dv Em <family>/<type>/<proto> ,
where the
.Dv Em family ,
.Dv Em type ,
and
.Dv Em proto
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
.Dv inet/dgram/udp
is a more readable but equivalent version of
.Dv 2/2/17 .
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_KSOCKET_BIND
This functions exactly like the
.Xr bind 2
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
.Dv int )
should be supplied as an argument.
.It Dv NGM_KSOCKET_CONNECT
This functions exactly like the
.Xr connect 2
system call. The
.Dv "struct sockaddr"
destination address parameter should be supplied as an argument.
.It Dv NGM_KSOCKET_ACCEPT
Currently unimplemented.
.It Dv NGM_KSOCKET_GETNAME
Equivalent to the
.Xr getname 2
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
.Dv "struct sockaddr"
in the arguments field of the reply.
.It Dv NGM_KSOCKET_SETOPT
Equivalent to the
.Xr setsockopt 2
system call, except that the option name, level, and value are passed in a
.Dv "struct ng_ksocket_sockopt" .
.It Dv NGM_KSOCKET_GETOPT
Equivalent to the
.Xr getsockopt 2
system call, except that the option is passed in a
.Dv "struct ng_ksocket_sockopt" .
When sending this command, the
.Dv value
field should be empty; upon return, it will contain the
retrieved value.
.El
.Pp
.Sh ASCII FORM CONTROL MESSAGES
For control messages that pass a
.Dv "struct sockaddr"
in the argument field, the normal
.Tn ASCII
equivalent of the C structure
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
.Dv PF_INET ,
the address is an IP address followed by an optional colon and port number.
For
.Dv PF_LOCAL ,
the address is the pathname as a doubly quoted string.
.Pp
Examples:
.Bl -tag -width XXXXXXXXXX
.It Dv PF_LOCAL
local/"/tmp/foo.socket"
.It Dv PF_INET
inet/192.168.1.1:1234
.It Other
.Dv "\&{ family=16 len=16 data=[0x70 0x00 0x01 0x23] \&}"
.El
.Pp
For control messages that pass a
.Dv "struct ng_ksocket_sockopt" ,
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
.Dv NGM_SHUTDOWN
control message, or when the hook is disconnected.
Shutdown of the node closes the associated socket.
.Sh SEE ALSO
.Xr socket 2 ,
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_lmi
SRCS= ng_lmi.c
MAN8= ng_lmi.8
MAN4= ng_lmi.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_lmi.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_LMI 8
.Dt NG_LMI 4
.Os FreeBSD
.Sh NAME
.Nm ng_lmi
@ -56,7 +56,7 @@ To enable a specific LMI type, connect the corresponding hook (
or
.Dv group4 ")"
to DLCI 0 or 1023 of a
.Xr ng_frame_relay 8
.Xr ng_frame_relay 4
node.
Typically, Annex A and Annex D live on DLCI 0 while Group-of-four
lives on DLCI 1023.
@ -118,8 +118,8 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_frame_relay 8 ,
.Xr ngctl 8 .
.Xr ng_frame_relay 4 ,
.Xr ngctl 8
.Rs
.%T "ANSI T1.617-1991 Annex D"
.Re

View File

@ -1,135 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_lmi.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_LMI 8
.Os FreeBSD
.Sh NAME
.Nm ng_lmi
.Nd frame relay LMI protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_lmi.h>
.Sh DESCRIPTION
The
.Nm lmi
node type performs the frame relay LMI protocol. It supports
the ITU Annex A, ANSI Annex D, and Group-of-four LMI types.
It also supports auto-detection of the LMI type.
.Pp
To enable a specific LMI type, connect the corresponding hook (
.Dv annexA ,
.Dv annexD ,
or
.Dv group4 ")"
to DLCI 0 or 1023 of a
.Xr ng_frame_relay 8
node.
Typically, Annex A and Annex D live on DLCI 0 while Group-of-four
lives on DLCI 1023.
.Pp
To enable LMI type auto-detection, connect the
.Dv auto0
hook to DLCI 0 and the
.Dv auto1023
hook to DLCI 1023. The node will attempt to automatically determine
which LMI type is running at the switch, and go into that mode.
.Pp
Only one fixed LMI type, or auto-detection, can be active at any given time.
.Pp
The
.Dv NGM_LMI_GET_STATUS
control message can be used at any time to query the current status
of the LMI protocol and each DLCI channel. This node also supports the
.Dv NGM_TEXT_STATUS
control message.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobarbaz
.It Dv annexA
ITU Annex A LMI hook.
.It Dv annexD
ANSI Annex D LMI hook.
.It Dv group4
Group-of-four LMI hook.
.It Dv auto0
Auto-detection hook for DLCI 0.
.It Dv auto1023
Auto-detection hook for DLCI 1023.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_LMI_GET_STATUS
This command returns status information in a
.Dv "struct nglmistat" :
.Bd -literal -offset 4n
#define NGM_LMI_STAT_ARYSIZE (1024/8)
struct nglmistat {
u_char proto[12]; /* Active proto (same as hook name) */
u_char hook[12]; /* Active hook */
u_char fixed; /* If set to fixed LMI mode */
u_char autod; /* If currently auto-detecting */
u_char seen[NGM_LMI_STAT_ARYSIZE]; /* bitmap DLCIs seen */
u_char up[NGM_LMI_STAT_ARYSIZE]; /* bitmap DLCIs up */
};
.Ed
.It Dv NGM_TEXT_STATUS
This generic message returns is a human-readable version of the node status.
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_frame_relay 8 ,
.Xr ngctl 8 .
.Rs
.%T "ANSI T1.617-1991 Annex D"
.Re
.Rs
.%T "ITU-T Q.933 Digital Subscriber Signaling System No. 1 - Signaling Specification for Frame Mode Basic Call Control, Annex A"
.Re
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,7 +3,7 @@
KMOD= ng_mppc
SRCS= ng_mppc.c opt_netgraph.h
MAN8= ng_mppc.8
MAN4= ng_mppc.4
NETGRAPH_MPPC_COMPRESSION?= 0
NETGRAPH_MPPC_ENCRYPTION?= 1

View File

@ -36,7 +36,7 @@
.\" $FreeBSD$
.\"
.Dd December 8, 1999
.Dt NG_MPPC 8
.Dt NG_MPPC 4
.Os FreeBSD
.Sh NAME
.Nm ng_mppc
@ -58,7 +58,7 @@ for compression and
.Dv "decomp"
for decompression.
Typically one or both of these hooks would be connected to the
.Xr ng_ppp 8
.Xr ng_ppp 4
node type hook of the same name.
Each direction of traffic flow is independent of the other.
.Sh HOOKS
@ -67,14 +67,14 @@ This node type supports the following hooks:
.Bl -tag -compact -width vjc_vjuncomp
.It Dv comp
Connection to
.Xr ng_ppp 8
.Xr ng_ppp 4
.Dv "comp"
hook.
Incoming frames are compressed and/or encrypted, and sent
back out the same hook.
.It Dv decomp
Connection to
.Xr ng_ppp 8
.Xr ng_ppp 4
.Dv "decomp"
hook.
Incoming frames are decompressed and/or decrypted, and sent
@ -165,7 +165,7 @@ However, Microsoft combined both compression and encryption into their
``compression'' algorithm, which is confusing.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_ppp 4 ,
.Xr ngctl 8
.Rs
.%A G. Pall

View File

@ -1,192 +0,0 @@
.\" Copyright (c) 1996-2000 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $Whistle: ng_mppc.8,v 1.1 1999/12/08 20:20:39 archie Exp $
.\" $FreeBSD$
.\"
.Dd December 8, 1999
.Dt NG_MPPC 8
.Os FreeBSD
.Sh NAME
.Nm ng_mppc
.Nd Microsoft MPPC/MPPE compression and encryption netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_mppc.h>
.Sh DESCRIPTION
The
.Nm mppc
node type implements the Microsoft Point-to-Point Compression (MPPC)
and Microsoft Point-to-Point Encryption (MPPE) sub-protocols of
the PPP protocol.
These protocols are often used in conjunction with the Point-to-Point
Tunneling Protocol (PPTP).
.Pp
The node has two hooks,
.Dv "comp"
for compression and
.Dv "decomp"
for decompression.
Typically one or both of these hooks would be connected to the
.Xr ng_ppp 8
node type hook of the same name.
Each direction of traffic flow is independent of the other.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -compact -width vjc_vjuncomp
.It Dv comp
Connection to
.Xr ng_ppp 8
.Dv "comp"
hook.
Incoming frames are compressed and/or encrypted, and sent
back out the same hook.
.It Dv decomp
Connection to
.Xr ng_ppp 8
.Dv "decomp"
hook.
Incoming frames are decompressed and/or decrypted, and sent
back out the same hook.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_MPPC_CONFIG_COMP
This command resets and configures the node for a session in the
outgoing traffic direction (i.e., for compression and/or encryption).
This command takes a
.Dv "struct ng_mppc_config"
as an argument:
.Bd -literal -offset 0
/* Length of MPPE key */
#define MPPE_KEY_LEN 16
/* MPPC/MPPE PPP negotiation bits */
#define MPPC_BIT 0x00000001 /* mppc compression bits */
#define MPPE_40 0x00000020 /* use 40 bit key */
#define MPPE_128 0x00000040 /* use 128 bit key */
#define MPPE_BITS 0x00000060 /* mppe encryption bits */
#define MPPE_STATELESS 0x01000000 /* use stateless mode */
#define MPPC_VALID_BITS 0x01000061 /* possibly valid bits */
/* Configuration for a session */
struct ng_mppc_config {
u_char enable; /* enable */
u_int32_t bits; /* config bits */
u_char startkey[MPPE_KEY_LEN]; /* start key */
};
.Ed
The
.Dv enabled
field enables traffic flow through the node.
The
.Dv bits
field contains the bits as negotiated by the Compression Control Protocol
(CCP) in PPP.
The
.Dv startkey
is only necessary if MPPE was negotiated, and must be equal to the
session start key as defined for MPPE.
This key is based on the MS-CHAP credentials used at link authentication time.
.It Dv NGM_MPPC_CONFIG_DECOMP
This command resets and configures the node for a session in the
incoming traffic direction (i.e., for decompression and/or decryption).
This command takes a
.Dv "struct ng_mppc_config"
as an argument.
.It Dv NGM_MPPC_RESETREQ
This message contains no arguments, and is bi-directional.
If an error is detected during decompression, this message is sent by the
node to the originator of the
.Dv NGM_MPPC_CONFIG_DECOMP
message that initiated the session.
The receiver should respond by sending a PPP CCP Reset-Request to the peer.
.Pp
This message may also be received by this node type when a CCP Reset-Request
is received by the local PPP entity.
The node will respond by flushing its outgoing compression and encryption
state so the remote side can resynchronize.
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when both hooks have been disconnected.
.Sh COMPILATION
The kernel options
.Dv NETGRAPH_MPPC_COMPRESSION
and
.Dv NETGRAPH_MPPC_ENCRYPTION
are supplied to selectively compile in either or both capabilities.
At least one of these must be defined, or else this node type is useless.
.Pp
The MPPC protocol requires proprietary compression code available
from Hi/Fn (formerly STAC).
These files must be obtained elsewhere and added to the kernel
sources before this node type will compile with the
.Dv NETGRAPH_MPPC_COMPRESSION
option.
.Sh BUGS
In PPP, encryption should be handled by the Encryption Control Procotol (ECP)
rather than CCP.
However, Microsoft combined both compression and encryption into their
``compression'' algorithm, which is confusing.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ngctl 8
.Rs
.%A G. Pall
.%T "Microsoft Point-To-Point Compression (MPPC) Protocol"
.%O RFC 2118
.Re
.Rs
.%A G. S. Pall
.%A G. Zorn
.%T "Microsoft Point-To-Point Encryption (MPPE) Protocol"
.%O draft-ietf-pppext-mppe-04.txt
.Re
.Rs
.%A K. Hamzeh
.%A G. Pall
.%A W. Verthein
.%A J. Taarud
.%A W. Little
.%A G. Zorn
.%T "Point-to-Point Tunneling Protocol (PPTP)"
.%O RFC 2637
.Re
.Sh AUTHOR
Archie Cobbs <archie@whistle.com>

View File

@ -1077,25 +1077,28 @@ and
.Sh SEE ALSO
.Xr socket 2 ,
.Xr netgraph 3 ,
.Xr ng_async 4 ,
.Xr ng_bpf 4 ,
.Xr ng_cisco 4 ,
.Xr ng_ether 4 ,
.Xr ng_echo 4 ,
.Xr ng_frame_relay 4 ,
.Xr ng_hole 4 ,
.Xr ng_iface 4 ,
.Xr ng_ksocket 4 ,
.Xr ng_lmi 4 ,
.Xr ng_mppc 4 ,
.Xr ng_ppp 4 ,
.Xr ng_pppoe 4 ,
.Xr ng_rfc1490 4 ,
.Xr ng_socket 4 ,
.Xr ng_tee 4 ,
.Xr ng_tty 4 ,
.Xr ng_UI 4 ,
.Xr ng_vjc 4 ,
.Xr ng_{type} 4 ,
.Xr ngctl 8 ,
.Xr nghook 8 ,
.Xr ng_async 8 ,
.Xr ng_cisco 8 ,
.Xr ng_echo 8 ,
.Xr ng_frame_relay 8 ,
.Xr ng_hole 8 ,
.Xr ng_iface 8 ,
.Xr ng_ksocket 8 ,
.Xr ng_lmi 8 ,
.Xr ng_ppp 8 ,
.Xr ng_pppoe 8 ,
.Xr ng_rfc1490 8 ,
.Xr ng_socket 8 ,
.Xr ng_tee 8 ,
.Xr ng_tty 8 ,
.Xr ng_UI 8 ,
.Xr ng_vjc 8 ,
.Xr ng_{type} 8 .
.Xr nghook 8
.Sh HISTORY
The
.Nm

View File

@ -3,6 +3,6 @@
KMOD= ng_ppp
SRCS= ng_ppp.c
MAN8= ng_ppp.8
MAN4= ng_ppp.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_PPP 8
.Dt NG_PPP 4
.Os FreeBSD
.Sh NAME
.Nm ng_ppp
@ -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 4
type node.
.Sh ENABLING FUNCTIONALITY
In general, the PPP node enables a specific link or functionality when
@ -152,11 +152,11 @@ and
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
.Xr ng_vjc 4
node. The PPP node is compatible with the
.Dq pass through
modes of the
.Xr ng_vjc 8
.Xr ng_vjc 4
node type.
.Sh BYPASS HOOK
When a frame is received on a link with an unsupported protocol,
@ -249,22 +249,22 @@ Connection to encryption engine
Connection to decryption engine
.It Dv vjc_ip
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv ip
hook
.It Dv vjc_vjcomp
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv vjcomp
hook
.It Dv vjc_vjuncomp
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv vjuncomp
hook
.It Dv vjc_vjip
Connection to
.Xr ng_vjc 8
.Xr ng_vjc 4
.Dv vjip
hook
.It Dv inet
@ -342,15 +342,15 @@ but also atomically clears the statistics as well.
.El
.Pp
This node type also accepts the control messages accepted by the
.Xr ng_vjc 8
.Xr ng_vjc 4
node type. When received, these messages are simply forwarded to
the adjacent
.Xr ng_vjc 8
.Xr ng_vjc 4
node, if any. This is particularly useful when the individual
PPP links are able to generate
.Dv NGM_VJC_RECV_ERROR
messages (see
.Xr ng_vjc 8
.Xr ng_vjc 4
for a description).
.Sh SHUTDOWN
This node shuts down upon receipt of a
@ -358,11 +358,12 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_async 8 ,
.Xr ng_iface 8 ,
.Xr ng_vjc 8 ,
.Xr ng_pppoe 8 ,
.Xr ngctl 8 .
.Xr ng_async 4 ,
.Xr ng_iface 4 ,
.Xr ng_mppc 4 ,
.Xr ng_pppoe 4 ,
.Xr ng_vjc 4 ,
.Xr ngctl 8
.Rs
.%A W. Simpson
.%T "The Point-to-Point Protocol (PPP)"

View File

@ -1,386 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_PPP 8
.Os FreeBSD
.Sh NAME
.Nm ng_ppp
.Nd PPP protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_ppp.h>
.Sh DESCRIPTION
The
.Nm ppp
node type performs multiplexing for the PPP protocol. It handles
only packets that contain data, and forwards protocol negotiation
and control packets to a separate controlling entity (e.g., a
user-land daemon). This approach combines the fast dispatch of
kernel implementations with the configuration flexibility of a
user-land implementations. The PPP node type directly supports
multi-link PPP, Van Jacobsen compression, PPP compression, PPP
encryption, and the IP, IPX, and AppleTalk protocols. A single
PPP node corresponds to one PPP multi-link bundle.
.Pp
There is a separate hook for each PPP link in the bundle, plus
several hooks corresponding to the directly supported protocols.
For compression and encryption, separate attached nodes are required
to do the actual work. The node type used will of course depend
on the algorithm negotiated. There is also a
.Dv bypass
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
type node.
.Sh ENABLING FUNCTIONALITY
In general, the PPP node enables a specific link or functionality when
(a) a
.Dv NGM_PPP_SET_CONFIG
message has been received which enables it, and
(b) the corresponding hook(s) are connected.
This allows the controlling entity to use either method (a) or (b)
(or both) to control the node's behavior.
When a link is connected but disabled, traffic can still flow on
the link via the
.Dv bypass
hook (see below).
.Sh LINK HOOKS
During normal operation, the individual PPP links are connected to hooks
.Dv link0 ,
.Dv link1 ,
etc. Up to
.Dv NG_PPP_MAX_LINKS
links are supported.
These device-independent hooks transmit and receive full PPP
frames, which include the PPP protocol, address, control, and
information fields, but no checksum or other link-specific fields.
.Pp
On outgoing frames, when protocol compression
has been enabled and the protocol number is suitable for compression,
the protocol field will be compressed (i.e., sent as one byte
instead of two). Either compressed or uncompressed protocol fields
are accepted on incoming frames. Similarly, if address and control
field compression has been enabled for the link, the address and
control fields will be omitted (except for LCP frames as required
by the standards). Incoming frames have the address and control fields
stripped automatically if present.
.Pp
Since all negotiation is handled outside the PPP node, the links
should not be connected and enabled until the corresponding link
has reached the network phase (i.e., LCP negotiation and authentication
have completed successfully) and the PPP node has been informed of
the link parameters via the
.Dv NGM_PPP_LINK_CONFIG
message.
.Pp
When a link is connected but disabled, all received frames are forwarded
directly out the
.Dv bypass
hook, and conversely, frames may be transmitted via the
.Dv bypass
hook as well. This mode is appropriate for the link authentication phase.
As soon as the link is enabled, the PPP node will
begin processing frames received on the link.
.Sh COMPRESSION AND ENCRYPTION
Compression is supported via two hooks,
.Dv compress
and
.Dv decompress .
When enabled and connected, the PPP node writes outgoing frames on the
.Dv comp
hook and expects to receive back the compressed frame on the same hook.
Similarly, the
.Dv decompress
hook is used to uncompress incoming frames when decompression is
negotiated (compression and decompression are independently negotiable).
The type of node attached to these hooks should correspond
to the type of compression negotiated, e.g., Deflate, Predictor-1, etc.
.Pp
Encryption works exactly analogously via the
.Dv encrypt
and
.Dv decrypt
nodes. Data is always compressed before being encrypted,
and decrypted before being decompressed.
.Pp
Only bundle-level compression and encryption is directly supported;
link-level compression and encryption can be handled transparently
by downstream nodes.
.Sh VAN JACOBSEN COMPRESSION
When all of the
.Dv vjc_ip ,
.Dv vjc_vjcomp ,
.Dv vjc_vjuncomp ,
and
.Dv vjc_vjip
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
.Dq pass through
modes of the
.Xr ng_vjc 8
node type.
.Sh BYPASS HOOK
When a frame is received on a link with an unsupported protocol,
or a protocol which is disabled or for which the corresponding hook
is unconnected, the PPP node forwards the frame out the
.Dv bypass
hook, prepended with a four byte prefix. This first two bytes of
the prefix indicate the link number on which the frame was received
(in network order).
For such frames received over the bundle (i.e., encapsulated in the
multi-link protocol), the special link number
.Dv NG_PPP_BUNDLE_LINKNUM
is used. After the two byte link number is the two byte PPP protocol number
(also in network order).
The PPP protocol number is two bytes long even if the original frame
was protocol compressed.
.Pp
Conversely, any data written to the
.Dv bypass
hook is assumed to be in this same format. The four byte header is
stripped off, the PPP protocol number is prepended (possibly compressed),
and the frame is delivered over the desired link.
If the link number is
.Dv NG_PPP_BUNDLE_LINKNUM
the frame will be delivered over the multi-link bundle; or, if multi-link
is disabled, over the (single) PPP link.
.Pp
Typically when the controlling entity receives a packet on the bypass
hook it responds either by dropping the frame (if it's not ready for
the protocol) or with an LCP protocol reject (if it doesn't recognize
or expect the protocol).
.Sh MULTILINK OPERATION
To enable multi-link PPP, the corresponding configuration flag must be set
and at least one link connected. The PPP node will not allow more than
one link to be connected if multi-link is not enabled, nor will it allow
certain multi-link settings to be changed while multi-link operation is
active (e.g., short sequence number header format).
.Pp
Because packets are sent as fragments across multiple individual links,
it is important that when a link goes down the PPP node is notified
immediately, either by disconnecting the corresponding hook or disabling
the link via the
.Dv NGM_PPP_SET_CONFIG
control message.
.Pp
Each link has configuration parameters for latency (specified in
milliseconds) and bandwidth (specified in tens of bytes per second).
The PPP node can be configured for
.Em round-robin
or
.Em optimized
packet delivery.
.Pp
When configured for round-robin delivery, the latency and bandwidth
values are ignored and the PPP node simply sends each frame as a
single fragment, alternating frames across all the links in the
bundle. This scheme has the advantage that even if one link fails
silently, some packets will still get through. It has the disadvantage
of sub-optimal overall bundle latency, which is important for
interactive response time, and sub-optimal overall bundle bandwidth
when links with different bandwidths exist in the same bundle.
.Pp
When configured for optimal delivery, the PPP node distributes the
packet across the links in a way that minimizes the time it takes
for the completed packet to be received by the far end. This
involves taking into account each link's latency, bandwidth, and
current queue length. Therefore these numbers should be
configured as accurately as possible. The algorithm does require
some computation, so may not be appropriate for very slow machines
and/or very fast links.
.Pp
As a special case, if all links have identical latency and bandwidth,
then the above algorithm is disabled (because it is unnecessary)
and the PPP node simply fragments frames into equal sized portions
across all of the links.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -compact -width vjc_vjuncomp
.It Dv link<N>
Individual PPP link number
.Dv <N>
.It Dv compress
Connection to compression engine
.It Dv decompress
Connection to decompression engine
.It Dv encrypt
Connection to encryption engine
.It Dv decrypt
Connection to decryption engine
.It Dv vjc_ip
Connection to
.Xr ng_vjc 8
.Dv ip
hook
.It Dv vjc_vjcomp
Connection to
.Xr ng_vjc 8
.Dv vjcomp
hook
.It Dv vjc_vjuncomp
Connection to
.Xr ng_vjc 8
.Dv vjuncomp
hook
.It Dv vjc_vjip
Connection to
.Xr ng_vjc 8
.Dv vjip
hook
.It Dv inet
IP packet data
.It Dv atalk
AppleTalk packet data
.It Dv ipx
IPX packet data
.It Dv bypass
Bypass hook; frames have a four byte header consisting of
a link number and a PPP protocol number.
.El
.Pp
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_PPP_SET_CONFIG
This command configures all aspects of the node. This includes enabling
multi-link PPP, encryption, compression, Van Jacobsen compression, and IP,
AppleTalk, and IPX packet delivery. It includes per-link configuration,
including enabling the link, setting latency and bandwidth parameters,
and enabling protocol field compression. Note that no link or functionality
is active until the corresponding hook is also connected.
This command takes a
.Dv "struct ng_ppp_node_config"
as an argument:
.Bd -literal -offset 0
/* Per-link config structure */
struct ng_ppp_link_config {
u_char enableLink; /* enable this link */
u_char enableProtoComp;/* enable protocol field compression */
u_char enableACFComp; /* enable addr/ctrl field compression */
u_int16_t mru; /* peer MRU */
u_int32_t latency; /* link latency (in milliseconds) */
u_int32_t bandwidth; /* link bandwidth (in bytes/second) */
};
/* Node config structure */
struct ng_ppp_node_config {
u_int16_t mrru; /* multilink peer MRRU */
u_char enableMultilink; /* enable multilink */
u_char recvShortSeq; /* recv multilink short seq # */
u_char xmitShortSeq; /* xmit multilink short seq # */
u_char enableRoundRobin; /* xmit whole packets */
u_char enableIP; /* enable IP data flow */
u_char enableAtalk; /* enable AppleTalk data flow */
u_char enableIPX; /* enable IPX data flow */
u_char enableCompression; /* enable PPP compression */
u_char enableDecompression; /* enable PPP decompression */
u_char enableEncryption; /* enable PPP encryption */
u_char enableDecryption; /* enable PPP decryption */
u_char enableVJCompression; /* enable VJ compression */
u_char enableVJDecompression; /* enable VJ decompression */
struct ng_ppp_link_config /* per link config params */
links[NG_PPP_MAX_LINKS];
};
.Ed
.Pp
.It Dv NGM_PPP_GET_CONFIG
Returns the current configuration as a
.Dv "struct ng_ppp_node_config" .
.It Dv NGM_PPP_GET_LINK_STATS
This command takes a two byte link number as an argument and returns a
.Dv "struct ng_ppp_link_stat"
containing statistics for the corresponding link. Here
.Dv NG_PPP_BUNDLE_LINKNUM
is a valid link number corresponding to the multi-link bundle.
.It Dv NGM_PPP_CLR_LINK_STATS
This command takes a two byte link number as an argument and
clears the statistics for that link.
.It Dv NGM_PPP_GETCLR_LINK_STATS
Same as
.Dv NGM_PPP_GET_LINK_STATS ,
but also atomically clears the statistics as well.
.El
.Pp
This node type also accepts the control messages accepted by the
.Xr ng_vjc 8
node type. When received, these messages are simply forwarded to
the adjacent
.Xr ng_vjc 8
node, if any. This is particularly useful when the individual
PPP links are able to generate
.Dv NGM_VJC_RECV_ERROR
messages (see
.Xr ng_vjc 8
for a description).
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_async 8 ,
.Xr ng_iface 8 ,
.Xr ng_vjc 8 ,
.Xr ng_pppoe 8 ,
.Xr ngctl 8 .
.Rs
.%A W. Simpson
.%T "The Point-to-Point Protocol (PPP)"
.%O RFC 1661
.Re
.Rs
.%A K. Sklower
.%A B. Lloyd
.%A G. McGregor
.%A D. Carr
.%A T. Coradetti
.%T "The PPP Multilink Protocol (MP)"
.%O RFC 1990
.Re
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_pppoe
SRCS= ng_pppoe.c
MAN8= ng_pppoe.8
MAN4= ng_pppoe.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
.\"
.Dd October 28, 1999
.Dt NG_PPPOE 8
.Dt NG_PPPOE 4
.Os FreeBSD
.Sh NAME
.Nm ng_pppoe
@ -382,9 +382,9 @@ setup(char *ethername, char *service, char *sessname,
.Sh SEE ALSO
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ng_ppp 8 ,
.Xr ngctl 8 .
.Xr ng_socket 4 ,
.Xr ng_ppp 4 ,
.Xr ngctl 8
.Rs
.%A L. Mamakos
.%A K. Lidl

View File

@ -1,404 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
.\"
.Dd October 28, 1999
.Dt NG_PPPOE 8
.Os FreeBSD
.Sh NAME
.Nm ng_pppoe
.Nd RFC 2516 PPPOE protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <net/ethernet.h>
.Fd #include <netgraph/ng_pppoe.h>
.Sh DESCRIPTION
The
.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
to and from a PPP agent (which is not specified).
.Pp
The
.Dv NGM_PPPOE_GET_STATUS
control message can be used at any time to query the current status
of the PPPOE module. The only statistics presently available are the
total packet counts for input and output. This node does not yet support
the
.Dv NGM_TEXT_STATUS
control message.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobarbaz
.It Dv ethernet
The hook that should normally be connected to an Ethernet node.
.It Dv debug
Presently no use.
.It Dv [unspecified]
Any other name is assumed to be a session hook that will be connected to
a PPP client agent, or a ppp server agent.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_PPPOE_GET_STATUS
This command returns status information in a
.Dv "struct ngpppoestat" :
.Bd -literal -offset 4n
struct ngpppoestat {
u_int packets_in; /* packets in from ethernet */
u_int packets_out; /* packets out towards ethernet */
};
.Ed
.It Dv NGM_TEXT_STATUS
This generic message returns is a human-readable version of the node status.
(not yet)
.It Dv NGM_PPPOE_CONNECT
Tell a nominated newly created hook that it's session should enter
the state machine in a manner to become a client. It must be newly created and
a service name can be given as an argument. It is legal to specify a zero length
service name. This is common on some DSL setups. A session request packet
will be broadcast on the Ethernet.
This command uses the
.Dv ngpppoe_init_data
structure shown below.
.It Dv NGM_PPPOE_LISTEN
Tell a nominated newly created hook that it's session should enter
the state machine in a manner to become a server listener. The argument
given is the name of the service to listen on behalf of. A zero length service
length will match all requests for service. A matching service request
packet will be passed unmodified back to the process responsible
for starting the service. It can then examine it and pass it on to
the session that is started to answer the request.
This command uses the
.Dv ngpppoe_init_data
structure shown below.
.It Dv NGM_PPPOE_OFFER
Tell a nominated newly created hook that it's session should enter
the state machine in a manner to become a server. The argument
given is the name of the service to offer. A zero length service
is legal. The State machine will progress to a state where it will await
a request packet to be forwarded to it from the startup server,
which in turn probably received it from a LISTEN mode hook ( see above).
This is so
that information that is required for the session that is embedded in
the original session request packet, is made available to the state machine
that eventually answers the request. When the Session request packet is
received, the session negotiation will proceed.
This command uses the
.Dv ngpppoe_init_data
structure shown below.
.Pp
The three commands above use a common data structure:
.Bd -literal -offset 4n
struct ngpppoe_init_data {
char hook[NG_HOOKLEN + 1]; /* hook to monitor on */
u_int16_t data_len; /* service name length */
char data[0]; /* init data goes here */
};
.Ed
.It Dv NGM_PPPOE_SUCCESS
This command is sent to the node that started this session with one of the
above messages, and reports a state change. This message reports
successful Session negotiation. It uses the structure shown below, and
reports back the hook name corresponding to the successful session.
.It Dv NGM_NGM_PPPOE_FAIL
This command is sent to the node that started this session with one of the
above messages, and reports a state change. This message reports
failed Session negotiation. It uses the structure shown below, and
reports back the hook name corresponding to the failed session.
The hook will probably have been removed immediately after sending this message
.It Dv NGM_NGM_PPPOE_CLOSE
This command is sent to the node that started this session with one of the
above messages, and reports a state change. This message reports
a request to close a session. It uses the structure shown below, and
reports back the hook name corresponding to the closed session.
The hook will probably have been removed immediately after sending this
message. At present this message is not yet used and a 'failed' message
will be received at closure instead.
.Pp
The three commands above use a common data structure:
.Bd -literal -offset 4n
struct ngpppoe_sts {
char hook[NG_HOOKLEN + 1]; /* hook associated with event session */
};
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, when all session have been disconnected or when the
.Dv ethernet
hook is disconnected.
.Sh EXAMPLES
The following code uses
.Dv libnetgraph
to set up a
.Nm
node and connect it to both a socket node and an Ethernet node. It can handle
the case of when a
.Nm
node is already attached to the Ethernet. It then starts a client session.
.Bd -literal
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sysexits.h>
#include <errno.h>
#include <err.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <net/ethernet.h>
#include <netgraph.h>
#include <netgraph/ng_ether.h>
#include <netgraph/ng_pppoe.h>
#include <netgraph/ng_socket.h>
static int setup(char *ethername, char *service, char *sessname,
int *dfd, int *cfd);
int
main()
{
int fd1, fd2;
setup("xl0", NULL, "fred", &fd1, &fd2);
sleep (30);
}
static int
setup(char *ethername, char *service, char *sessname,
int *dfd, int *cfd)
{
struct ngm_connect ngc; /* connect */
struct ngm_mkpeer mkp; /* mkpeer */
/******** nodeinfo stuff **********/
u_char rbuf[2 * 1024];
struct ng_mesg *const resp = (struct ng_mesg *) rbuf;
struct hooklist *const hlist
= (struct hooklist *) resp->data;
struct nodeinfo *const ninfo = &hlist->nodeinfo;
int ch, no_hooks = 0;
struct linkinfo *link;
struct nodeinfo *peer;
/****message to connect pppoe session*****/
struct {
struct ngPPPoE_init_data idata;
char service[100];
} message;
/********tracking our little graph ********/
char path[100];
char source_ID[NG_NODELEN + 1];
char pppoe_node_name[100];
int k;
/*
* Create the data and control sockets
*/
if (NgMkSockNode(NULL, cfd, dfd) < 0) {
return (errno);
}
/*
* find the ether node of the name requested by asking it for
* it's inquiry information.
*/
if (strlen(ethername) > 16)
return (EINVAL);
sprintf(path, "%s:", ethername);
if (NgSendMsg(*cfd, path, NGM_GENERIC_COOKIE,
NGM_LISTHOOKS, NULL, 0) < 0) {
return (errno);
}
/*
* the command was accepted so it exists. Await the reply (It's
* almost certainly already waiting).
*/
if (NgRecvMsg(*cfd, resp, sizeof(rbuf), NULL) < 0) {
return (errno);
}
/**
* The following is available about the node:
* ninfo->name (string)
* ninfo->type (string)
* ninfo->id (u_int32_t)
* ninfo->hooks (u_int32_t) (count of hooks)
* check it is the correct type. and get it's ID for use
* with mkpeer later.
*/
if (strncmp(ninfo->type, NG_ETHER_NODE_TYPE,
strlen(NG_ETHER_NODE_TYPE)) != 0) {
return (EPROTOTYPE);
}
sprintf(source_ID, "[%08x]:", ninfo->id);
/*
* look for a hook already attached.
*/
for (k = 0; k < ninfo->hooks; k++) {
/**
* The following are available about each hook.
* link->ourhook (string)
* link->peerhook (string)
* peer->name (string)
* peer->type (string)
* peer->id (u_int32_t)
* peer->hooks (u_int32_t)
*/
link = &hlist->link[k];
peer = &hlist->link[k].nodeinfo;
/* Ignore debug hooks */
if (strcmp("debug", link->ourhook) == 0)
continue;
/* If the orphans hook is attached, use that */
if (strcmp(NG_ETHER_HOOK_ORPHAN,
link->ourhook) == 0) {
break;
}
/* the other option is the 'divert' hook */
if (strcmp("NG_ETHER_HOOK_DIVERT",
link->ourhook) == 0) {
break;
}
}
/*
* See if we found a hook there.
*/
if (k < ninfo->hooks) {
if (strcmp(peer->type, NG_PPPOE_NODE_TYPE) == 0) {
/*
* If it's a type pppoe, we skip making one
* ourself, but we continue, using
* the existing one.
*/
sprintf(pppoe_node_name, "[%08x]:", peer->id);
} else {
/*
* There is already someone hogging the data,
* return an error. Some day we'll try
* daisy-chaining..
*/
return (EBUSY);
}
} else {
/*
* Try make a node of type pppoe against node "ID"
* On hook NG_ETHER_HOOK_ORPHAN.
*/
snprintf(mkp.type, sizeof(mkp.type),
"%s", NG_PPPOE_NODE_TYPE);
snprintf(mkp.ourhook, sizeof(mkp.ourhook),
"%s", NG_ETHER_HOOK_ORPHAN);
snprintf(mkp.peerhook, sizeof(mkp.peerhook),
"%s", NG_PPPOE_HOOK_ETHERNET);
/* Send message */
if (NgSendMsg(*cfd, source_ID, NGM_GENERIC_COOKIE,
NGM_MKPEER, &mkp, sizeof(mkp)) < 0) {
return (errno);
}
/*
* Work out a name for the new node.
*/
sprintf(pppoe_node_name, "%s:%s",
source_ID, NG_ETHER_HOOK_ORPHAN);
}
/*
* We now have a pppoe node attached to the ethernet
* card. The Ethernet is addressed as ethername: The pppoe
* node is addressed as pppoe_node_name: attach to it.
* Connect socket node to specified node Use the same hook
* name on both ends of the link.
*/
snprintf(ngc.path, sizeof(ngc.path), "%s", pppoe_node_name);
snprintf(ngc.ourhook, sizeof(ngc.ourhook), "%s", sessname);
snprintf(ngc.peerhook, sizeof(ngc.peerhook), "%s", sessname);
if (NgSendMsg(*cfd, ".:", NGM_GENERIC_COOKIE,
NGM_CONNECT, &ngc, sizeof(ngc)) < 0) {
return (errno);
}
/*
* Send it a message telling it to start up.
*/
bzero(&message, sizeof(message));
snprintf(message.idata.hook, sizeof(message.idata.hook),
"%s", sessname);
if (service == NULL) {
message.idata.data_len = 0;
} else {
snprintf(message.idata.data,
sizeof(message.idata.data), "%s", service);
message.idata.data_len = strlen(service);
}
/* Tell session/hook to start up as a client */
if (NgSendMsg(*cfd, ngc.path,
NGM_PPPOE_COOKIE, NGM_PPPOE_CONNECT, &message.idata,
sizeof(message.idata) + message.idata.data_len) < 0) {
return (errno);
}
return (0);
}
.Ed
.Sh SEE ALSO
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ng_ppp 8 ,
.Xr ngctl 8 .
.Rs
.%A L. Mamakos
.%A K. Lidl
.%A J. Evarts
.%A D. Carrel
.%A D. Simone
.%A R. Wheeler
.%T "A Method for transmitting PPP over Ethernet (PPPoE)"
.%O RFC 2516
.Re
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_pptpgre
SRCS= ng_pptpgre.c
MAN8= ng_pptpgre.8
MAN4= ng_pptpgre.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_pptpgre.8,v 1.2 1999/12/08 00:20:53 archie Exp $
.\"
.Dd November 29, 1999
.Dt NG_PPTPGRE 8
.Dt NG_PPTPGRE 4
.Os FreeBSD
.Sh NAME
.Nm ng_pptpgre
@ -55,13 +55,13 @@ the TCP control protocol or call negotiation defined by PPTP.
The typical use for this node type would be to connect the
.Dv upper
hook to one of the link hooks of a
.Xr ng_ppp 8
.Xr ng_ppp 4
node, and the
.Dv lower
hook to the
.Dv "inet/raw/gre"
hook of a
.Xr ng_ksocket 8
.Xr ng_ksocket 4
node.
.Sh HOOKS
This node type supports the following hooks:
@ -111,9 +111,9 @@ This node shuts down upon receipt of a
control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ng_ppp 8 ,
.Xr ngctl 8 .
.Xr ng_ksocket 4 ,
.Xr ng_ppp 4 ,
.Xr ngctl 8
.Rs
.%A K. Hamzeh
.%A G. Pall

View File

@ -1,141 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_pptpgre.8,v 1.2 1999/12/08 00:20:53 archie Exp $
.\"
.Dd November 29, 1999
.Dt NG_PPTPGRE 8
.Os FreeBSD
.Sh NAME
.Nm ng_pptpgre
.Nd PPTP GRE protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_pptpgre.h>
.Sh DESCRIPTION
The
.Nm pptpgre
node type performs Generic Routing Encapsulation (GRE) over IP
for the PPTP protocol as specified by RFC 2637. This involves packet
encapsulation, sequencing, acknowlegement, and an adaptive timeout
sliding window mechanism. This node type does not handle any of
the TCP control protocol or call negotiation defined by PPTP.
.Pp
The typical use for this node type would be to connect the
.Dv upper
hook to one of the link hooks of a
.Xr ng_ppp 8
node, and the
.Dv lower
hook to the
.Dv "inet/raw/gre"
hook of a
.Xr ng_ksocket 8
node.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -compact -width vjc_vjuncomp
.It Dv upper
Connection to the upper protocol layers
.It Dv lower
Connection to the lower protocol layers
.El
.Pp
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_PPTPGRE_SET_CONFIG
This command resets and configures the node for a session.
This command takes a
.Dv "struct ng_pptpgre_conf"
as an argument:
.Bd -literal -offset 0
/* Configuration for a session */
struct ng_pptpgre_conf {
u_char enabled; /* enables traffic flow */
u_char enableDelayedAck; /* enables delayed acks */
u_int16_t cid; /* my call id */
u_int16_t peerCid; /* peer call id */
u_int16_t recvWin; /* peer recv window size */
u_int16_t peerPpd; /* peer packet processing delay
(in 1/10 of a second) */
};
.Ed
The
.Dv enabled
field enables traffic flow through the node. The
.Dv enableDelayedAck
field enables delayed acknowledgement (maximum 250 miliseconds), which
is a useful optimization and should generally be turned on.
The remaining fields are as supplied by the PPTP virtual call setup process.
.It Dv NGM_PPTPGRE_GET_CONFIG
Returns the current configuration as a
.Dv "struct ng_pptpgre_conf" .
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ng_ppp 8 ,
.Xr ngctl 8 .
.Rs
.%A K. Hamzeh
.%A G. Pall
.%A W. Verthein
.%A J. Taarud
.%A W. Little
.%A G. Zorn
.%T "Point-to-Point Tunneling Protocol (PPTP)"
.%O RFC 2637
.Re
.Rs
.%A S. Hanks
.%A T. \&Li
.%A D. Farinacci
.%A P. Traina
.%T "Generic Routing Encapsulation over IPv4 networks"
.%O RFC 1702
.Re
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_rfc1490
SRCS= ng_rfc1490.c
MAN8= ng_rfc1490.8
MAN4= ng_rfc1490.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_rfc1490.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_RFC1490 8
.Dt NG_RFC1490 4
.Os FreeBSD
.Sh NAME
.Nm ng_rfc1490
@ -69,7 +69,7 @@ Typically the
hook is connected to the
.Dv inet
hook of an
.Xr ng_iface 8
.Xr ng_iface 4
node.
.Sh HOOKS
This node type supports the following hooks:
@ -92,9 +92,9 @@ control message, or when all hooks have been disconnected.
Not all of RFC 1490 is implemented.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_frame_relay 8 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Xr ng_frame_relay 4 ,
.Xr ng_iface 4 ,
.Xr ngctl 8
.Rs
.%A C. Brown, A. Malis
.%T "Multiprotocol Interconnect over Frame Relay"

View File

@ -1,114 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_rfc1490.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_RFC1490 8
.Os FreeBSD
.Sh NAME
.Nm ng_rfc1490
.Nd RFC 1490 netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_rfc1490.h>
.Sh DESCRIPTION
The
.Nm rfc1490
node type performs protocol encapsulation, de-encapsulation, and
multiplexing according to RFC 1490 (which has since been updated by RFC 2427).
This particular type of encapsulation is often used on top of frame relay
DLCI channels.
.Pp
The
.Dv downstream
hook is used to transmit and receive encapsulated frames. On the other
side of the node, the
.Dv inet
and
.Dv ppp
hooks are used to transmit and receive raw IP frames and PPP frames,
respectively. PPP frames are transmitted and received according to
RFC 1973; in particular, frames appearing on the
.Dv ppp
hook begin with the PPP protocol number.
.Pp
Typically the
.Dv inet
hook is connected to the
.Dv inet
hook of an
.Xr ng_iface 8
node.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobarbazum
.It Dv downstream
Connects to the RFC 1490 peer entity.
.It Dv inet
Transmits and receives raw IP frames.
.It Dv ppp
Transmits and receives PPP frames.
.El
.Sh CONTROL MESSAGES
This node type only supports the generic control messages.
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh BUGS
Not all of RFC 1490 is implemented.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_frame_relay 8 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Rs
.%A C. Brown, A. Malis
.%T "Multiprotocol Interconnect over Frame Relay"
.%O RFC 2427
.Re
.Rs
.%A W. Simpson
.%T "PPP in Frame Relay"
.%O RFC 1973
.Re
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_socket
SRCS= ng_socket.c
MAN8= ng_socket.8
MAN4= ng_socket.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_socket.8,v 1.5 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_SOCKET 8
.Dt NG_SOCKET 4
.Os FreeBSD
.Sh NAME
.Nm ng_socket
@ -167,8 +167,8 @@ socket).
.Xr socket 2 ,
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ngctl 8 .
.Xr ng_ksocket 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,178 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_socket.8,v 1.5 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_SOCKET 8
.Os FreeBSD
.Sh NAME
.Nm ng_socket
.Nd netgraph socket node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_message.h>
.Fd #include <netgraph/ng_socket.h>
.Sh DESCRIPTION
A
.Nm socket
node is both a BSD socket and a netgraph node. The
.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
root privileges to be able to create netgraph sockets however once created,
any process that has one may use it.
.Pp
A new
.Nm
node is created by creating a new socket of type
.Dv NG_CONTROL
in the protocol family
.Dv PF_NETGRAPH ,
using the
.Xr socket 2
system call.
Any control messages received by the node
and not having a cookie value of
.Dv NGM_SOCKET_COOKIE
are received by the process, using
.Xr recvfrom 2 ;
the socket address argument is a
.Dv "struct sockaddr_ng"
containing the sender's netgraph address. Conversely, control messages
can be sent to any node by calling
.Xr sendto 2 ,
supplying the recipient's address in a
.Dv "struct sockaddr_ng" .
The
.Xr bind 2
system call may be used to assign a global netgraph name to the node.
.Pp
To transmit and receive netgraph data packets, a
.Dv NG_DATA
socket must also be created using
.Xr socket 2
and associated with a
.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
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
and any packets to be sent out from the node are written using
.Xr sendto 2 .
In the case of data sockets, the
.Dv "struct sockaddr_ng"
contains the name of the
.Em hook
on which the data was received or should be sent.
.Pp
As a special case, to allow netgraph data sockets to be used as stdin or stdout
on naive programs, a
.Xr sendto 2
with a NULL sockaddr pointer, a
.Xr send 2
or a
.Xr write 2
will succeed in the case where there is exactly ONE hook attached to
the socket node, (and thus the path is unambiguous).
.Pp
There is a user library that simplifies using netgraph sockets; see
.Xr netgraph 3 .
.Sh HOOKS
This node type supports hooks with arbitrary names (as long as
they are unique) and always accepts hook connection requests.
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_SOCK_CMD_NOLINGER
When the last hook is removed from this node, it will shut down as
if it had received a
.Dv NGM_SHUTDOWN
message. Attempts to access the sockets associated will return
.Er ENOTCONN .
.It Dv NGM_SOCK_CMD_LINGER
This is the default mode. When the last hook is removed, the node will
continue to exist, ready to accept new hooks until it
is explicitly shut down.
.El
.Pp
All other messages
with neither the
.Dv NGM_SOCKET_COOKIE
or
.Dv NGM_GENERIC_COOKIE
will be passed unaltered up the
.Dv NG_CONTROL
socket.
.Sh SHUTDOWN
This node type shuts down and disappears when both the associated
.Dv NG_CONTROL
and
.Dv NG_DATA
sockets have been closed, or a
.Dv NGM_SHUTDOWN
control message is received. In the latter case, attempts to write
to the still-open sockets will return
.Er ENOTCONN .
If the
.Dv NGM_SOCK_CMD_NOLINGER
message has been received, closure of the last hook will also initiate
a shutdown of the node.
.Sh BUGS
It is not possible to reject the connection of a hook, though any
data received on that hook can certainly be ignored.
.Pp
The controlling process is not notified of all events that an in-kernel node
would be notified of, e.g. a new hook, or hook removal. We should define
some node-initiated messages for this purpose (to be sent up the control
socket).
.Sh SEE ALSO
.Xr socket 2 ,
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_tee
SRCS= ng_tee.c
MAN8= ng_tee.8
MAN4= ng_tee.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_tee.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_TEE 8
.Dt NG_TEE 4
.Os FreeBSD
.Sh NAME
.Nm ng_tee
@ -114,7 +114,7 @@ control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr tee 1 ,
.Xr netgraph 4 ,
.Xr ngctl 8 .
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,124 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_tee.8,v 1.4 1999/01/25 23:46:27 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_TEE 8
.Os FreeBSD
.Sh NAME
.Nm ng_tee
.Nd netgraph ``tee'' node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_tee.h>
.Sh DESCRIPTION
The
.Nm tee
node type has a purpose similar to the
.Xr tee 1
command.
.Nm Tee
nodes are useful for debugging or
.Dq snooping
on a connection
between two netgraph nodes.
.Nm Tee
nodes have four hooks,
.Dv right ,
.Dv left ,
.Dv right2left ,
and
.Dv left2right .
All data received on
.Dv right
is sent unmodified to
.Em both
hooks
.Dv left
and
.Dv right2left .
Similarly, all data received on
.Dv left
is sent unmodified to both
.Dv right
and
.Dv left2right .
.Pp
Packets may also be received on
.Dv right2left
and
.Dv left2right ;
if so, they are forwarded unchanged out hooks
.Dv left
and
.Dv right ,
respectively.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobarbarfoo
.It Dv right
The connection to the node on the right.
.It Dv left
The connection to the node on the left.
.It Dv right2left
Tap for right to left traffic.
.It Dv left2right
Tap for left to right traffic.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following.
.Bl -tag -width foo
.It Dv NGM_TEE_GET_STATS
Get statistics, returned as a
.Dv "struct ng_tee_stats" .
.It Dv NGM_TEE_CLR_STATS
Clear statistics.
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh SEE ALSO
.Xr tee 1 ,
.Xr netgraph 4 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Julian Elischer Aq julian@whistle.com

View File

@ -3,6 +3,6 @@
KMOD= ng_tty
SRCS= ng_tty.c
MAN8= ng_tty.8
MAN4= ng_tty.4
.include "${.CURDIR}/../../../conf/kmod.mk"

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_tty.8,v 1.5 1999/01/25 23:46:28 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_TTY 8
.Dt NG_TTY 4
.Os FreeBSD
.Sh NAME
.Nm ng_tty
@ -74,7 +74,7 @@ but introduces potentially infinite latency.
The default hot character is 0x7e, consistent with
.Dv hook
being connected to a
.Xr ng_async 8
.Xr ng_async 4
type node. The hot character has no effect on the transmission of data.
.Pp
The node will attempt to give itself the same netgraph name as the name
@ -128,8 +128,8 @@ serial driver, and sub-optimal performance may result.
.Xr ioctl 2 ,
.Xr netgraph 4 ,
.Xr tty 4 ,
.Xr ng_async 8 ,
.Xr ngctl 8 .
.Xr ng_async 4 ,
.Xr ngctl 8
.Sh HISTORY
The
.Nm

View File

@ -1,139 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_tty.8,v 1.5 1999/01/25 23:46:28 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_TTY 8
.Os FreeBSD
.Sh NAME
.Nm ng_tty
.Nd netgraph node type that is also a line discipline
.Sh SYNOPSIS
.Fd #include <sys/ttycom.h>
.Fd #include <netgraph/ng_message.h>
.Fd #include <netgraph/ng_tty.h>
.Sh DESCRIPTION
The
.Nm tty
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 ) .
.Pp
The node has a single hook called
.Dv hook .
Incoming bytes received on the tty device are sent out on this hook,
and frames received on
.Dv hook
are transmitted out on the tty device.
No modification to the data is performed in either direction.
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
.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.
The default hot character is 0x7e, consistent with
.Dv hook
being connected to a
.Xr ng_async 8
type node. The hot character has no effect on the transmission of data.
.Pp
The node will attempt to give itself the same netgraph name as the name
of the tty device.
In any case, information about the node is available via the netgraph
.Xr ioctl 2
command
.Dv NGIOCGINFO .
This command returns a
.Dv "struct nodeinfo"
similar to the
.Dv NGM_NODEINFO
netgraph control message.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobar
.It Dv hook
.Xr tty 4
serial data contained in
.Dv mbuf
structures, with arbitrary inter-frame boundaries.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_TTY_SET_HOTCHAR
This command takes an integer argument and sets the hot character
from the lower 8 bits. A hot character of zero disables queueing,
so that all received data is forwarded immediately.
.It Dv NGM_TTY_GET_HOTCHAR
Returns an integer containing the current hot character in the lower
eight bits.
.Sh SHUTDOWN
This node shuts down when the corresponding device is closed
(or the line discipline is uninstalled on the device).
The
.Dv NGM_SHUTDOWN
control message is not valid, and always returns the error
.Er EOPNOTSUPP .
.Sh BUGS
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
node, the node has no way to convey this information to the
serial driver, and sub-optimal performance may result.
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr netgraph 4 ,
.Xr tty 4 ,
.Xr ng_async 8 ,
.Xr ngctl 8 .
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com

View File

@ -3,7 +3,7 @@
KMOD= ng_vjc
SRCS= ng_vjc.c slcompress.c
MAN8= ng_vjc.8
MAN4= ng_vjc.4
.PATH: ${.CURDIR}/../../../net

View File

@ -36,7 +36,7 @@
.\" $Whistle: ng_vjc.8,v 1.4 1999/01/25 23:46:28 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_VJC 8
.Dt NG_VJC 4
.Os FreeBSD
.Sh NAME
.Nm ng_vjc
@ -78,7 +78,7 @@ Other non-TCP IP packets are forwarded unchanged to
.Dv vjip .
.Pp
When connecting to a
.Xr ng_ppp 8
.Xr ng_ppp 4
node, the
.Dv ip ,
.Dv vjuncomp ,
@ -86,7 +86,7 @@ node, the
and
.Dv vjip
hooks should be connected to the
.Xr ng_ppp 8
.Xr ng_ppp 4
node's
.Dv vjc_ip ,
.Dv vjc_vjcomp ,
@ -201,9 +201,9 @@ copies of the file do not interfere.
However, this may change in the future.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Xr ng_ppp 4 ,
.Xr ng_iface 4 ,
.Xr ngctl 8
.Rs
.%A V. Jacobsen
.%T "Compressing TCP/IP Headers"

View File

@ -1,223 +0,0 @@
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
.\" All rights reserved.
.\"
.\" Subject to the following obligations and disclaimer of warranty, use and
.\" redistribution of this software, in source or object code forms, with or
.\" without modifications are expressly permitted by Whistle Communications;
.\" provided, however, that:
.\" 1. Any and all reproductions of the source or object code must include the
.\" copyright notice above and the following disclaimer of warranties; and
.\" 2. No rights are granted, in any manner or form, to use Whistle
.\" Communications, Inc. trademarks, including the mark "WHISTLE
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
.\" such appears in the above copyright notice or in the software.
.\"
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" Author: Archie Cobbs <archie@whistle.com>
.\"
.\" $FreeBSD$
.\" $Whistle: ng_vjc.8,v 1.4 1999/01/25 23:46:28 archie Exp $
.\"
.Dd January 19, 1999
.Dt NG_VJC 8
.Os FreeBSD
.Sh NAME
.Nm ng_vjc
.Nd Van Jacobsen compression netgraph node type
.Sh SYNOPSIS
.Fd #include <net/slcompress.h>
.Fd #include <netgraph/ng_vjc.h>
.Sh DESCRIPTION
The
.Nm vjc
node type performs Van Jacobsen compression, which is used
over PPP, SLIP, and other point-to-point IP connections to
compress TCP packet headers. The
.Dv ip
hook represents the uncompressed side of the node, while the
.Dv vjcomp ,
.Dv vjuncomp ,
and
.Dv vjip
hooks 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
.Dq always pass through
mode in either direction.
.Pp
Van Jacobsen compression only applies to TCP packets.
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
compressed; these appear on the
.Dv vjuncomp
hook.
Other non-TCP IP packets are forwarded unchanged to
.Dv vjip .
.Pp
When connecting to a
.Xr ng_ppp 8
node, the
.Dv ip ,
.Dv vjuncomp ,
.Dv vjcomp ,
and
.Dv vjip
hooks should be connected to the
.Xr ng_ppp 8
node's
.Dv vjc_ip ,
.Dv vjc_vjcomp ,
.Dv vjc_vjuncomp ,
and
.Dv vjc_ip
hooks, respectively.
.Sh HOOKS
This node type supports the following hooks:
.Pp
.Bl -tag -width foobarbazi
.It Dv ip
Upstream (uncompressed) IP packets.
.It Dv vjcomp
Downstream compressed TCP packets.
.It Dv vjuncomp
Downstream uncompressed TCP packets.
.It Dv vjip
Downstream uncompressed IP packets.
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
.Bl -tag -width foo
.It Dv NGM_VJC_SET_CONFIG
This command resets the compression state and configures it according
to the supplied
.Dv "struct ngm_vjc_config"
argument. This structure contains the following fields:
.Bd -literal -offset 4n
struct ngm_vjc_config {
u_char enableComp; /* Enable compression */
u_char enableDecomp; /* Enable decompression */
u_char maxChannel; /* Number of outgoing channels - 1 */
u_char compressCID; /* OK to compress outgoing CID's */
};
.Ed
.Pp
When
.Dv enableComp
is set to zero, all packets received on the
.Dv ip
hook are forwarded unchanged out the
.Dv vjip
hook. Similarly, when
.Dv enableDecomp
is set to zero, all packets received on the
.Dv vjip
hook are forwarded unchanged out the
.Dv ip
hook, and packets are not accepted on the
.Dv vjcomp
and
.Dv vjuncomp
hooks.
When a node is first created,
both compression and decompression are disabled and the node is
therefore operating in bi-directional
.Dq pass through
mode.
.Pp
When enabling compression,
.Dv maxChannel
should be set to the number of outgoing compression channels minus one,
and is a value between 3 and 15, inclusive. The
.Dv compressCID
field indicates whether it is OK to compress the CID header field for
outgoing compressed TCP packets. This value should be zero unless
either (a) it is not possible for an outgoing frame to be lost, or
(b) lost frames can be reliably detected and immediately
reported to the peer's decompression engine (see
.Dv NGM_VJC_RECV_ERROR
below).
.It Dv NGM_VJC_GET_STATE
This command returns the node's current state described by the
.Dv "struct slcompress"
structure, which is defined in
.Pa net/slcompress.h .
.It Dv NGM_VJC_CLR_STATS
Clears the node statistics counters. Statistics are also cleared whenever the
.Dv enableComp
or
.Dv enableDecomp
fields are changed from zero to one by a
.Dv NGM_VJC_SET_CONFIG
control message.
.It Dv NGM_VJC_RECV_ERROR
When the peer has CID header field compression enabled,
this message must be sent to the local
.Nm vjc
node immediately
after detecting that a received frame has been lost, due to a bad
checksum or for any other reason. Failing to do this can result
in corrupted TCP stream data.
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
.Sh BUGS
Because the initialization routine in the kernel implementation of
Van Jacobsen compression initializes both compression and decompression
at once, this node does not allow compression and decompression to
be enabled in separate operations. In order to enable one when
the other is already enabled, first both must be disabled, then
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
.Pa net/slcompress.c .
Although loading the module should fail if
.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.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ng_ppp 8 ,
.Xr ng_iface 8 ,
.Xr ngctl 8 .
.Rs
.%A V. Jacobsen
.%T "Compressing TCP/IP Headers"
.%O RFC 1144
.Re
.Rs
.%A G. McGregor
.%T "The PPP Internet Control Protocol (IPCP)"
.%O RFC 1332
.Re
.Sh HISTORY
The
.Nm
node type was implemented in
.Fx 4.0 .
.Sh AUTHORS
.An Archie Cobbs Aq archie@whistle.com