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.\" 33eddc45e7SJeroen Ruigrok van der Werven.\" Author: Archie Cobbs <archie@FreeBSD.org> 344cf49a43SJulian Elischer.\" 354cf49a43SJulian Elischer.\" $FreeBSD$ 364cf49a43SJulian Elischer.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $ 374cf49a43SJulian Elischer.\" 384e0768b6SBjoern A. Zeeb.Dd August 2, 2004 39bec35b9aSArchie Cobbs.Dt NG_PPP 4 403d45e180SRuslan Ermilov.Os 414cf49a43SJulian Elischer.Sh NAME 424cf49a43SJulian Elischer.Nm ng_ppp 4310c2a9dbSArchie Cobbs.Nd PPP protocol netgraph node type 444cf49a43SJulian Elischer.Sh SYNOPSIS 45fbad9e2dSRuslan Ermilov.In sys/types.h 4632eef9aeSRuslan Ermilov.In netgraph/ng_ppp.h 474cf49a43SJulian Elischer.Sh DESCRIPTION 484cf49a43SJulian ElischerThe 494cf49a43SJulian Elischer.Nm ppp 50b5e7e999SRuslan Ermilovnode type performs multiplexing for the PPP protocol. 51b5e7e999SRuslan ErmilovIt handles only packets that contain data, and forwards protocol negotiation 5210c2a9dbSArchie Cobbsand control packets to a separate controlling entity (e.g., a 53b5e7e999SRuslan Ermilovuser-land daemon). 54b5e7e999SRuslan ErmilovThis approach combines the fast dispatch of 5510c2a9dbSArchie Cobbskernel implementations with the configuration flexibility of a 56b5e7e999SRuslan Ermilovuser-land implementations. 57b5e7e999SRuslan ErmilovThe PPP node type directly supports 589dcab530SArchie Cobbsmulti-link PPP, Van Jacobson compression, PPP compression, PPP 59b5e7e999SRuslan Ermilovencryption, and the IP, IPX, and AppleTalk protocols. 60b5e7e999SRuslan ErmilovA single PPP node corresponds to one PPP multi-link bundle. 61d1f183b5SArchie Cobbs.Pp 62d1f183b5SArchie CobbsThere is a separate hook for each PPP link in the bundle, plus 63d1f183b5SArchie Cobbsseveral hooks corresponding to the directly supported protocols. 64d1f183b5SArchie CobbsFor compression and encryption, separate attached nodes are required 65b5e7e999SRuslan Ermilovto do the actual work. 66b5e7e999SRuslan ErmilovThe node type used will of course depend on the algorithm negotiated. 67b5e7e999SRuslan ErmilovThere is also a 68d1f183b5SArchie Cobbs.Dv bypass 69d1f183b5SArchie Cobbshook which is used to handle any protocol not directly supported 70b5e7e999SRuslan Ermilovby the node. 71b5e7e999SRuslan ErmilovThis includes all of the control protocols: LCP, IPCP, 72b5e7e999SRuslan ErmilovCCP, etc. 73b5e7e999SRuslan ErmilovTypically this node is connected to a user-land daemon via a 74bec35b9aSArchie Cobbs.Xr ng_socket 4 75d1f183b5SArchie Cobbstype node. 7610c2a9dbSArchie Cobbs.Sh ENABLING FUNCTIONALITY 7710c2a9dbSArchie CobbsIn general, the PPP node enables a specific link or functionality when 7810c2a9dbSArchie Cobbs(a) a 7910c2a9dbSArchie Cobbs.Dv NGM_PPP_SET_CONFIG 8010c2a9dbSArchie Cobbsmessage has been received which enables it, and 8110c2a9dbSArchie Cobbs(b) the corresponding hook(s) are connected. 8210c2a9dbSArchie CobbsThis allows the controlling entity to use either method (a) or (b) 8310c2a9dbSArchie Cobbs(or both) to control the node's behavior. 84d1f183b5SArchie CobbsWhen a link is connected but disabled, traffic can still flow on 85d1f183b5SArchie Cobbsthe link via the 86d1f183b5SArchie Cobbs.Dv bypass 87d1f183b5SArchie Cobbshook (see below). 8810c2a9dbSArchie Cobbs.Sh LINK HOOKS 8910c2a9dbSArchie CobbsDuring normal operation, the individual PPP links are connected to hooks 9010c2a9dbSArchie Cobbs.Dv link0 , 9110c2a9dbSArchie Cobbs.Dv link1 , 925203edcdSRuslan Ermilovetc. 935203edcdSRuslan ErmilovUp to 9410c2a9dbSArchie Cobbs.Dv NG_PPP_MAX_LINKS 9510c2a9dbSArchie Cobbslinks are supported. 9610c2a9dbSArchie CobbsThese device-independent hooks transmit and receive full PPP 9771cb548dSArchie Cobbsframes, which include the PPP protocol, address, control, and 9871cb548dSArchie Cobbsinformation fields, but no checksum or other link-specific fields. 9971cb548dSArchie Cobbs.Pp 10010c2a9dbSArchie CobbsOn outgoing frames, when protocol compression 10110c2a9dbSArchie Cobbshas been enabled and the protocol number is suitable for compression, 10210c2a9dbSArchie Cobbsthe protocol field will be compressed (i.e., sent as one byte 103b5e7e999SRuslan Ermilovinstead of two). 104b5e7e999SRuslan ErmilovEither compressed or uncompressed protocol fields 105b5e7e999SRuslan Ermilovare accepted on incoming frames. 106b5e7e999SRuslan ErmilovSimilarly, if address and control 10771cb548dSArchie Cobbsfield compression has been enabled for the link, the address and 10871cb548dSArchie Cobbscontrol fields will be omitted (except for LCP frames as required 109b5e7e999SRuslan Ermilovby the standards). 110b5e7e999SRuslan ErmilovIncoming frames have the address and control fields 11171cb548dSArchie Cobbsstripped automatically if present. 1124cf49a43SJulian Elischer.Pp 11310c2a9dbSArchie CobbsSince all negotiation is handled outside the PPP node, the links 11410c2a9dbSArchie Cobbsshould not be connected and enabled until the corresponding link 11510c2a9dbSArchie Cobbshas reached the network phase (i.e., LCP negotiation and authentication 11610c2a9dbSArchie Cobbshave completed successfully) and the PPP node has been informed of 11710c2a9dbSArchie Cobbsthe link parameters via the 11810c2a9dbSArchie Cobbs.Dv NGM_PPP_LINK_CONFIG 11910c2a9dbSArchie Cobbsmessage. 120d1f183b5SArchie Cobbs.Pp 121d1f183b5SArchie CobbsWhen a link is connected but disabled, all received frames are forwarded 122d1f183b5SArchie Cobbsdirectly out the 123d1f183b5SArchie Cobbs.Dv bypass 124d1f183b5SArchie Cobbshook, and conversely, frames may be transmitted via the 125d1f183b5SArchie Cobbs.Dv bypass 126b5e7e999SRuslan Ermilovhook as well. 127b5e7e999SRuslan ErmilovThis mode is appropriate for the link authentication phase. 128d1f183b5SArchie CobbsAs soon as the link is enabled, the PPP node will 129d1f183b5SArchie Cobbsbegin processing frames received on the link. 13010c2a9dbSArchie Cobbs.Sh COMPRESSION AND ENCRYPTION 13110c2a9dbSArchie CobbsCompression is supported via two hooks, 13210c2a9dbSArchie Cobbs.Dv compress 13310c2a9dbSArchie Cobbsand 13410c2a9dbSArchie Cobbs.Dv decompress . 13510c2a9dbSArchie CobbsWhen enabled and connected, the PPP node writes outgoing frames on the 13610c2a9dbSArchie Cobbs.Dv comp 13710c2a9dbSArchie Cobbshook and expects to receive back the compressed frame on the same hook. 13810c2a9dbSArchie CobbsSimilarly, the 13910c2a9dbSArchie Cobbs.Dv decompress 14010c2a9dbSArchie Cobbshook is used to uncompress incoming frames when decompression is 1417f9d26bdSMike Pritchardnegotiated (compression and decompression are independently negotiable). 14210c2a9dbSArchie CobbsThe type of node attached to these hooks should correspond 14310c2a9dbSArchie Cobbsto the type of compression negotiated, e.g., Deflate, Predictor-1, etc. 14410c2a9dbSArchie Cobbs.Pp 14510c2a9dbSArchie CobbsEncryption works exactly analogously via the 14610c2a9dbSArchie Cobbs.Dv encrypt 14710c2a9dbSArchie Cobbsand 14810c2a9dbSArchie Cobbs.Dv decrypt 149b5e7e999SRuslan Ermilovnodes. 150b5e7e999SRuslan ErmilovData is always compressed before being encrypted, 15110c2a9dbSArchie Cobbsand decrypted before being decompressed. 15210c2a9dbSArchie Cobbs.Pp 15310c2a9dbSArchie CobbsOnly bundle-level compression and encryption is directly supported; 15410c2a9dbSArchie Cobbslink-level compression and encryption can be handled transparently 15510c2a9dbSArchie Cobbsby downstream nodes. 156dd1e305cSArchie Cobbs.Sh VAN JACOBSON COMPRESSION 15710c2a9dbSArchie CobbsWhen all of the 15810c2a9dbSArchie Cobbs.Dv vjc_ip , 15910c2a9dbSArchie Cobbs.Dv vjc_vjcomp , 16010c2a9dbSArchie Cobbs.Dv vjc_vjuncomp , 16110c2a9dbSArchie Cobbsand 16210c2a9dbSArchie Cobbs.Dv vjc_vjip 16310c2a9dbSArchie Cobbshooks are connected, and the corresponding configuration flag is 1649dcab530SArchie Cobbsenabled, Van Jacobson compression and/or decompression will become active. 16510c2a9dbSArchie CobbsNormally these hooks connect to the corresponding hooks of a single 166bec35b9aSArchie Cobbs.Xr ng_vjc 4 1675203edcdSRuslan Ermilovnode. 1685203edcdSRuslan ErmilovThe PPP node is compatible with the 16951291597SJulian Elischer.Dq pass through 17051291597SJulian Elischermodes of the 171bec35b9aSArchie Cobbs.Xr ng_vjc 4 17210c2a9dbSArchie Cobbsnode type. 17310c2a9dbSArchie Cobbs.Sh BYPASS HOOK 17410c2a9dbSArchie CobbsWhen a frame is received on a link with an unsupported protocol, 17510c2a9dbSArchie Cobbsor a protocol which is disabled or for which the corresponding hook 17610c2a9dbSArchie Cobbsis unconnected, the PPP node forwards the frame out the 1774cf49a43SJulian Elischer.Dv bypass 178b5e7e999SRuslan Ermilovhook, prepended with a four byte prefix. 179b5e7e999SRuslan ErmilovThis first two bytes of 18010c2a9dbSArchie Cobbsthe prefix indicate the link number on which the frame was received 18110c2a9dbSArchie Cobbs(in network order). 18210c2a9dbSArchie CobbsFor such frames received over the bundle (i.e., encapsulated in the 18310c2a9dbSArchie Cobbsmulti-link protocol), the special link number 18410c2a9dbSArchie Cobbs.Dv NG_PPP_BUNDLE_LINKNUM 1855203edcdSRuslan Ermilovis used. 1865203edcdSRuslan ErmilovAfter the two byte link number is the two byte PPP protocol number 18710c2a9dbSArchie Cobbs(also in network order). 18810c2a9dbSArchie CobbsThe PPP protocol number is two bytes long even if the original frame 18910c2a9dbSArchie Cobbswas protocol compressed. 1904cf49a43SJulian Elischer.Pp 19110c2a9dbSArchie CobbsConversely, any data written to the 1924cf49a43SJulian Elischer.Dv bypass 193b5e7e999SRuslan Ermilovhook is assumed to be in this same format. 194b5e7e999SRuslan ErmilovThe four byte header is 19510c2a9dbSArchie Cobbsstripped off, the PPP protocol number is prepended (possibly compressed), 19610c2a9dbSArchie Cobbsand the frame is delivered over the desired link. 19710c2a9dbSArchie CobbsIf the link number is 19810c2a9dbSArchie Cobbs.Dv NG_PPP_BUNDLE_LINKNUM 19910c2a9dbSArchie Cobbsthe frame will be delivered over the multi-link bundle; or, if multi-link 20010c2a9dbSArchie Cobbsis disabled, over the (single) PPP link. 20110c2a9dbSArchie Cobbs.Pp 202a3fef8dfSArchie CobbsTypically when the controlling entity receives an unexpected packet on the 203a3fef8dfSArchie Cobbs.Dv bypass 20410c2a9dbSArchie Cobbshook it responds either by dropping the frame (if it's not ready for 2050227791bSRuslan Ermilovthe protocol) or with an LCP protocol reject (if it does not recognize 20610c2a9dbSArchie Cobbsor expect the protocol). 20710c2a9dbSArchie Cobbs.Sh MULTILINK OPERATION 20810c2a9dbSArchie CobbsTo enable multi-link PPP, the corresponding configuration flag must be set 209b5e7e999SRuslan Ermilovand at least one link connected. 210b5e7e999SRuslan ErmilovThe PPP node will not allow more than 21110c2a9dbSArchie Cobbsone link to be connected if multi-link is not enabled, nor will it allow 21210c2a9dbSArchie Cobbscertain multi-link settings to be changed while multi-link operation is 21310c2a9dbSArchie Cobbsactive (e.g., short sequence number header format). 21410c2a9dbSArchie Cobbs.Pp 215b5e7e999SRuslan ErmilovSince packets are sent as fragments across multiple individual links, 21610c2a9dbSArchie Cobbsit is important that when a link goes down the PPP node is notified 21710c2a9dbSArchie Cobbsimmediately, either by disconnecting the corresponding hook or disabling 21810c2a9dbSArchie Cobbsthe link via the 21910c2a9dbSArchie Cobbs.Dv NGM_PPP_SET_CONFIG 22010c2a9dbSArchie Cobbscontrol message. 22110c2a9dbSArchie Cobbs.Pp 22210c2a9dbSArchie CobbsEach link has configuration parameters for latency (specified in 2237f9d26bdSMike Pritchardmilliseconds) and bandwidth (specified in tens of bytes per second). 22410c2a9dbSArchie CobbsThe PPP node can be configured for 22510c2a9dbSArchie Cobbs.Em round-robin 22610c2a9dbSArchie Cobbsor 22710c2a9dbSArchie Cobbs.Em optimized 22810c2a9dbSArchie Cobbspacket delivery. 22910c2a9dbSArchie Cobbs.Pp 23010c2a9dbSArchie CobbsWhen configured for round-robin delivery, the latency and bandwidth 23110c2a9dbSArchie Cobbsvalues are ignored and the PPP node simply sends each frame as a 23210c2a9dbSArchie Cobbssingle fragment, alternating frames across all the links in the 233b5e7e999SRuslan Ermilovbundle. 234b5e7e999SRuslan ErmilovThis scheme has the advantage that even if one link fails 235b5e7e999SRuslan Ermilovsilently, some packets will still get through. 236b5e7e999SRuslan ErmilovIt has the disadvantage 23710c2a9dbSArchie Cobbsof sub-optimal overall bundle latency, which is important for 23810c2a9dbSArchie Cobbsinteractive response time, and sub-optimal overall bundle bandwidth 23910c2a9dbSArchie Cobbswhen links with different bandwidths exist in the same bundle. 24010c2a9dbSArchie Cobbs.Pp 24110c2a9dbSArchie CobbsWhen configured for optimal delivery, the PPP node distributes the 24210c2a9dbSArchie Cobbspacket across the links in a way that minimizes the time it takes 243b5e7e999SRuslan Ermilovfor the completed packet to be received by the far end. 244b5e7e999SRuslan ErmilovThis involves taking into account each link's latency, bandwidth, and 245b5e7e999SRuslan Ermilovcurrent queue length. 246b5e7e999SRuslan ErmilovTherefore these numbers should be configured as accurately as possible. 247b5e7e999SRuslan ErmilovThe algorithm does require 24810c2a9dbSArchie Cobbssome computation, so may not be appropriate for very slow machines 24910c2a9dbSArchie Cobbsand/or very fast links. 25010c2a9dbSArchie Cobbs.Pp 25110c2a9dbSArchie CobbsAs a special case, if all links have identical latency and bandwidth, 25210c2a9dbSArchie Cobbsthen the above algorithm is disabled (because it is unnecessary) 25310c2a9dbSArchie Cobbsand the PPP node simply fragments frames into equal sized portions 25410c2a9dbSArchie Cobbsacross all of the links. 2554cf49a43SJulian Elischer.Sh HOOKS 2564cf49a43SJulian ElischerThis node type supports the following hooks: 2574cf49a43SJulian Elischer.Pp 25810c2a9dbSArchie Cobbs.Bl -tag -compact -width vjc_vjuncomp 25910c2a9dbSArchie Cobbs.It Dv link<N> 26010c2a9dbSArchie CobbsIndividual PPP link number 26110c2a9dbSArchie Cobbs.Dv <N> 26210c2a9dbSArchie Cobbs.It Dv compress 26310c2a9dbSArchie CobbsConnection to compression engine 26410c2a9dbSArchie Cobbs.It Dv decompress 26510c2a9dbSArchie CobbsConnection to decompression engine 26610c2a9dbSArchie Cobbs.It Dv encrypt 26710c2a9dbSArchie CobbsConnection to encryption engine 26810c2a9dbSArchie Cobbs.It Dv decrypt 26910c2a9dbSArchie CobbsConnection to decryption engine 27010c2a9dbSArchie Cobbs.It Dv vjc_ip 27110c2a9dbSArchie CobbsConnection to 272bec35b9aSArchie Cobbs.Xr ng_vjc 4 27310c2a9dbSArchie Cobbs.Dv ip 27410c2a9dbSArchie Cobbshook 27510c2a9dbSArchie Cobbs.It Dv vjc_vjcomp 27610c2a9dbSArchie CobbsConnection to 277bec35b9aSArchie Cobbs.Xr ng_vjc 4 27810c2a9dbSArchie Cobbs.Dv vjcomp 27910c2a9dbSArchie Cobbshook 28010c2a9dbSArchie Cobbs.It Dv vjc_vjuncomp 28110c2a9dbSArchie CobbsConnection to 282bec35b9aSArchie Cobbs.Xr ng_vjc 4 28310c2a9dbSArchie Cobbs.Dv vjuncomp 28410c2a9dbSArchie Cobbshook 28510c2a9dbSArchie Cobbs.It Dv vjc_vjip 28610c2a9dbSArchie CobbsConnection to 287bec35b9aSArchie Cobbs.Xr ng_vjc 4 28810c2a9dbSArchie Cobbs.Dv vjip 28910c2a9dbSArchie Cobbshook 29010c2a9dbSArchie Cobbs.It Dv inet 29110c2a9dbSArchie CobbsIP packet data 29210c2a9dbSArchie Cobbs.It Dv atalk 29310c2a9dbSArchie CobbsAppleTalk packet data 29410c2a9dbSArchie Cobbs.It Dv ipx 29510c2a9dbSArchie CobbsIPX packet data 2964cf49a43SJulian Elischer.It Dv bypass 29710c2a9dbSArchie CobbsBypass hook; frames have a four byte header consisting of 29810c2a9dbSArchie Cobbsa link number and a PPP protocol number. 2994cf49a43SJulian Elischer.El 3004cf49a43SJulian Elischer.Sh CONTROL MESSAGES 3014cf49a43SJulian ElischerThis node type supports the generic control messages, plus the following: 3024cf49a43SJulian Elischer.Bl -tag -width foo 30310c2a9dbSArchie Cobbs.It Dv NGM_PPP_SET_CONFIG 304b5e7e999SRuslan ErmilovThis command configures all aspects of the node. 305b5e7e999SRuslan ErmilovThis includes enabling 3069dcab530SArchie Cobbsmulti-link PPP, encryption, compression, Van Jacobson compression, and IP, 3074e0768b6SBjoern A. ZeebIPv6, AppleTalk, and IPX packet delivery. 308b5e7e999SRuslan ErmilovIt includes per-link configuration, 30910c2a9dbSArchie Cobbsincluding enabling the link, setting latency and bandwidth parameters, 310b5e7e999SRuslan Ermilovand enabling protocol field compression. 311b5e7e999SRuslan ErmilovNote that no link or functionality 31210c2a9dbSArchie Cobbsis active until the corresponding hook is also connected. 31310c2a9dbSArchie CobbsThis command takes a 3144e0768b6SBjoern A. Zeeb.Dv "struct ng_ppp_node_conf" 31571cb548dSArchie Cobbsas an argument: 3163f610476SRuslan Ermilov.Bd -literal -offset 0n 31771cb548dSArchie Cobbs/* Per-link config structure */ 3184e0768b6SBjoern A. Zeebstruct ng_ppp_link_conf { 31971cb548dSArchie Cobbs u_char enableLink; /* enable this link */ 32071cb548dSArchie Cobbs u_char enableProtoComp;/* enable protocol field compression */ 32171cb548dSArchie Cobbs u_char enableACFComp; /* enable addr/ctrl field compression */ 32271cb548dSArchie Cobbs u_int16_t mru; /* peer MRU */ 32371cb548dSArchie Cobbs u_int32_t latency; /* link latency (in milliseconds) */ 32471cb548dSArchie Cobbs u_int32_t bandwidth; /* link bandwidth (in bytes/second) */ 32571cb548dSArchie Cobbs}; 32671cb548dSArchie Cobbs 3274e0768b6SBjoern A. Zeeb/* Bundle config structure */ 3284e0768b6SBjoern A. Zeebstruct ng_ppp_bund_conf { 32971cb548dSArchie Cobbs u_int16_t mrru; /* multilink peer MRRU */ 33071cb548dSArchie Cobbs u_char enableMultilink; /* enable multilink */ 33171cb548dSArchie Cobbs u_char recvShortSeq; /* recv multilink short seq # */ 33271cb548dSArchie Cobbs u_char xmitShortSeq; /* xmit multilink short seq # */ 33371cb548dSArchie Cobbs u_char enableRoundRobin; /* xmit whole packets */ 33471cb548dSArchie Cobbs u_char enableIP; /* enable IP data flow */ 3354e0768b6SBjoern A. Zeeb u_char enableIPv6; /* enable IPv6 data flow */ 33671cb548dSArchie Cobbs u_char enableAtalk; /* enable AppleTalk data flow */ 33771cb548dSArchie Cobbs u_char enableIPX; /* enable IPX data flow */ 33871cb548dSArchie Cobbs u_char enableCompression; /* enable PPP compression */ 33971cb548dSArchie Cobbs u_char enableDecompression; /* enable PPP decompression */ 34071cb548dSArchie Cobbs u_char enableEncryption; /* enable PPP encryption */ 34171cb548dSArchie Cobbs u_char enableDecryption; /* enable PPP decryption */ 34271cb548dSArchie Cobbs u_char enableVJCompression; /* enable VJ compression */ 34371cb548dSArchie Cobbs u_char enableVJDecompression; /* enable VJ decompression */ 3444e0768b6SBjoern A. Zeeb}; 3454e0768b6SBjoern A. Zeeb 3464e0768b6SBjoern A. Zeebstruct ng_ppp_node_conf { 3474e0768b6SBjoern A. Zeeb struct ng_ppp_bund_conf bund; 3484e0768b6SBjoern A. Zeeb struct ng_ppp_link_conf links[NG_PPP_MAX_LINKS]; 34971cb548dSArchie Cobbs}; 35071cb548dSArchie Cobbs.Ed 35171cb548dSArchie Cobbs.Pp 35210c2a9dbSArchie Cobbs.It Dv NGM_PPP_GET_CONFIG 35310c2a9dbSArchie CobbsReturns the current configuration as a 3544e0768b6SBjoern A. Zeeb.Dv "struct ng_ppp_node_conf" . 35510c2a9dbSArchie Cobbs.It Dv NGM_PPP_GET_LINK_STATS 35610c2a9dbSArchie CobbsThis command takes a two byte link number as an argument and returns a 35710c2a9dbSArchie Cobbs.Dv "struct ng_ppp_link_stat" 3585203edcdSRuslan Ermilovcontaining statistics for the corresponding link. 3595203edcdSRuslan ErmilovHere 36010c2a9dbSArchie Cobbs.Dv NG_PPP_BUNDLE_LINKNUM 36110c2a9dbSArchie Cobbsis a valid link number corresponding to the multi-link bundle. 36210c2a9dbSArchie Cobbs.It Dv NGM_PPP_CLR_LINK_STATS 36310c2a9dbSArchie CobbsThis command takes a two byte link number as an argument and 364d1f183b5SArchie Cobbsclears the statistics for that link. 365d1f183b5SArchie Cobbs.It Dv NGM_PPP_GETCLR_LINK_STATS 366d1f183b5SArchie CobbsSame as 367d1f183b5SArchie Cobbs.Dv NGM_PPP_GET_LINK_STATS , 368d1f183b5SArchie Cobbsbut also atomically clears the statistics as well. 36910c2a9dbSArchie Cobbs.El 37010c2a9dbSArchie Cobbs.Pp 37110c2a9dbSArchie CobbsThis node type also accepts the control messages accepted by the 372bec35b9aSArchie Cobbs.Xr ng_vjc 4 3735203edcdSRuslan Ermilovnode type. 3745203edcdSRuslan ErmilovWhen received, these messages are simply forwarded to 37510c2a9dbSArchie Cobbsthe adjacent 376bec35b9aSArchie Cobbs.Xr ng_vjc 4 3775203edcdSRuslan Ermilovnode, if any. 3785203edcdSRuslan ErmilovThis is particularly useful when the individual 37971cb548dSArchie CobbsPPP links are able to generate 38071cb548dSArchie Cobbs.Dv NGM_VJC_RECV_ERROR 38171cb548dSArchie Cobbsmessages (see 382bec35b9aSArchie Cobbs.Xr ng_vjc 4 38371cb548dSArchie Cobbsfor a description). 3844cf49a43SJulian Elischer.Sh SHUTDOWN 3854cf49a43SJulian ElischerThis node shuts down upon receipt of a 3864cf49a43SJulian Elischer.Dv NGM_SHUTDOWN 3874cf49a43SJulian Elischercontrol message, or when all hooks have been disconnected. 3884cf49a43SJulian Elischer.Sh SEE ALSO 3894cf49a43SJulian Elischer.Xr netgraph 4 , 390bec35b9aSArchie Cobbs.Xr ng_async 4 , 391bec35b9aSArchie Cobbs.Xr ng_iface 4 , 392bec35b9aSArchie Cobbs.Xr ng_mppc 4 , 393bec35b9aSArchie Cobbs.Xr ng_pppoe 4 , 394bec35b9aSArchie Cobbs.Xr ng_vjc 4 , 395bec35b9aSArchie Cobbs.Xr ngctl 8 3964cf49a43SJulian Elischer.Rs 3974cf49a43SJulian Elischer.%A W. Simpson 3984cf49a43SJulian Elischer.%T "The Point-to-Point Protocol (PPP)" 3994cf49a43SJulian Elischer.%O RFC 1661 4004cf49a43SJulian Elischer.Re 40110c2a9dbSArchie Cobbs.Rs 40210c2a9dbSArchie Cobbs.%A K. Sklower 40310c2a9dbSArchie Cobbs.%A B. Lloyd 40410c2a9dbSArchie Cobbs.%A G. McGregor 40510c2a9dbSArchie Cobbs.%A D. Carr 40610c2a9dbSArchie Cobbs.%A T. Coradetti 40710c2a9dbSArchie Cobbs.%T "The PPP Multilink Protocol (MP)" 40810c2a9dbSArchie Cobbs.%O RFC 1990 40910c2a9dbSArchie Cobbs.Re 41051291597SJulian Elischer.Sh HISTORY 41151291597SJulian ElischerThe 41251291597SJulian Elischer.Nm 41351291597SJulian Elischernode type was implemented in 41451291597SJulian Elischer.Fx 4.0 . 41551291597SJulian Elischer.Sh AUTHORS 416eddc45e7SJeroen Ruigrok van der Werven.An Archie Cobbs Aq archie@FreeBSD.org 417