From owner-freebsd-questions Fri Jul 21 12:47:14 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id MAA20589 for questions-outgoing; Fri, 21 Jul 1995 12:47:14 -0700 Received: from aero.org (aero.org [130.221.16.2]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id MAA20569 for ; Fri, 21 Jul 1995 12:47:11 -0700 Received: from antares.aero.org ([130.221.192.46]) by aero.org with SMTP id <111106-2>; Fri, 21 Jul 1995 12:46:25 -0700 Received: from anpiel.aero.org by antares.aero.org (4.1/AMS-1.0) id AA12035 for aerygis@aerodyne.technion.ac.il; Fri, 21 Jul 95 12:40:27 PDT To: Yuri Gindin Cc: freebsd-questions@FreeBSD.org Subject: Re: iij-ppp questions. In-Reply-To: Your message of "Fri, 21 Jul 1995 08:01:36 PDT." Date: Fri, 21 Jul 1995 12:38:55 -0700 From: "Mike O'Brien" Message-Id: <95Jul21.124625pdt.111106-2@aero.org> Sender: questions-owner@FreeBSD.org Precedence: bulk > what does the set login string in /etc/ppp/ppp.conf means: > set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp" > i.e. what is login:-\\r-login: makes ? \r is carriage > return, I suppose ? That language is stolen from the way UUCP scripts work - you can find information on this scripting language in the UUCP documentation. It's a big help to have run a big UUCP site in a past life. :-) Briefly, this is a list of pairs of expected input/generated output tokens. TIMEOUT is special and is a command; the "5" is parsed as an argument. You'd better see something within 5 seconds or the timeout expires. This is used in the next part. "login:" is what we expect to see. The hyphen marks the start of an alternate branch in the script. If we DON'T see "login:" within 5 seconds, send a carriage return. Then, expect to see "login:", also within five seconds. When you see that, send "ppp". Expect to see "word:" within five seconds, then send "ppp" and end the script. As you can see from "word:", you don't have to give the full text you expect back, just a substring from it will do. The source code shows that IIJ PPP supports all sorts of special escape characters; '\r' is only one. There are long and short pauses, tabs, and others too. You could probably handle callback entirely in the script. I thought there was something about callback in the documentation but maybe I'm wrong; my FreeBSD system is at home so I don't have the doc handy. Mike O'Brien