From laskavy@Berkeley.Gambit.Msk.SU  Wed Jul 15 04:49:46 1998
Received: from Berkeley.Gambit.Msk.SU (berkeley.gambit.msk.su [194.190.206.3])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA06734
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Jul 1998 04:49:45 -0700 (PDT)
          (envelope-from laskavy@Berkeley.Gambit.Msk.SU)
Received: (from laskavy@localhost)
	by Berkeley.Gambit.Msk.SU (8.8.8/8.8.8) id PAA06507;
	Wed, 15 Jul 1998 15:49:28 +0400 (MSD)
	(envelope-from laskavy)
Message-Id: <199807151149.PAA06507@Berkeley.Gambit.Msk.SU>
Date: Wed, 15 Jul 1998 15:49:28 +0400 (MSD)
From: "Sergei S. Laskavy" <laskavy@Berkeley.Gambit.Msk.SU>
Reply-To: laskavy@Berkeley.Gambit.Msk.SU
To: FreeBSD-gnats-submit@freebsd.org
Subject: ppp.8: RECEIVING INCOMING PPP CONNECTIONS (Method 1)
X-Send-Pr-Version: 3.2

>Number:         7289
>Category:       docs
>Synopsis:       ppp.8: RECEIVING INCOMING PPP CONNECTIONS (Method 1)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 15 04:50:01 PDT 1998
>Closed-Date:    Tue Mar 9 11:44:10 PST 1999
>Last-Modified:  Tue Mar  9 11:45:10 PST 1999
>Originator:     Sergei S. &
>Release:        FreeBSD 2.2.6-STABLE i386
>Organization:
The FreeBSD Documentation Project
>Environment:

	FreeBSD 2.2.6-STABLE #0: Sat Jul 11 09:45:43 MSD 1998

>Description:

	``man 8 ppp'' do not describe a most natural and easy method of
	receiving incoming PPP connections using getty and ``pp'' capability
	in /etc/gettytab.

>How-To-Repeat:

	man 8 ppp
>Fix:
	
	Description of most natural method:

RECEIVING INCOMING PPP CONNECTIONS (Method 1)
     To handle an incoming PPP connection request, follow these steps:

     1.   Make sure the modem and (optionally) /etc/rc.serial is configured
	  correctly.
	  o   Use Hardware Handshake (CTS/RTS) for flow control.
	  o   Modem should be set to NO echo back (ATE0) and NO results string
	      (ATQ1).

     2.   Edit /etc/ttys to enable a getty(8) on the port where the modem is
	  attached.  For example:
		ttyd1 /usr/libexec/getty std.38400 dialup on secure
	  Don't forget to send a HUP signal to the init(8) process to start
	  the getty(8).
		# kill -HUP 1

     3.   Edit /etc/gettytab to enable a pp capability to the same terminal
          class as your /etc/ttys entry. In our example it is ``std.38400'':

		std.38400|38400-baud:\
			:pp=/etc/ppp/login:im=\r\n:\
			:np:sp#38400:

/*
 *	I really show here the ``im'' capability too, thats for short login
 *	prompt, just ``login:''.
 */

     4.   Create a /etc/ppp/login executable script with the following
	  contents:

		#!/bin/sh -p
		/usr/bin/mesg n
		/bin/stty -tostop
		exec /usr/sbin/ppp -direct

/*
 *	Do we really need that mesg and stty commands ?
 *	I noticed, that without ``/bin/stty -tostop'' ppp server will not exit
 *	after hangup.
 */

	  (You can specify a label name for further control.)

	  Direct mode (-direct) lets ppp work with stdin and stdout.  You can
	  also use pppctl(8) or telnet(1) to connect to a configured diagnos-
	  tic port, in the same manner as with client-side ppp.

     5.   Optional support for Microsoft's IPCP Name Server and NetBIOS Name
	  Server negotiation can be enabled use ``enable msext'' and ``set ns
	  pri-addr [sec-addr]'' along with ``set nbns pri-addr [sec-addr]'' in
	  your /etc/ppp/ppp.conf file.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Tue Mar 9 11:44:10 PST 1999 
State-Changed-Why:  
Ppp has suggested using pp= for some time now. 
>Unformatted:
