xref: /freebsd/share/man/man4/ng_pptpgre.4 (revision 6b3455a7665208c366849f0b2b3bc916fb97516e)
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@FreeBSD.org>
34.\"
35.\" $FreeBSD$
36.\" $Whistle: ng_pptpgre.8,v 1.2 1999/12/08 00:20:53 archie Exp $
37.\"
38.Dd December 7, 2001
39.Dt NG_PPTPGRE 4
40.Os
41.Sh NAME
42.Nm ng_pptpgre
43.Nd PPTP GRE protocol netgraph node type
44.Sh SYNOPSIS
45.In netgraph/ng_pptpgre.h
46.Sh DESCRIPTION
47The
48.Nm pptpgre
49node type performs Generic Routing Encapsulation (GRE) over IP
50for the PPTP protocol as specified by RFC 2637.
51This involves packet
52encapsulation, sequencing, acknowledgement, and an adaptive timeout
53sliding window mechanism.
54This node type does not handle any of
55the TCP control protocol or call negotiation defined by PPTP.
56.Pp
57This node type expects to receive complete IP packets,
58including the IP header, on the
59.Dq Li lower
60hook, but it transmits outgoing frames without any IP header.
61The typical use for this node type would be to connect the
62.Dq Li upper
63hook to one of the link hooks of a
64.Xr ng_ppp 4
65node, and the
66.Dq Li lower
67hook to the
68.Dq Li "inet/raw/gre"
69hook of a
70.Xr ng_ksocket 4
71node.
72.Sh HOOKS
73This node type supports the following hooks:
74.Pp
75.Bl -tag -compact -width ".Li upper"
76.It Li upper
77Connection to the upper protocol layers
78.It Li lower
79Connection to the lower protocol layers
80.El
81.Sh CONTROL MESSAGES
82This node type supports the generic control messages, plus the following:
83.Bl -tag -width indent
84.It Dv NGM_PPTPGRE_SET_CONFIG
85This command resets and configures the node for a session.
86This command takes a
87.Vt "struct ng_pptpgre_conf"
88as an argument:
89.Bd -literal
90/* Configuration for a session */
91struct ng_pptpgre_conf {
92    u_char      enabled;          /* enables traffic flow */
93    u_char      enableDelayedAck; /* enables delayed acks */
94    u_char      enableAlwaysAck;  /* always send ack with data */
95    u_char      enableWindowing;  /* enable windowing algorithm */
96    u_int16_t   cid;              /* my call id */
97    u_int16_t   peerCid;          /* peer call id */
98    u_int16_t   recvWin;          /* peer recv window size */
99    u_int16_t   peerPpd;          /* peer packet processing delay
100                                     (in 1/10 of a second) */
101};
102.Ed
103.Pp
104The
105.Va enabled
106field enables traffic flow through the node.
107The
108.Va enableDelayedAck
109field enables delayed acknowledgement (maximum 250 milliseconds), which
110is a useful optimization and should generally be turned on.
111.Va enableAlwaysAck
112field enables sending acknowledgements with every data packet, which
113is probably helpful as well.
114.Pp
115.Va enableWindowing
116enables the PPTP packet windowing mechanism specified by the protocol.
117Disabling this will cause the node to violate the protocol, possibly
118confusing other PPTP peers, but often results in better performance.
119The windowing mechanism is a design error in the PPTP protocol;
120L2TP, the successor to PPTP, removes it.
121.Pp
122The remaining fields are as supplied by the PPTP virtual call setup process.
123.It Dv NGM_PPTPGRE_GET_CONFIG
124Returns the current configuration as a
125.Vt "struct ng_pptpgre_conf" .
126.It Dv NGM_PPTPGRE_GET_STATS
127This command returns a
128.Vt "struct ng_pptpgre_stats"
129containing various node statistics.
130.It Dv NGM_PPTPGRE_CLR_STATS
131This command resets the node statistics.
132.It Dv NGM_PPTPGRE_GETCLR_STATS
133This command atomically gets and resets the node statistics, returning a
134.Vt "struct ng_pptpgre_stats" .
135.El
136.Sh SHUTDOWN
137This node shuts down upon receipt of a
138.Dv NGM_SHUTDOWN
139control message, or when both hooks have been disconnected.
140.Sh SEE ALSO
141.Xr netgraph 4 ,
142.Xr ng_ksocket 4 ,
143.Xr ng_ppp 4 ,
144.Xr ngctl 8
145.Rs
146.%A K. Hamzeh
147.%A G. Pall
148.%A W. Verthein
149.%A J. Taarud
150.%A W. Little
151.%A G. Zorn
152.%T "Point-to-Point Tunneling Protocol (PPTP)"
153.%O RFC 2637
154.Re
155.Rs
156.%A S. Hanks
157.%A T. \&Li
158.%A D. Farinacci
159.%A P. Traina
160.%T "Generic Routing Encapsulation over IPv4 networks"
161.%O RFC 1702
162.Re
163.Sh BUGS
164The node should not expect incoming GRE packets to have an IP header.
165This behavior is inherited from the (converse) behavior of raw IP sockets.
166An intermediate node that strips IP headers in one direction
167should be used instead.
168.Sh HISTORY
169The
170.Nm
171node type was implemented in
172.Fx 4.0 .
173.Sh AUTHORS
174.An Archie Cobbs Aq archie@FreeBSD.org
175