1999-12-08 18:55:39 +00:00
|
|
|
.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
|
|
|
|
.\" All rights reserved.
|
2001-07-14 19:41:16 +00:00
|
|
|
.\"
|
1999-12-08 18:55:39 +00:00
|
|
|
.\" Subject to the following obligations and disclaimer of warranty, use and
|
|
|
|
.\" redistribution of this software, in source or object code forms, with or
|
|
|
|
.\" without modifications are expressly permitted by Whistle Communications;
|
|
|
|
.\" provided, however, that:
|
|
|
|
.\" 1. Any and all reproductions of the source or object code must include the
|
|
|
|
.\" copyright notice above and the following disclaimer of warranties; and
|
|
|
|
.\" 2. No rights are granted, in any manner or form, to use Whistle
|
|
|
|
.\" Communications, Inc. trademarks, including the mark "WHISTLE
|
|
|
|
.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
|
|
|
|
.\" such appears in the above copyright notice or in the software.
|
2001-07-14 19:41:16 +00:00
|
|
|
.\"
|
1999-12-08 18:55:39 +00:00
|
|
|
.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
|
|
|
|
.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
|
|
|
|
.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
|
|
|
|
.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
|
|
|
|
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
|
|
|
.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
|
|
|
|
.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
|
|
|
|
.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
|
|
|
|
.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
|
|
|
|
.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
|
|
|
|
.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
|
|
|
.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
|
|
|
|
.\" OF SUCH DAMAGE.
|
2001-07-14 19:41:16 +00:00
|
|
|
.\"
|
2000-10-26 15:30:44 +00:00
|
|
|
.\" Author: Archie Cobbs <archie@FreeBSD.org>
|
1999-12-08 18:55:39 +00:00
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\" $Whistle: ng_pptpgre.8,v 1.2 1999/12/08 00:20:53 archie Exp $
|
|
|
|
.\"
|
2012-11-13 20:41:36 +00:00
|
|
|
.Dd November 13, 2012
|
2000-05-04 17:54:37 +00:00
|
|
|
.Dt NG_PPTPGRE 4
|
2001-07-10 15:31:11 +00:00
|
|
|
.Os
|
1999-12-08 18:55:39 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ng_pptpgre
|
2000-03-10 20:38:24 +00:00
|
|
|
.Nd PPTP GRE protocol netgraph node type
|
1999-12-08 18:55:39 +00:00
|
|
|
.Sh SYNOPSIS
|
2005-02-05 11:31:31 +00:00
|
|
|
.In sys/types.h
|
2001-10-01 16:09:29 +00:00
|
|
|
.In netgraph/ng_pptpgre.h
|
1999-12-08 18:55:39 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm pptpgre
|
|
|
|
node type performs Generic Routing Encapsulation (GRE) over IP
|
2001-12-08 16:40:19 +00:00
|
|
|
for the PPTP protocol as specified by RFC 2637.
|
|
|
|
This involves packet
|
2002-03-16 17:56:40 +00:00
|
|
|
encapsulation, sequencing, acknowledgement, and an adaptive timeout
|
2001-12-08 16:40:19 +00:00
|
|
|
sliding window mechanism.
|
|
|
|
This node type does not handle any of
|
1999-12-08 18:55:39 +00:00
|
|
|
the TCP control protocol or call negotiation defined by PPTP.
|
|
|
|
.Pp
|
2000-05-05 01:20:28 +00:00
|
|
|
This node type expects to receive complete IP packets,
|
|
|
|
including the IP header, on the
|
2001-12-08 16:40:19 +00:00
|
|
|
.Dq Li lower
|
2000-05-05 01:20:28 +00:00
|
|
|
hook, but it transmits outgoing frames without any IP header.
|
1999-12-08 18:55:39 +00:00
|
|
|
The typical use for this node type would be to connect the
|
2001-12-08 16:40:19 +00:00
|
|
|
.Dq Li upper
|
1999-12-08 18:55:39 +00:00
|
|
|
hook to one of the link hooks of a
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_ppp 4
|
1999-12-08 18:55:39 +00:00
|
|
|
node, and the
|
2001-12-08 16:40:19 +00:00
|
|
|
.Dq Li lower
|
1999-12-08 18:55:39 +00:00
|
|
|
hook to the
|
2001-12-08 16:40:19 +00:00
|
|
|
.Dq Li "inet/raw/gre"
|
1999-12-08 18:55:39 +00:00
|
|
|
hook of a
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_ksocket 4
|
1999-12-08 18:55:39 +00:00
|
|
|
node.
|
|
|
|
.Sh HOOKS
|
|
|
|
This node type supports the following hooks:
|
2012-11-13 20:41:36 +00:00
|
|
|
.Bl -tag -width ".Va session_hhhh"
|
|
|
|
.It Va session_hhhh
|
2008-03-29 06:54:13 +00:00
|
|
|
Session 0xhhhh data packets to the upper protocol layers
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va upper
|
2008-03-29 06:54:13 +00:00
|
|
|
Same as session_hhhh, but for single session with configurable cid (legacy)
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Va lower
|
1999-12-08 18:55:39 +00:00
|
|
|
Connection to the lower protocol layers
|
|
|
|
.El
|
|
|
|
.Sh CONTROL MESSAGES
|
|
|
|
This node type supports the generic control messages, plus the following:
|
2012-11-13 20:41:36 +00:00
|
|
|
.Bl -tag -width foo
|
|
|
|
.It Dv NGM_PPTPGRE_SET_CONFIG Pq Ic setconfig
|
2016-06-08 08:50:35 +00:00
|
|
|
This command resets and configures hook for a session.
|
|
|
|
If corresponding
|
2008-03-29 06:54:13 +00:00
|
|
|
session_hhhh hook is not connected, upper hook will be configured.
|
1999-12-08 18:55:39 +00:00
|
|
|
This command takes a
|
2001-12-08 16:40:19 +00:00
|
|
|
.Vt "struct ng_pptpgre_conf"
|
1999-12-08 18:55:39 +00:00
|
|
|
as an argument:
|
2001-12-08 16:40:19 +00:00
|
|
|
.Bd -literal
|
1999-12-08 18:55:39 +00:00
|
|
|
/* Configuration for a session */
|
|
|
|
struct ng_pptpgre_conf {
|
|
|
|
u_char enabled; /* enables traffic flow */
|
|
|
|
u_char enableDelayedAck; /* enables delayed acks */
|
2012-11-13 20:41:36 +00:00
|
|
|
u_char enableAlwaysAck; /* always include ack with data */
|
2004-04-26 14:26:54 +00:00
|
|
|
u_char enableWindowing; /* enable windowing algorithm */
|
2012-02-12 18:29:56 +00:00
|
|
|
uint16_t cid; /* my call id */
|
|
|
|
uint16_t peerCid; /* peer call id */
|
|
|
|
uint16_t recvWin; /* peer recv window size */
|
|
|
|
uint16_t peerPpd; /* peer packet processing delay
|
1999-12-08 18:55:39 +00:00
|
|
|
(in 1/10 of a second) */
|
|
|
|
};
|
|
|
|
.Ed
|
2001-12-08 16:40:19 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Va enabled
|
|
|
|
field enables traffic flow through the node.
|
1999-12-08 18:55:39 +00:00
|
|
|
The
|
2001-12-08 16:40:19 +00:00
|
|
|
.Va enableDelayedAck
|
2002-01-21 12:09:13 +00:00
|
|
|
field enables delayed acknowledgement (maximum 250 milliseconds), which
|
1999-12-08 18:55:39 +00:00
|
|
|
is a useful optimization and should generally be turned on.
|
2001-12-08 16:40:19 +00:00
|
|
|
.Va enableAlwaysAck
|
2001-12-07 02:50:39 +00:00
|
|
|
field enables sending acknowledgements with every data packet, which
|
|
|
|
is probably helpful as well.
|
2004-04-26 14:26:54 +00:00
|
|
|
.Pp
|
|
|
|
.Va enableWindowing
|
|
|
|
enables the PPTP packet windowing mechanism specified by the protocol.
|
|
|
|
Disabling this will cause the node to violate the protocol, possibly
|
|
|
|
confusing other PPTP peers, but often results in better performance.
|
|
|
|
The windowing mechanism is a design error in the PPTP protocol;
|
|
|
|
L2TP, the successor to PPTP, removes it.
|
|
|
|
.Pp
|
1999-12-08 18:55:39 +00:00
|
|
|
The remaining fields are as supplied by the PPTP virtual call setup process.
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPTPGRE_GET_CONFIG Pq Ic getconfig
|
2008-03-29 06:54:13 +00:00
|
|
|
Takes two byte argument as cid and returns the current configuration as a
|
2001-12-08 16:40:19 +00:00
|
|
|
.Vt "struct ng_pptpgre_conf" .
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPTPGRE_GET_STATS Pq Ic getstats
|
2000-05-05 01:20:28 +00:00
|
|
|
This command returns a
|
2001-12-08 16:40:19 +00:00
|
|
|
.Vt "struct ng_pptpgre_stats"
|
2000-05-05 01:20:28 +00:00
|
|
|
containing various node statistics.
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPTPGRE_CLR_STATS Pq Ic clrstats
|
2000-05-05 01:20:28 +00:00
|
|
|
This command resets the node statistics.
|
2012-11-13 20:41:36 +00:00
|
|
|
.It Dv NGM_PPTPGRE_GETCLR_STATS Pq Ic getclrstats
|
2000-05-05 01:20:28 +00:00
|
|
|
This command atomically gets and resets the node statistics, returning a
|
2001-12-08 16:40:19 +00:00
|
|
|
.Vt "struct ng_pptpgre_stats" .
|
1999-12-08 18:55:39 +00:00
|
|
|
.El
|
|
|
|
.Sh SHUTDOWN
|
|
|
|
This node shuts down upon receipt of a
|
|
|
|
.Dv NGM_SHUTDOWN
|
|
|
|
control message, or when both hooks have been disconnected.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr netgraph 4 ,
|
2000-05-04 17:54:37 +00:00
|
|
|
.Xr ng_ksocket 4 ,
|
|
|
|
.Xr ng_ppp 4 ,
|
|
|
|
.Xr ngctl 8
|
1999-12-08 18:55:39 +00:00
|
|
|
.Rs
|
|
|
|
.%A K. Hamzeh
|
|
|
|
.%A G. Pall
|
|
|
|
.%A W. Verthein
|
|
|
|
.%A J. Taarud
|
|
|
|
.%A W. Little
|
|
|
|
.%A G. Zorn
|
|
|
|
.%T "Point-to-Point Tunneling Protocol (PPTP)"
|
|
|
|
.%O RFC 2637
|
|
|
|
.Re
|
1999-12-10 19:29:43 +00:00
|
|
|
.Rs
|
|
|
|
.%A S. Hanks
|
|
|
|
.%A T. \&Li
|
|
|
|
.%A D. Farinacci
|
|
|
|
.%A P. Traina
|
|
|
|
.%T "Generic Routing Encapsulation over IPv4 networks"
|
|
|
|
.%O RFC 1702
|
|
|
|
.Re
|
1999-12-21 01:25:21 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
node type was implemented in
|
|
|
|
.Fx 4.0 .
|
2000-05-05 17:08:55 +00:00
|
|
|
.Sh AUTHORS
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Archie Cobbs Aq Mt archie@FreeBSD.org
|
2005-01-21 08:36:40 +00:00
|
|
|
.Sh BUGS
|
|
|
|
The node should not expect incoming GRE packets to have an IP header.
|
|
|
|
This behavior is inherited from the (converse) behavior of raw IP sockets.
|
|
|
|
An intermediate node that strips IP headers in one direction
|
|
|
|
should be used instead.
|