Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NG_PPTPGRE(4)		    Kernel Interfaces Manual		 NG_PPTPGRE(4)

NAME
       ng_pptpgre -- PPTP GRE protocol netgraph	node type

SYNOPSIS
       #include	<sys/types.h>
       #include	<netgraph/ng_pptpgre.h>

DESCRIPTION
       The pptpgre node	type performs Generic Routing Encapsulation (GRE) over
       IP  for	the  PPTP  protocol  as	 specified by RFC 2637.	 This involves
       packet encapsulation,  sequencing,  acknowledgement,  and  an  adaptive
       timeout	sliding	 window	mechanism.  This node type does	not handle any
       of the TCP control protocol or call negotiation defined by PPTP.

       This node type expects to receive complete IP packets, including	the IP
       header, on the "lower" hook, but	it transmits outgoing  frames  without
       any  IP header.	The typical use	for this node type would be to connect
       the "upper" hook	to one of the link hooks of a ng_ppp(4)	node, and  the
       "lower" hook to the "inet/raw/gre" hook of a ng_ksocket(4) node.

HOOKS
       This node type supports the following hooks:

       session_hhhh  Session 0xhhhh data packets to the	upper protocol layers

       upper	     Same as session_hhhh, but for single session with config-
		     urable cid	(legacy)

       lower	     Connection	to the lower protocol layers

CONTROL	MESSAGES
       This  node type supports	the generic control messages, plus the follow-
       ing:

       NGM_PPTPGRE_SET_CONFIG (setconfig)
	    This command resets	and configures hook for	a session.  If	corre-
	    sponding  session_hhhh  hook  is not connected, upper hook will be
	    configured.	 This command takes a struct ng_pptpgre_conf as	an ar-
	    gument:

	    /* Configuration for a session */
	    struct ng_pptpgre_conf {
		u_char	    enabled;	      /* enables traffic flow */
		u_char	    enableDelayedAck; /* enables delayed acks */
		u_char	    enableAlwaysAck;  /* always	include	ack with data */
		u_char	    enableWindowing;  /* enable	windowing algorithm */
		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
						 (in 1/10 of a second) */
	    };

	    The	enabled	field enables traffic  flow  through  the  node.   The
	    enableDelayedAck  field  enables  delayed acknowledgement (maximum
	    250	milliseconds), which is	a useful optimization and should  gen-
	    erally  be	turned	on.  enableAlwaysAck field enables sending ac-
	    knowledgements with	every data packet, which is  probably  helpful
	    as well.

	    enableWindowing enables the	PPTP packet windowing mechanism	speci-
	    fied  by the protocol.  Disabling this will	cause the node to vio-
	    late the protocol, possibly	confusing other	PPTP peers, but	 often
	    results  in	 better	performance.  The windowing mechanism is a de-
	    sign error in the PPTP protocol; L2TP, the successor to PPTP,  re-
	    moves it.

	    The	 remaining  fields  are	 as  supplied by the PPTP virtual call
	    setup process.

       NGM_PPTPGRE_GET_CONFIG (getconfig)
	    Takes two byte argument as cid and returns the current  configura-
	    tion as a struct ng_pptpgre_conf.

       NGM_PPTPGRE_GET_STATS (getstats)
	    This  command returns a struct ng_pptpgre_stats containing various
	    node statistics.

       NGM_PPTPGRE_CLR_STATS (clrstats)
	    This command resets	the node statistics.

       NGM_PPTPGRE_GETCLR_STATS	(getclrstats)
	    This command atomically gets and resets the	node  statistics,  re-
	    turning a struct ng_pptpgre_stats.

SHUTDOWN
       This node shuts down upon receipt of a NGM_SHUTDOWN control message, or
       when both hooks have been disconnected.

SYSCTL VARIABLES
       A set of	sysctl(8) variables controls ability of	this node to deal with
       some  amount  of	 packet	 reorder  that	sometimes  happens in transit.
       Packet reorder results in packet	drops (unless the order	 is  restored)
       as  PPP	protocol  can not deliver reordered data.  These variables are
       shown below together with their default value and meaning:

       net.graph.pptpgre.reorder_max: 1
	       Defines maximum length of node's	private	reorder	queue used  to
	       keep  data  waiting  for	late packets.  Zero value disables re-
	       ordering.  Default value	allows the node	to restore  the	 order
	       for  two	 packets swapped in transit.  Greater values allow the
	       node to deliver packets being late after	more  packets  in  se-
	       quence at cost of increased kernel memory usage.

       net.graph.pptpgre.reorder_timeout: 1
	       Defines	time  value in miliseconds used	to wait	for late pack-
	       ets.

SEE ALSO
       netgraph(4), ng_ksocket(4), ng_ppp(4), ngctl(8),	sysctl(8)

       K. Hamzeh, G. Pall, W. Verthein,	J. Taarud, W.  Little,	and  G.	 Zorn,
       Point-to-Point Tunneling	Protocol (PPTP), RFC 2637.

       S.  Hanks,  T.  Li,  D.	Farinacci,  and	 P.  Traina,  Generic  Routing
       Encapsulation over IPv4 networks, RFC 1702.

HISTORY
       The ng_pptpgre node type	was implemented	in FreeBSD 4.0.

AUTHORS
       Archie Cobbs <archie@FreeBSD.org>

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 sock-
       ets.   An  intermediate	node  that  strips IP headers in one direction
       should be used instead.

FreeBSD	14.3		       November	4, 2018			 NG_PPTPGRE(4)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=ng_pptpgre&sektion=4&manpath=FreeBSD+14.3-RELEASE+and+Ports>

home | help