14cf49a43SJulian Elischer.\" Copyright (c) 1996-1999 Whistle Communications, Inc. 24cf49a43SJulian Elischer.\" All rights reserved. 34cf49a43SJulian Elischer.\" 44cf49a43SJulian Elischer.\" Subject to the following obligations and disclaimer of warranty, use and 54cf49a43SJulian Elischer.\" redistribution of this software, in source or object code forms, with or 64cf49a43SJulian Elischer.\" without modifications are expressly permitted by Whistle Communications; 74cf49a43SJulian Elischer.\" provided, however, that: 84cf49a43SJulian Elischer.\" 1. Any and all reproductions of the source or object code must include the 94cf49a43SJulian Elischer.\" copyright notice above and the following disclaimer of warranties; and 104cf49a43SJulian Elischer.\" 2. No rights are granted, in any manner or form, to use Whistle 114cf49a43SJulian Elischer.\" Communications, Inc. trademarks, including the mark "WHISTLE 124cf49a43SJulian Elischer.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as 134cf49a43SJulian Elischer.\" such appears in the above copyright notice or in the software. 144cf49a43SJulian Elischer.\" 154cf49a43SJulian Elischer.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 164cf49a43SJulian Elischer.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 174cf49a43SJulian Elischer.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 184cf49a43SJulian Elischer.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 194cf49a43SJulian Elischer.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 204cf49a43SJulian Elischer.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 214cf49a43SJulian Elischer.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 224cf49a43SJulian Elischer.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 234cf49a43SJulian Elischer.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 244cf49a43SJulian Elischer.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 254cf49a43SJulian Elischer.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 264cf49a43SJulian Elischer.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 274cf49a43SJulian Elischer.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 284cf49a43SJulian Elischer.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 294cf49a43SJulian Elischer.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 304cf49a43SJulian Elischer.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 314cf49a43SJulian Elischer.\" OF SUCH DAMAGE. 324cf49a43SJulian Elischer.\" 334cf49a43SJulian Elischer.\" Author: Archie Cobbs <archie@whistle.com> 344cf49a43SJulian Elischer.\" 354cf49a43SJulian Elischer.\" $FreeBSD$ 364cf49a43SJulian Elischer.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $ 374cf49a43SJulian Elischer.\" 384cf49a43SJulian Elischer.Dd January 19, 1999 39bec35b9aSArchie Cobbs.Dt NG_PPP 4 4010c2a9dbSArchie Cobbs.Os FreeBSD 414cf49a43SJulian Elischer.Sh NAME 424cf49a43SJulian Elischer.Nm ng_ppp 4310c2a9dbSArchie Cobbs.Nd PPP protocol netgraph node type 444cf49a43SJulian Elischer.Sh SYNOPSIS 454cf49a43SJulian Elischer.Fd #include <netgraph/ng_ppp.h> 464cf49a43SJulian Elischer.Sh DESCRIPTION 474cf49a43SJulian ElischerThe 484cf49a43SJulian Elischer.Nm ppp 4910c2a9dbSArchie Cobbsnode type performs multiplexing for the PPP protocol. It handles 5010c2a9dbSArchie Cobbsonly packets that contain data, and forwards protocol negotiation 5110c2a9dbSArchie Cobbsand control packets to a separate controlling entity (e.g., a 5210c2a9dbSArchie Cobbsuser-land daemon). This approach combines the fast dispatch of 5310c2a9dbSArchie Cobbskernel implementations with the configuration flexibility of a 54d1f183b5SArchie Cobbsuser-land implementations. The PPP node type directly supports 559dcab530SArchie Cobbsmulti-link PPP, Van Jacobson compression, PPP compression, PPP 56d1f183b5SArchie Cobbsencryption, and the IP, IPX, and AppleTalk protocols. A single 57d1f183b5SArchie CobbsPPP node corresponds to one PPP multi-link bundle. 58d1f183b5SArchie Cobbs.Pp 59d1f183b5SArchie CobbsThere is a separate hook for each PPP link in the bundle, plus 60d1f183b5SArchie Cobbsseveral hooks corresponding to the directly supported protocols. 61d1f183b5SArchie CobbsFor compression and encryption, separate attached nodes are required 62d1f183b5SArchie Cobbsto do the actual work. The node type used will of course depend 63d1f183b5SArchie Cobbson the algorithm negotiated. There is also a 64d1f183b5SArchie Cobbs.Dv bypass 65d1f183b5SArchie Cobbshook which is used to handle any protocol not directly supported 66d1f183b5SArchie Cobbsby the node. This includes all of the control protocols: LCP, IPCP, 67d1f183b5SArchie CobbsCCP, etc. Typically this node is connected to a user-land daemon 68d1f183b5SArchie Cobbsvia a 69bec35b9aSArchie Cobbs.Xr ng_socket 4 70d1f183b5SArchie Cobbstype node. 7110c2a9dbSArchie Cobbs.Sh ENABLING FUNCTIONALITY 7210c2a9dbSArchie CobbsIn general, the PPP node enables a specific link or functionality when 7310c2a9dbSArchie Cobbs(a) a 7410c2a9dbSArchie Cobbs.Dv NGM_PPP_SET_CONFIG 7510c2a9dbSArchie Cobbsmessage has been received which enables it, and 7610c2a9dbSArchie Cobbs(b) the corresponding hook(s) are connected. 7710c2a9dbSArchie CobbsThis allows the controlling entity to use either method (a) or (b) 7810c2a9dbSArchie Cobbs(or both) to control the node's behavior. 79d1f183b5SArchie CobbsWhen a link is connected but disabled, traffic can still flow on 80d1f183b5SArchie Cobbsthe link via the 81d1f183b5SArchie Cobbs.Dv bypass 82d1f183b5SArchie Cobbshook (see below). 8310c2a9dbSArchie Cobbs.Sh LINK HOOKS 8410c2a9dbSArchie CobbsDuring normal operation, the individual PPP links are connected to hooks 8510c2a9dbSArchie Cobbs.Dv link0 , 8610c2a9dbSArchie Cobbs.Dv link1 , 8710c2a9dbSArchie Cobbsetc. Up to 8810c2a9dbSArchie Cobbs.Dv NG_PPP_MAX_LINKS 8910c2a9dbSArchie Cobbslinks are supported. 9010c2a9dbSArchie CobbsThese device-independent hooks transmit and receive full PPP 9171cb548dSArchie Cobbsframes, which include the PPP protocol, address, control, and 9271cb548dSArchie Cobbsinformation fields, but no checksum or other link-specific fields. 9371cb548dSArchie Cobbs.Pp 9410c2a9dbSArchie CobbsOn outgoing frames, when protocol compression 9510c2a9dbSArchie Cobbshas been enabled and the protocol number is suitable for compression, 9610c2a9dbSArchie Cobbsthe protocol field will be compressed (i.e., sent as one byte 9710c2a9dbSArchie Cobbsinstead of two). Either compressed or uncompressed protocol fields 9871cb548dSArchie Cobbsare accepted on incoming frames. Similarly, if address and control 9971cb548dSArchie Cobbsfield compression has been enabled for the link, the address and 10071cb548dSArchie Cobbscontrol fields will be omitted (except for LCP frames as required 10171cb548dSArchie Cobbsby the standards). Incoming frames have the address and control fields 10271cb548dSArchie Cobbsstripped automatically if present. 1034cf49a43SJulian Elischer.Pp 10410c2a9dbSArchie CobbsSince all negotiation is handled outside the PPP node, the links 10510c2a9dbSArchie Cobbsshould not be connected and enabled until the corresponding link 10610c2a9dbSArchie Cobbshas reached the network phase (i.e., LCP negotiation and authentication 10710c2a9dbSArchie Cobbshave completed successfully) and the PPP node has been informed of 10810c2a9dbSArchie Cobbsthe link parameters via the 10910c2a9dbSArchie Cobbs.Dv NGM_PPP_LINK_CONFIG 11010c2a9dbSArchie Cobbsmessage. 111d1f183b5SArchie Cobbs.Pp 112d1f183b5SArchie CobbsWhen a link is connected but disabled, all received frames are forwarded 113d1f183b5SArchie Cobbsdirectly out the 114d1f183b5SArchie Cobbs.Dv bypass 115d1f183b5SArchie Cobbshook, and conversely, frames may be transmitted via the 116d1f183b5SArchie Cobbs.Dv bypass 117d1f183b5SArchie Cobbshook as well. This mode is appropriate for the link authentication phase. 118d1f183b5SArchie CobbsAs soon as the link is enabled, the PPP node will 119d1f183b5SArchie Cobbsbegin processing frames received on the link. 12010c2a9dbSArchie Cobbs.Sh COMPRESSION AND ENCRYPTION 12110c2a9dbSArchie CobbsCompression is supported via two hooks, 12210c2a9dbSArchie Cobbs.Dv compress 12310c2a9dbSArchie Cobbsand 12410c2a9dbSArchie Cobbs.Dv decompress . 12510c2a9dbSArchie CobbsWhen enabled and connected, the PPP node writes outgoing frames on the 12610c2a9dbSArchie Cobbs.Dv comp 12710c2a9dbSArchie Cobbshook and expects to receive back the compressed frame on the same hook. 12810c2a9dbSArchie CobbsSimilarly, the 12910c2a9dbSArchie Cobbs.Dv decompress 13010c2a9dbSArchie Cobbshook is used to uncompress incoming frames when decompression is 1317f9d26bdSMike Pritchardnegotiated (compression and decompression are independently negotiable). 13210c2a9dbSArchie CobbsThe type of node attached to these hooks should correspond 13310c2a9dbSArchie Cobbsto the type of compression negotiated, e.g., Deflate, Predictor-1, etc. 13410c2a9dbSArchie Cobbs.Pp 13510c2a9dbSArchie CobbsEncryption works exactly analogously via the 13610c2a9dbSArchie Cobbs.Dv encrypt 13710c2a9dbSArchie Cobbsand 13810c2a9dbSArchie Cobbs.Dv decrypt 13910c2a9dbSArchie Cobbsnodes. Data is always compressed before being encrypted, 14010c2a9dbSArchie Cobbsand decrypted before being decompressed. 14110c2a9dbSArchie Cobbs.Pp 14210c2a9dbSArchie CobbsOnly bundle-level compression and encryption is directly supported; 14310c2a9dbSArchie Cobbslink-level compression and encryption can be handled transparently 14410c2a9dbSArchie Cobbsby downstream nodes. 14510c2a9dbSArchie Cobbs.Sh VAN JACOBSEN COMPRESSION 14610c2a9dbSArchie CobbsWhen all of the 14710c2a9dbSArchie Cobbs.Dv vjc_ip , 14810c2a9dbSArchie Cobbs.Dv vjc_vjcomp , 14910c2a9dbSArchie Cobbs.Dv vjc_vjuncomp , 15010c2a9dbSArchie Cobbsand 15110c2a9dbSArchie Cobbs.Dv vjc_vjip 15210c2a9dbSArchie Cobbshooks are connected, and the corresponding configuration flag is 1539dcab530SArchie Cobbsenabled, Van Jacobson compression and/or decompression will become active. 15410c2a9dbSArchie CobbsNormally these hooks connect to the corresponding hooks of a single 155bec35b9aSArchie Cobbs.Xr ng_vjc 4 15651291597SJulian Elischernode. The PPP node is compatible with the 15751291597SJulian Elischer.Dq pass through 15851291597SJulian Elischermodes of the 159bec35b9aSArchie Cobbs.Xr ng_vjc 4 16010c2a9dbSArchie Cobbsnode type. 16110c2a9dbSArchie Cobbs.Sh BYPASS HOOK 16210c2a9dbSArchie CobbsWhen a frame is received on a link with an unsupported protocol, 16310c2a9dbSArchie Cobbsor a protocol which is disabled or for which the corresponding hook 16410c2a9dbSArchie Cobbsis unconnected, the PPP node forwards the frame out the 1654cf49a43SJulian Elischer.Dv bypass 16610c2a9dbSArchie Cobbshook, prepended with a four byte prefix. This first two bytes of 16710c2a9dbSArchie Cobbsthe prefix indicate the link number on which the frame was received 16810c2a9dbSArchie Cobbs(in network order). 16910c2a9dbSArchie CobbsFor such frames received over the bundle (i.e., encapsulated in the 17010c2a9dbSArchie Cobbsmulti-link protocol), the special link number 17110c2a9dbSArchie Cobbs.Dv NG_PPP_BUNDLE_LINKNUM 17210c2a9dbSArchie Cobbsis used. After the two byte link number is the two byte PPP protocol number 17310c2a9dbSArchie Cobbs(also in network order). 17410c2a9dbSArchie CobbsThe PPP protocol number is two bytes long even if the original frame 17510c2a9dbSArchie Cobbswas protocol compressed. 1764cf49a43SJulian Elischer.Pp 17710c2a9dbSArchie CobbsConversely, any data written to the 1784cf49a43SJulian Elischer.Dv bypass 17910c2a9dbSArchie Cobbshook is assumed to be in this same format. The four byte header is 18010c2a9dbSArchie Cobbsstripped off, the PPP protocol number is prepended (possibly compressed), 18110c2a9dbSArchie Cobbsand the frame is delivered over the desired link. 18210c2a9dbSArchie CobbsIf the link number is 18310c2a9dbSArchie Cobbs.Dv NG_PPP_BUNDLE_LINKNUM 18410c2a9dbSArchie Cobbsthe frame will be delivered over the multi-link bundle; or, if multi-link 18510c2a9dbSArchie Cobbsis disabled, over the (single) PPP link. 18610c2a9dbSArchie Cobbs.Pp 18710c2a9dbSArchie CobbsTypically when the controlling entity receives a packet on the bypass 18810c2a9dbSArchie Cobbshook it responds either by dropping the frame (if it's not ready for 18910c2a9dbSArchie Cobbsthe protocol) or with an LCP protocol reject (if it doesn't recognize 19010c2a9dbSArchie Cobbsor expect the protocol). 19110c2a9dbSArchie Cobbs.Sh MULTILINK OPERATION 19210c2a9dbSArchie CobbsTo enable multi-link PPP, the corresponding configuration flag must be set 19310c2a9dbSArchie Cobbsand at least one link connected. The PPP node will not allow more than 19410c2a9dbSArchie Cobbsone link to be connected if multi-link is not enabled, nor will it allow 19510c2a9dbSArchie Cobbscertain multi-link settings to be changed while multi-link operation is 19610c2a9dbSArchie Cobbsactive (e.g., short sequence number header format). 19710c2a9dbSArchie Cobbs.Pp 19810c2a9dbSArchie CobbsBecause packets are sent as fragments across multiple individual links, 19910c2a9dbSArchie Cobbsit is important that when a link goes down the PPP node is notified 20010c2a9dbSArchie Cobbsimmediately, either by disconnecting the corresponding hook or disabling 20110c2a9dbSArchie Cobbsthe link via the 20210c2a9dbSArchie Cobbs.Dv NGM_PPP_SET_CONFIG 20310c2a9dbSArchie Cobbscontrol message. 20410c2a9dbSArchie Cobbs.Pp 20510c2a9dbSArchie CobbsEach link has configuration parameters for latency (specified in 2067f9d26bdSMike Pritchardmilliseconds) and bandwidth (specified in tens of bytes per second). 20710c2a9dbSArchie CobbsThe PPP node can be configured for 20810c2a9dbSArchie Cobbs.Em round-robin 20910c2a9dbSArchie Cobbsor 21010c2a9dbSArchie Cobbs.Em optimized 21110c2a9dbSArchie Cobbspacket delivery. 21210c2a9dbSArchie Cobbs.Pp 21310c2a9dbSArchie CobbsWhen configured for round-robin delivery, the latency and bandwidth 21410c2a9dbSArchie Cobbsvalues are ignored and the PPP node simply sends each frame as a 21510c2a9dbSArchie Cobbssingle fragment, alternating frames across all the links in the 21610c2a9dbSArchie Cobbsbundle. This scheme has the advantage that even if one link fails 21710c2a9dbSArchie Cobbssilently, some packets will still get through. It has the disadvantage 21810c2a9dbSArchie Cobbsof sub-optimal overall bundle latency, which is important for 21910c2a9dbSArchie Cobbsinteractive response time, and sub-optimal overall bundle bandwidth 22010c2a9dbSArchie Cobbswhen links with different bandwidths exist in the same bundle. 22110c2a9dbSArchie Cobbs.Pp 22210c2a9dbSArchie CobbsWhen configured for optimal delivery, the PPP node distributes the 22310c2a9dbSArchie Cobbspacket across the links in a way that minimizes the time it takes 22410c2a9dbSArchie Cobbsfor the completed packet to be received by the far end. This 2257f9d26bdSMike Pritchardinvolves taking into account each link's latency, bandwidth, and 22610c2a9dbSArchie Cobbscurrent queue length. Therefore these numbers should be 22710c2a9dbSArchie Cobbsconfigured as accurately as possible. The algorithm does require 22810c2a9dbSArchie Cobbssome computation, so may not be appropriate for very slow machines 22910c2a9dbSArchie Cobbsand/or very fast links. 23010c2a9dbSArchie Cobbs.Pp 23110c2a9dbSArchie CobbsAs a special case, if all links have identical latency and bandwidth, 23210c2a9dbSArchie Cobbsthen the above algorithm is disabled (because it is unnecessary) 23310c2a9dbSArchie Cobbsand the PPP node simply fragments frames into equal sized portions 23410c2a9dbSArchie Cobbsacross all of the links. 2354cf49a43SJulian Elischer.Sh HOOKS 2364cf49a43SJulian ElischerThis node type supports the following hooks: 2374cf49a43SJulian Elischer.Pp 23810c2a9dbSArchie Cobbs.Bl -tag -compact -width vjc_vjuncomp 23910c2a9dbSArchie Cobbs.It Dv link<N> 24010c2a9dbSArchie CobbsIndividual PPP link number 24110c2a9dbSArchie Cobbs.Dv <N> 24210c2a9dbSArchie Cobbs.It Dv compress 24310c2a9dbSArchie CobbsConnection to compression engine 24410c2a9dbSArchie Cobbs.It Dv decompress 24510c2a9dbSArchie CobbsConnection to decompression engine 24610c2a9dbSArchie Cobbs.It Dv encrypt 24710c2a9dbSArchie CobbsConnection to encryption engine 24810c2a9dbSArchie Cobbs.It Dv decrypt 24910c2a9dbSArchie CobbsConnection to decryption engine 25010c2a9dbSArchie Cobbs.It Dv vjc_ip 25110c2a9dbSArchie CobbsConnection to 252bec35b9aSArchie Cobbs.Xr ng_vjc 4 25310c2a9dbSArchie Cobbs.Dv ip 25410c2a9dbSArchie Cobbshook 25510c2a9dbSArchie Cobbs.It Dv vjc_vjcomp 25610c2a9dbSArchie CobbsConnection to 257bec35b9aSArchie Cobbs.Xr ng_vjc 4 25810c2a9dbSArchie Cobbs.Dv vjcomp 25910c2a9dbSArchie Cobbshook 26010c2a9dbSArchie Cobbs.It Dv vjc_vjuncomp 26110c2a9dbSArchie CobbsConnection to 262bec35b9aSArchie Cobbs.Xr ng_vjc 4 26310c2a9dbSArchie Cobbs.Dv vjuncomp 26410c2a9dbSArchie Cobbshook 26510c2a9dbSArchie Cobbs.It Dv vjc_vjip 26610c2a9dbSArchie CobbsConnection to 267bec35b9aSArchie Cobbs.Xr ng_vjc 4 26810c2a9dbSArchie Cobbs.Dv vjip 26910c2a9dbSArchie Cobbshook 27010c2a9dbSArchie Cobbs.It Dv inet 27110c2a9dbSArchie CobbsIP packet data 27210c2a9dbSArchie Cobbs.It Dv atalk 27310c2a9dbSArchie CobbsAppleTalk packet data 27410c2a9dbSArchie Cobbs.It Dv ipx 27510c2a9dbSArchie CobbsIPX packet data 2764cf49a43SJulian Elischer.It Dv bypass 27710c2a9dbSArchie CobbsBypass hook; frames have a four byte header consisting of 27810c2a9dbSArchie Cobbsa link number and a PPP protocol number. 2794cf49a43SJulian Elischer.El 2804cf49a43SJulian Elischer.Pp 2814cf49a43SJulian Elischer.Sh CONTROL MESSAGES 2824cf49a43SJulian ElischerThis node type supports the generic control messages, plus the following: 2834cf49a43SJulian Elischer.Bl -tag -width foo 28410c2a9dbSArchie Cobbs.It Dv NGM_PPP_SET_CONFIG 28510c2a9dbSArchie CobbsThis command configures all aspects of the node. This includes enabling 2869dcab530SArchie Cobbsmulti-link PPP, encryption, compression, Van Jacobson compression, and IP, 28710c2a9dbSArchie CobbsAppleTalk, and IPX packet delivery. It includes per-link configuration, 28810c2a9dbSArchie Cobbsincluding enabling the link, setting latency and bandwidth parameters, 28910c2a9dbSArchie Cobbsand enabling protocol field compression. Note that no link or functionality 29010c2a9dbSArchie Cobbsis active until the corresponding hook is also connected. 29110c2a9dbSArchie CobbsThis command takes a 29210c2a9dbSArchie Cobbs.Dv "struct ng_ppp_node_config" 29371cb548dSArchie Cobbsas an argument: 29471cb548dSArchie Cobbs.Bd -literal -offset 0 29571cb548dSArchie Cobbs/* Per-link config structure */ 29671cb548dSArchie Cobbsstruct ng_ppp_link_config { 29771cb548dSArchie Cobbs u_char enableLink; /* enable this link */ 29871cb548dSArchie Cobbs u_char enableProtoComp;/* enable protocol field compression */ 29971cb548dSArchie Cobbs u_char enableACFComp; /* enable addr/ctrl field compression */ 30071cb548dSArchie Cobbs u_int16_t mru; /* peer MRU */ 30171cb548dSArchie Cobbs u_int32_t latency; /* link latency (in milliseconds) */ 30271cb548dSArchie Cobbs u_int32_t bandwidth; /* link bandwidth (in bytes/second) */ 30371cb548dSArchie Cobbs}; 30471cb548dSArchie Cobbs 30571cb548dSArchie Cobbs/* Node config structure */ 30671cb548dSArchie Cobbsstruct ng_ppp_node_config { 30771cb548dSArchie Cobbs u_int16_t mrru; /* multilink peer MRRU */ 30871cb548dSArchie Cobbs u_char enableMultilink; /* enable multilink */ 30971cb548dSArchie Cobbs u_char recvShortSeq; /* recv multilink short seq # */ 31071cb548dSArchie Cobbs u_char xmitShortSeq; /* xmit multilink short seq # */ 31171cb548dSArchie Cobbs u_char enableRoundRobin; /* xmit whole packets */ 31271cb548dSArchie Cobbs u_char enableIP; /* enable IP data flow */ 31371cb548dSArchie Cobbs u_char enableAtalk; /* enable AppleTalk data flow */ 31471cb548dSArchie Cobbs u_char enableIPX; /* enable IPX data flow */ 31571cb548dSArchie Cobbs u_char enableCompression; /* enable PPP compression */ 31671cb548dSArchie Cobbs u_char enableDecompression; /* enable PPP decompression */ 31771cb548dSArchie Cobbs u_char enableEncryption; /* enable PPP encryption */ 31871cb548dSArchie Cobbs u_char enableDecryption; /* enable PPP decryption */ 31971cb548dSArchie Cobbs u_char enableVJCompression; /* enable VJ compression */ 32071cb548dSArchie Cobbs u_char enableVJDecompression; /* enable VJ decompression */ 32171cb548dSArchie Cobbs struct ng_ppp_link_config /* per link config params */ 32271cb548dSArchie Cobbs links[NG_PPP_MAX_LINKS]; 32371cb548dSArchie Cobbs}; 32471cb548dSArchie Cobbs.Ed 32571cb548dSArchie Cobbs.Pp 32610c2a9dbSArchie Cobbs.It Dv NGM_PPP_GET_CONFIG 32710c2a9dbSArchie CobbsReturns the current configuration as a 32810c2a9dbSArchie Cobbs.Dv "struct ng_ppp_node_config" . 32910c2a9dbSArchie Cobbs.It Dv NGM_PPP_GET_LINK_STATS 33010c2a9dbSArchie CobbsThis command takes a two byte link number as an argument and returns a 33110c2a9dbSArchie Cobbs.Dv "struct ng_ppp_link_stat" 33210c2a9dbSArchie Cobbscontaining statistics for the corresponding link. Here 33310c2a9dbSArchie Cobbs.Dv NG_PPP_BUNDLE_LINKNUM 33410c2a9dbSArchie Cobbsis a valid link number corresponding to the multi-link bundle. 33510c2a9dbSArchie Cobbs.It Dv NGM_PPP_CLR_LINK_STATS 33610c2a9dbSArchie CobbsThis command takes a two byte link number as an argument and 337d1f183b5SArchie Cobbsclears the statistics for that link. 338d1f183b5SArchie Cobbs.It Dv NGM_PPP_GETCLR_LINK_STATS 339d1f183b5SArchie CobbsSame as 340d1f183b5SArchie Cobbs.Dv NGM_PPP_GET_LINK_STATS , 341d1f183b5SArchie Cobbsbut also atomically clears the statistics as well. 34210c2a9dbSArchie Cobbs.El 34310c2a9dbSArchie Cobbs.Pp 34410c2a9dbSArchie CobbsThis node type also accepts the control messages accepted by the 345bec35b9aSArchie Cobbs.Xr ng_vjc 4 34610c2a9dbSArchie Cobbsnode type. When received, these messages are simply forwarded to 34710c2a9dbSArchie Cobbsthe adjacent 348bec35b9aSArchie Cobbs.Xr ng_vjc 4 34971cb548dSArchie Cobbsnode, if any. This is particularly useful when the individual 35071cb548dSArchie CobbsPPP links are able to generate 35171cb548dSArchie Cobbs.Dv NGM_VJC_RECV_ERROR 35271cb548dSArchie Cobbsmessages (see 353bec35b9aSArchie Cobbs.Xr ng_vjc 4 35471cb548dSArchie Cobbsfor a description). 3554cf49a43SJulian Elischer.Sh SHUTDOWN 3564cf49a43SJulian ElischerThis node shuts down upon receipt of a 3574cf49a43SJulian Elischer.Dv NGM_SHUTDOWN 3584cf49a43SJulian Elischercontrol message, or when all hooks have been disconnected. 3594cf49a43SJulian Elischer.Sh SEE ALSO 3604cf49a43SJulian Elischer.Xr netgraph 4 , 361bec35b9aSArchie Cobbs.Xr ng_async 4 , 362bec35b9aSArchie Cobbs.Xr ng_iface 4 , 363bec35b9aSArchie Cobbs.Xr ng_mppc 4 , 364bec35b9aSArchie Cobbs.Xr ng_pppoe 4 , 365bec35b9aSArchie Cobbs.Xr ng_vjc 4 , 366bec35b9aSArchie Cobbs.Xr ngctl 8 3674cf49a43SJulian Elischer.Rs 3684cf49a43SJulian Elischer.%A W. Simpson 3694cf49a43SJulian Elischer.%T "The Point-to-Point Protocol (PPP)" 3704cf49a43SJulian Elischer.%O RFC 1661 3714cf49a43SJulian Elischer.Re 37210c2a9dbSArchie Cobbs.Rs 37310c2a9dbSArchie Cobbs.%A K. Sklower 37410c2a9dbSArchie Cobbs.%A B. Lloyd 37510c2a9dbSArchie Cobbs.%A G. McGregor 37610c2a9dbSArchie Cobbs.%A D. Carr 37710c2a9dbSArchie Cobbs.%A T. Coradetti 37810c2a9dbSArchie Cobbs.%T "The PPP Multilink Protocol (MP)" 37910c2a9dbSArchie Cobbs.%O RFC 1990 38010c2a9dbSArchie Cobbs.Re 38151291597SJulian Elischer.Sh HISTORY 38251291597SJulian ElischerThe 38351291597SJulian Elischer.Nm 38451291597SJulian Elischernode type was implemented in 38551291597SJulian Elischer.Fx 4.0 . 38651291597SJulian Elischer.Sh AUTHORS 38751291597SJulian Elischer.An Archie Cobbs Aq archie@whistle.com 388