1999-10-21 09:06:11 +00:00
|
|
|
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
|
|
|
|
.\" All rights reserved.
|
2001-07-14 19:41:16 +00:00
|
|
|
.\"
|
1999-10-21 09:06:11 +00:00
|
|
|
.\" 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.
|
2001-07-14 19:41:16 +00:00
|
|
|
.\"
|
1999-10-21 09:06:11 +00:00
|
|
|
.\" 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.
|
2001-07-14 19:41:16 +00:00
|
|
|
.\"
|
2000-10-26 15:30:44 +00:00
|
|
|
.\" Author: Archie Cobbs <archie@FreeBSD.org>
|
1999-10-21 09:06:11 +00:00
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $
|
|
|
|
.\"
|
2012-11-13 20:41:36 +00:00
|
|
|
.Dd November 13, 2012
|
2000-05-04 17:54:37 +00:00
|
|
|
.Dt NG_PPP 4
|
2001-07-10 15:31:11 +00:00
|
|
|
.Os
|
1999-10-21 09:06:11 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ng_ppp
|
1999-10-29 22:30:26 +00:00
|
|
|
.Nd PPP protocol netgraph node type
|
1999-10-21 09:06:11 +00:00
|
|
|
.Sh SYNOPSIS
|
2005-02-05 11:31:31 +00:00
|
|
|
.In sys/types.h
|
2001-10-01 16:09:29 +00:00
|
|
|
.In netgraph/ng_ppp.h
|
1999-10-21 09:06:11 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm ppp
|
2003-06-28 23:53:39 +00:00
|
|
|
node type performs multiplexing for the PPP protocol.
|
|
|
|
It handles only packets that contain data, and forwards protocol negotiation
|
1999-10-29 22:30:26 +00:00
|
|
|
and control packets to a separate controlling entity (e.g., a
|
2003-06-28 23:53:39 +00:00
|
|
|
user-land daemon).
|
|
|
|
This approach combines the fast dispatch of
|
1999-10-29 22:30:26 +00:00
|
|
|
kernel implementations with the configuration flexibility of a
|
2003-06-28 23:53:39 +00:00
|
|
|
user-land implementations.
|
|
|
|
The PPP node type directly supports
|
2000-08-05 20:17:04 +00:00
|
|
|
multi-link PPP, Van Jacobson compression, PPP compression, PPP
|
2003-06-28 23:53:39 +00:00
|
|
|
encryption, and the IP, IPX, and AppleTalk protocols.
|
|
|
|
A single PPP node corresponds to one PPP multi-link bundle.
|
1999-11-08 03:13:28 +00:00
|
|
|
.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
|
2003-06-28 23:53:39 +00:00
|
|
|
to do the actual work.
|
|
|
|
The node type used will of course depend on the algorithm negotiated.
|
|
|
|
There is also a
|
1999-11-08 03:13:28 +00:00
|
|
|
.Dv bypass
|
|
|
|
hook which is used to handle any protocol not directly supported
|
2003-06-28 23:53:39 +00:00
|
|
|
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
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_socket 4
|
1999-11-08 03:13:28 +00:00
|
|
|
type node.
|
1999-10-29 22:30:26 +00:00
|
|
|
.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.
|
1999-11-08 03:13:28 +00:00
|
|
|
When a link is connected but disabled, traffic can still flow on
|
|
|
|
the link via the
|
|
|
|
.Dv bypass
|
|
|
|
hook (see below).
|
1999-10-29 22:30:26 +00:00
|
|
|
.Sh LINK HOOKS
|
|
|
|
During normal operation, the individual PPP links are connected to hooks
|
|
|
|
.Dv link0 ,
|
|
|
|
.Dv link1 ,
|
2004-07-03 18:29:24 +00:00
|
|
|
etc.
|
|
|
|
Up to
|
1999-10-29 22:30:26 +00:00
|
|
|
.Dv NG_PPP_MAX_LINKS
|
|
|
|
links are supported.
|
|
|
|
These device-independent hooks transmit and receive full PPP
|
1999-11-10 06:17:51 +00:00
|
|
|
frames, which include the PPP protocol, address, control, and
|
|
|
|
information fields, but no checksum or other link-specific fields.
|
|
|
|
.Pp
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
2003-06-28 23:53:39 +00:00
|
|
|
instead of two).
|
|
|
|
Either compressed or uncompressed protocol fields
|
|
|
|
are accepted on incoming frames.
|
|
|
|
Similarly, if address and control
|
1999-11-10 06:17:51 +00:00
|
|
|
field compression has been enabled for the link, the address and
|
|
|
|
control fields will be omitted (except for LCP frames as required
|
2003-06-28 23:53:39 +00:00
|
|
|
by the standards).
|
|
|
|
Incoming frames have the address and control fields
|
1999-11-10 06:17:51 +00:00
|
|
|
stripped automatically if present.
|
1999-10-21 09:06:11 +00:00
|
|
|
.Pp
|
1999-10-29 22:30:26 +00:00
|
|
|
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.
|
1999-11-08 03:13:28 +00:00
|
|
|
.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
|
2003-06-28 23:53:39 +00:00
|
|
|
hook as well.
|
|
|
|
This mode is appropriate for the link authentication phase.
|
1999-11-08 03:13:28 +00:00
|
|
|
As soon as the link is enabled, the PPP node will
|
|
|
|
begin processing frames received on the link.
|
1999-10-29 22:30:26 +00:00
|
|
|
.Sh COMPRESSION AND ENCRYPTION
|
|
|
|
Compression is supported via two hooks,
|
|
|
|
.Dv compress
|
|
|
|
and
|
|
|
|
.Dv decompress .
|
2012-03-29 05:02:12 +00:00
|
|
|
Compression and decompression can be enabled by toggling the
|
2007-01-09 15:00:01 +00:00
|
|
|
.Vt enableCompression
|
2012-03-29 05:02:12 +00:00
|
|
|
and
|
2007-01-09 15:00:01 +00:00
|
|
|
.Vt enableDecompression
|
|
|
|
fields of the node configuration structure.
|
|
|
|
(See below.)
|
|
|
|
If
|
|
|
|
.Vt enableCompression
|
|
|
|
is set to
|
|
|
|
.Dv NG_PPP_COMPRESS_SIMPLE ,
|
|
|
|
then all outgoing frames are sent to the
|
2012-03-29 05:02:12 +00:00
|
|
|
.Dv compress
|
2007-01-09 15:00:01 +00:00
|
|
|
hook and all packets received on this hook are expected to be
|
|
|
|
compressed, so the COMPD tag is put on them unconditionally.
|
|
|
|
If
|
|
|
|
.Vt enableCompression
|
|
|
|
is set to
|
|
|
|
.Dv NG_PPP_COMPRESS_FULL ,
|
2012-03-29 05:02:12 +00:00
|
|
|
then packets received on the
|
|
|
|
.Dv compress
|
2007-01-09 15:00:01 +00:00
|
|
|
hook are resent as is.
|
|
|
|
The compressor node should put the tag, if the packet was compressed.
|
2012-03-29 05:02:12 +00:00
|
|
|
If
|
2007-01-09 15:00:01 +00:00
|
|
|
.Vt enableDecompression
|
2012-03-29 05:02:12 +00:00
|
|
|
is set to
|
2007-01-09 15:00:01 +00:00
|
|
|
.Dv NG_PPP_DECOMPRESS_SIMPLE ,
|
|
|
|
then the node will sent to the
|
2012-03-29 05:02:12 +00:00
|
|
|
.Dv decompress
|
2007-01-09 15:00:01 +00:00
|
|
|
hook only those frames, that are marked with the COMPD tag.
|
|
|
|
If
|
|
|
|
.Vt enableDecompression
|
|
|
|
is set to
|
|
|
|
.Dv NG_PPP_DECOMPRESS_FULL ,
|
|
|
|
then the node will sent all incoming packets to the
|
1999-10-29 22:30:26 +00:00
|
|
|
.Dv decompress
|
2007-01-09 15:00:01 +00:00
|
|
|
hook.
|
|
|
|
Compression and decompression can be completely disabled by setting the
|
|
|
|
.Vt enableCompression
|
|
|
|
and
|
|
|
|
.Vt enableDecompression
|
|
|
|
fields to the
|
|
|
|
.Dv NG_PPP_COMPRESS_NONE
|
|
|
|
and
|
|
|
|
.Dv NG_PPP_DECOMPRESS_NONE ,
|
|
|
|
respectively.
|
1999-10-29 22:30:26 +00:00
|
|
|
.Pp
|
|
|
|
Encryption works exactly analogously via the
|
|
|
|
.Dv encrypt
|
|
|
|
and
|
|
|
|
.Dv decrypt
|
2003-06-28 23:53:39 +00:00
|
|
|
nodes.
|
|
|
|
Data is always compressed before being encrypted,
|
1999-10-29 22:30:26 +00:00
|
|
|
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.
|
2000-08-06 19:25:59 +00:00
|
|
|
.Sh VAN JACOBSON COMPRESSION
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
2000-08-05 20:17:04 +00:00
|
|
|
enabled, Van Jacobson compression and/or decompression will become active.
|
1999-10-29 22:30:26 +00:00
|
|
|
Normally these hooks connect to the corresponding hooks of a single
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
2004-07-03 18:29:24 +00:00
|
|
|
node.
|
|
|
|
The PPP node is compatible with the
|
1999-12-21 01:25:21 +00:00
|
|
|
.Dq pass through
|
|
|
|
modes of the
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
1999-10-21 09:06:11 +00:00
|
|
|
.Dv bypass
|
2003-06-28 23:53:39 +00:00
|
|
|
hook, prepended with a four byte prefix.
|
|
|
|
This first two bytes of
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
2004-07-03 18:29:24 +00:00
|
|
|
is used.
|
|
|
|
After the two byte link number is the two byte PPP protocol number
|
1999-10-29 22:30:26 +00:00
|
|
|
(also in network order).
|
|
|
|
The PPP protocol number is two bytes long even if the original frame
|
|
|
|
was protocol compressed.
|
1999-10-21 09:06:11 +00:00
|
|
|
.Pp
|
1999-10-29 22:30:26 +00:00
|
|
|
Conversely, any data written to the
|
1999-10-21 09:06:11 +00:00
|
|
|
.Dv bypass
|
2003-06-28 23:53:39 +00:00
|
|
|
hook is assumed to be in this same format.
|
|
|
|
The four byte header is
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
2000-10-10 20:07:11 +00:00
|
|
|
Typically when the controlling entity receives an unexpected packet on the
|
|
|
|
.Dv bypass
|
2005-02-13 23:45:54 +00:00
|
|
|
hook it responds either by dropping the frame (if it is not ready for
|
2005-02-13 22:25:33 +00:00
|
|
|
the protocol) or with an LCP protocol reject (if it does not recognize
|
1999-10-29 22:30:26 +00:00
|
|
|
or expect the protocol).
|
|
|
|
.Sh MULTILINK OPERATION
|
|
|
|
To enable multi-link PPP, the corresponding configuration flag must be set
|
2003-06-28 23:53:39 +00:00
|
|
|
and at least one link connected.
|
|
|
|
The PPP node will not allow more than
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
2003-06-28 23:53:39 +00:00
|
|
|
Since packets are sent as fragments across multiple individual links,
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
1999-10-30 20:30:19 +00:00
|
|
|
milliseconds) and bandwidth (specified in tens of bytes per second).
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
2003-06-28 23:53:39 +00:00
|
|
|
bundle.
|
|
|
|
This scheme has the advantage that even if one link fails
|
|
|
|
silently, some packets will still get through.
|
|
|
|
It has the disadvantage
|
1999-10-29 22:30:26 +00:00
|
|
|
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
|
2003-06-28 23:53:39 +00:00
|
|
|
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
|
1999-10-29 22:30:26 +00:00
|
|
|
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.
|
1999-10-21 09:06:11 +00:00
|
|
|
.Sh HOOKS
|
|
|
|
This node type supports the following hooks:
|
2012-11-13 20:41:36 +00:00
|
|
|
.Bl -tag -width ".Va vjc_vjuncomp"
|
|
|
|
.It Va link<N>
|
1999-10-29 22:30:26 +00:00
|
|
|
Individual PPP link number
|
|
|
|
.Dv <N>
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va compress
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to compression engine
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va decompress
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to decompression engine
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va encrypt
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to encryption engine
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va decrypt
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to decryption engine
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va vjc_ip
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
1999-10-29 22:30:26 +00:00
|
|
|
.Dv ip
|
|
|
|
hook
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va vjc_vjcomp
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
1999-10-29 22:30:26 +00:00
|
|
|
.Dv vjcomp
|
|
|
|
hook
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va vjc_vjuncomp
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
1999-10-29 22:30:26 +00:00
|
|
|
.Dv vjuncomp
|
|
|
|
hook
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va vjc_vjip
|
1999-10-29 22:30:26 +00:00
|
|
|
Connection to
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
1999-10-29 22:30:26 +00:00
|
|
|
.Dv vjip
|
|
|
|
hook
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va inet
|
1999-10-29 22:30:26 +00:00
|
|
|
IP packet data
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va ipv6
|
2012-09-24 08:32:19 +00:00
|
|
|
IPv6 packet data
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va atalk
|
1999-10-29 22:30:26 +00:00
|
|
|
AppleTalk packet data
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va ipx
|
1999-10-29 22:30:26 +00:00
|
|
|
IPX packet data
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va bypass
|
1999-10-29 22:30:26 +00:00
|
|
|
Bypass hook; frames have a four byte header consisting of
|
|
|
|
a link number and a PPP protocol number.
|
1999-10-21 09:06:11 +00:00
|
|
|
.El
|
|
|
|
.Sh CONTROL MESSAGES
|
|
|
|
This node type supports the generic control messages, plus the following:
|
|
|
|
.Bl -tag -width foo
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPP_SET_CONFIG Pq Ic setconfig
|
2003-06-28 23:53:39 +00:00
|
|
|
This command configures all aspects of the node.
|
|
|
|
This includes enabling
|
2000-08-05 20:17:04 +00:00
|
|
|
multi-link PPP, encryption, compression, Van Jacobson compression, and IP,
|
2004-08-03 06:31:30 +00:00
|
|
|
IPv6, AppleTalk, and IPX packet delivery.
|
2003-06-28 23:53:39 +00:00
|
|
|
It includes per-link configuration,
|
1999-10-29 22:30:26 +00:00
|
|
|
including enabling the link, setting latency and bandwidth parameters,
|
2003-06-28 23:53:39 +00:00
|
|
|
and enabling protocol field compression.
|
|
|
|
Note that no link or functionality
|
1999-10-29 22:30:26 +00:00
|
|
|
is active until the corresponding hook is also connected.
|
|
|
|
This command takes a
|
2004-08-03 06:31:30 +00:00
|
|
|
.Dv "struct ng_ppp_node_conf"
|
1999-11-10 06:17:51 +00:00
|
|
|
as an argument:
|
2001-03-09 16:22:37 +00:00
|
|
|
.Bd -literal -offset 0n
|
1999-11-10 06:17:51 +00:00
|
|
|
/* Per-link config structure */
|
2004-08-03 06:31:30 +00:00
|
|
|
struct ng_ppp_link_conf {
|
1999-11-10 06:17:51 +00:00
|
|
|
u_char enableLink; /* enable this link */
|
|
|
|
u_char enableProtoComp;/* enable protocol field compression */
|
|
|
|
u_char enableACFComp; /* enable addr/ctrl field compression */
|
2012-02-12 18:29:56 +00:00
|
|
|
uint16_t mru; /* peer MRU */
|
|
|
|
uint32_t latency; /* link latency (in milliseconds) */
|
2012-11-13 20:41:36 +00:00
|
|
|
uint32_t bandwidth; /* link bandwidth (in bytes/sec/10) */
|
1999-11-10 06:17:51 +00:00
|
|
|
};
|
|
|
|
|
2004-08-03 06:31:30 +00:00
|
|
|
/* Bundle config structure */
|
|
|
|
struct ng_ppp_bund_conf {
|
2012-02-12 18:29:56 +00:00
|
|
|
uint16_t mrru; /* multilink peer MRRU */
|
1999-11-10 06:17:51 +00:00
|
|
|
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 */
|
2004-08-03 06:31:30 +00:00
|
|
|
u_char enableIPv6; /* enable IPv6 data flow */
|
1999-11-10 06:17:51 +00:00
|
|
|
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 */
|
2004-08-03 06:31:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ng_ppp_node_conf {
|
|
|
|
struct ng_ppp_bund_conf bund;
|
|
|
|
struct ng_ppp_link_conf links[NG_PPP_MAX_LINKS];
|
1999-11-10 06:17:51 +00:00
|
|
|
};
|
|
|
|
.Ed
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPP_GET_CONFIG Pq Ic getconfig
|
1999-10-29 22:30:26 +00:00
|
|
|
Returns the current configuration as a
|
2004-08-03 06:31:30 +00:00
|
|
|
.Dv "struct ng_ppp_node_conf" .
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPP_GET_LINK_STATS Pq Ic getstats
|
1999-10-29 22:30:26 +00:00
|
|
|
This command takes a two byte link number as an argument and returns a
|
|
|
|
.Dv "struct ng_ppp_link_stat"
|
2004-07-03 18:29:24 +00:00
|
|
|
containing statistics for the corresponding link.
|
|
|
|
Here
|
1999-10-29 22:30:26 +00:00
|
|
|
.Dv NG_PPP_BUNDLE_LINKNUM
|
|
|
|
is a valid link number corresponding to the multi-link bundle.
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPP_GET_LINK_STATS64 Pq Ic getstats64
|
2012-03-29 05:02:12 +00:00
|
|
|
Same as NGM_PPP_GET_LINK_STATS but returns
|
2007-08-01 20:49:35 +00:00
|
|
|
.Dv "struct ng_ppp_link_stat64"
|
|
|
|
containing 64bit counters.
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPP_CLR_LINK_STATS Pq Ic clrstats
|
1999-10-29 22:30:26 +00:00
|
|
|
This command takes a two byte link number as an argument and
|
1999-11-08 03:13:28 +00:00
|
|
|
clears the statistics for that link.
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPP_GETCLR_LINK_STATS Pq Ic getclrstats
|
1999-11-08 03:13:28 +00:00
|
|
|
Same as
|
|
|
|
.Dv NGM_PPP_GET_LINK_STATS ,
|
|
|
|
but also atomically clears the statistics as well.
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPP_GETCLR_LINK_STATS64 Pq Ic getclrstats64
|
2012-03-29 05:02:12 +00:00
|
|
|
Same as NGM_PPP_GETCLR_LINK_STATS but returns
|
2007-08-01 20:49:35 +00:00
|
|
|
.Dv "struct ng_ppp_link_stat64"
|
|
|
|
containing 64bit counters.
|
1999-10-29 22:30:26 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
This node type also accepts the control messages accepted by the
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
2004-07-03 18:29:24 +00:00
|
|
|
node type.
|
|
|
|
When received, these messages are simply forwarded to
|
1999-10-29 22:30:26 +00:00
|
|
|
the adjacent
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
2004-07-03 18:29:24 +00:00
|
|
|
node, if any.
|
|
|
|
This is particularly useful when the individual
|
1999-11-10 06:17:51 +00:00
|
|
|
PPP links are able to generate
|
|
|
|
.Dv NGM_VJC_RECV_ERROR
|
|
|
|
messages (see
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_vjc 4
|
1999-11-10 06:17:51 +00:00
|
|
|
for a description).
|
1999-10-21 09:06:11 +00:00
|
|
|
.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 ,
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_async 4 ,
|
|
|
|
.Xr ng_iface 4 ,
|
|
|
|
.Xr ng_mppc 4 ,
|
|
|
|
.Xr ng_pppoe 4 ,
|
|
|
|
.Xr ng_vjc 4 ,
|
|
|
|
.Xr ngctl 8
|
1999-10-21 09:06:11 +00:00
|
|
|
.Rs
|
|
|
|
.%A W. Simpson
|
|
|
|
.%T "The Point-to-Point Protocol (PPP)"
|
|
|
|
.%O RFC 1661
|
|
|
|
.Re
|
1999-10-29 22:30:26 +00:00
|
|
|
.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
|
1999-12-21 01:25:21 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
node type was implemented in
|
|
|
|
.Fx 4.0 .
|
|
|
|
.Sh AUTHORS
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Archie Cobbs Aq Mt archie@FreeBSD.org
|