1 .\" Copyright (c) 1996-2000 Whistle Communications, Inc.
2 .\" All rights reserved.
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.
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
33 .\" Author: Archie Cobbs <archie@FreeBSD.org>
35 .\" $Whistle: ng_mppc.8,v 1.1 1999/12/08 20:20:39 archie Exp $
36 .\" $FreeBSD: src/share/man/man4/ng_mppc.4,v 1.11.2.3 2002/03/20 18:16:36 archie Exp $
43 .Nd Microsoft MPPC/MPPE compression and encryption netgraph node type
45 .In netgraph/mppc/ng_mppc.h
49 node type implements the Microsoft Point-to-Point Compression (MPPC)
50 and Microsoft Point-to-Point Encryption (MPPE) sub-protocols of
52 These protocols are often used in conjunction with the Point-to-Point
53 Tunneling Protocol (PPTP).
55 The node has two hooks,
60 Typically one or both of these hooks would be connected to the
62 node type hook of the same name.
63 Each direction of traffic flow is independent of the other.
65 This node type supports the following hooks:
67 .Bl -tag -compact -width vjc_vjuncomp
73 Incoming frames are compressed and/or encrypted, and sent
74 back out the same hook.
80 Incoming frames are decompressed and/or decrypted, and sent
81 back out the same hook.
84 This node type supports the generic control messages, plus the following:
86 .It Dv NGM_MPPC_CONFIG_COMP
87 This command resets and configures the node for a session in the
88 outgoing traffic direction (i.e., for compression and/or encryption).
90 .Dv "struct ng_mppc_config"
92 .Bd -literal -offset 0n
93 /* Length of MPPE key */
94 #define MPPE_KEY_LEN 16
96 /* MPPC/MPPE PPP negotiation bits */
97 #define MPPC_BIT 0x00000001 /* mppc compression bits */
98 #define MPPE_40 0x00000020 /* use 40 bit key */
99 #define MPPE_56 0x00000080 /* use 56 bit key */
100 #define MPPE_128 0x00000040 /* use 128 bit key */
101 #define MPPE_BITS 0x000000e0 /* mppe encryption bits */
102 #define MPPE_STATELESS 0x01000000 /* use stateless mode */
103 #define MPPC_VALID_BITS 0x010000e1 /* possibly valid bits */
105 /* Configuration for a session */
106 struct ng_mppc_config {
107 u_char enable; /* enable */
108 u_int32_t bits; /* config bits */
109 u_char startkey[MPPE_KEY_LEN]; /* start key */
115 field enables traffic flow through the node.
118 field contains the bits as negotiated by the Compression Control Protocol
122 is only necessary if MPPE was negotiated, and must be equal to the
123 session start key as defined for MPPE.
124 This key is based on the MS-CHAP credentials used at link authentication time.
125 .It Dv NGM_MPPC_CONFIG_DECOMP
126 This command resets and configures the node for a session in the
127 incoming traffic direction (i.e., for decompression and/or decryption).
129 .Dv "struct ng_mppc_config"
131 .It Dv NGM_MPPC_RESETREQ
132 This message contains no arguments, and is bi-directional.
133 If an error is detected during decompression, this message is sent by the
134 node to the originator of the
135 .Dv NGM_MPPC_CONFIG_DECOMP
136 message that initiated the session.
137 The receiver should respond by sending a PPP CCP Reset-Request to the peer.
139 This message may also be received by this node type when a CCP Reset-Request
140 is received by the local PPP entity.
141 The node will respond by flushing its outgoing compression and encryption
142 state so the remote side can resynchronize.
145 This node shuts down upon receipt of a
147 control message, or when both hooks have been disconnected.
150 .Dv NETGRAPH_MPPC_COMPRESSION
152 .Dv NETGRAPH_MPPC_ENCRYPTION
153 are supplied to selectively compile in either or both capabilities.
154 At least one of these must be defined, or else this node type is useless.
156 The MPPC protocol requires proprietary compression code available
157 from Hi/Fn (formerly STAC).
158 These files must be obtained elsewhere and added to the kernel
159 sources before this node type will compile with the
160 .Dv NETGRAPH_MPPC_COMPRESSION
168 .%T "Microsoft Point-To-Point Compression (MPPC) Protocol"
174 .%T "Microsoft Point-To-Point Encryption (MPPE) Protocol"
175 .%O draft-ietf-pppext-mppe-04.txt
184 .%T "Point-to-Point Tunneling Protocol (PPTP)"
188 .An Archie Cobbs Aq Mt archie@FreeBSD.org
190 In PPP, encryption should be handled by the Encryption Control Protocol (ECP)
192 However, Microsoft combined both compression and encryption into their
193 ``compression'' algorithm, which is confusing.