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