1.\" Copyright (c) 1996-1999 Whistle Communications, Inc. 2.\" All rights reserved. 3.\" 4.\" Subject to the following obligations and disclaimer of warranty, use and 5.\" redistribution of this software, in source or object code forms, with or 6.\" without modifications are expressly permitted by Whistle Communications; 7.\" provided, however, that: 8.\" 1. Any and all reproductions of the source or object code must include the 9.\" copyright notice above and the following disclaimer of warranties; and 10.\" 2. No rights are granted, in any manner or form, to use Whistle 11.\" Communications, Inc. trademarks, including the mark "WHISTLE 12.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as 13.\" such appears in the above copyright notice or in the software. 14.\" 15.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 16.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 17.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 18.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 19.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 20.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 21.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 22.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 23.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 24.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 25.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 26.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 27.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 31.\" OF SUCH DAMAGE. 32.\" 33.\" Author: Archie Cobbs <archie@whistle.com> 34.\" 35.\" $FreeBSD$ 36.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $ 37.\" 38.Dd January 19, 1999 39.Dt NG_PPP 8 40.Os FreeBSD 3 41.Sh NAME 42.Nm ng_ppp 43.Nd PPP protocol multiplexor negraph node type 44.Sh SYNOPSIS 45.Fd #include <netgraph/ng_ppp.h> 46.Sh DESCRIPTION 47The 48.Nm ppp 49node type performs multiplexing for the PPP protocol. On the 50.Dv downstream 51hook it transmits and receives full PPP frames, which include the 52protocol field, but no address, control or checksum fields. 53On outgoing frames, when protocol compression has been enabled and 54the protocol number is suitable for compression, the protocol field will 55be compressed (i.e., sent as one byte instead of two). 56Either compressed or uncompressed protocol fields are accepted 57on incoming frames. 58.Pp 59For each 16-bit PPP procotol number there is a corresponding ``upstream'' hook. 60Packets on these hooks contain no PPP protocol header. 61The node simply multiplexes between the 62.Dv downstream 63hook and all of the upstream hooks by adding or subtracting the 64PPP protocol field, depending on the direction of flow. 65.Pp 66When a frame is received on 67.Dv downstream , 68if the corresponding protocol hook is 69not connected, the packet is forwarded to a special upstream hook called 70.Dv bypass . 71This hook is a catch-all for any incoming frames not destined 72for another already connected hook. Packets sent out on the 73.Dv bypass 74hook always have the PPP protcol header prepended as the first 75two bytes (even if the 76original incoming frame was protocol compressed to one byte). 77.Pp 78Any frames received on the 79.Dv bypass 80hook are forwarded to 81.Dv downstream 82without modification. 83.Sh HOOKS 84This node type supports the following hooks: 85.Pp 86.Bl -tag -width foobarbazi 87.It Dv downstream 88Connection to the PPP link layer. 89.It Dv bypass 90Frames that do not correspond to a connected protocol hook; 91the PPP protocol header is included. 92.It Dv 0xNNNN 93Conection to the PPP protocol with 16-bit hex value 94.Dv NNNN . 95No PPP protocol header is included. 96.El 97.Pp 98For convenience, the 99.Nm 100node type defines several hook name aliases for common PPP protocols: 101.Pp 102.Bl -tag -width abcdefgh -compact -offset 4n 103.It Dv lcp 104LCP protocol data (0xc021) 105.It Dv ipcp 106IPCP protocol data (0x8021) 107.It Dv atcp 108ATCP protocol data (0x8029) 109.It Dv ccp 110CCP protocol data (0x80fd) 111.It Dv ecp 112ECP protocol data (0x8053) 113.It Dv ip 114IP protocol data (0x0021) 115.It Dv vjcomp 116Van Jacobsen compressed TCP data (0x002d) 117.It Dv vjuncomp 118Van Jacobsen uncompressed TCP data (0x002f) 119.It Dv mp 120Multi-link protocol data (0x003d) 121.It Dv compd 122Compressed protocol data (0x00fd) 123.It Dv cryptd 124Encrypted protocol data (0x0053) 125.It Dv pap 126PAP authentication protocol data (0xc023) 127.It Dv chap 128CHAP authentication protocol data (0xc223) 129.It Dv lqr 130LQR protocol data (0xc025) 131.El 132.Sh CONTROL MESSAGES 133This node type supports the generic control messages, plus the following: 134.Bl -tag -width foo 135.It Dv NGM_PPP_SET_PROTOCOMP 136This command takes a single integer as argument and enables or disables 137protocol field compression as the value is zero or non-zero. 138Note that only protocols with high order byte equal to 139.Dv 0x00 140are compressible. 141.It Dv NGM_PPP_GET_STATS 142This command returns a 143.Dv "struct ng_ppp_stat" 144containing various node statistics. 145.It Dv NGM_PPP_CLR_STATS 146Clears the node statistics. Statistics are also cleared whenever the 147.Dv downstream 148hook is reconnected. 149.Sh SHUTDOWN 150This node shuts down upon receipt of a 151.Dv NGM_SHUTDOWN 152control message, or when all hooks have been disconnected. 153.Sh SEE ALSO 154.Xr netgraph 4 , 155.Xr ng_async 8 , 156.Xr ng_vjc 8 , 157.Xr ngctl 8 . 158.Rs 159.%A W. Simpson 160.%T "The Point-to-Point Protocol (PPP)" 161.%O RFC 1661 162.Re 163.Sh AUTHOR 164Archie Cobbs <archie@whistle.com> 165