Simple PPP - internals
This information is for developers, tech support people, and others concerned about
how Simple PPP works inside.
New features and how they work
Simple PPP dials in the background, and unlike MacPPP, this actually works. There's
rather a lot of machinery behind this. Dialing is controlled by a completely new
table-driven rule-based system that does everything from deferred tasks. For those
things that can't be done from a deferred task, system tasks fired off using the Notification
Manager are used. Scripts are controlled through the rule-based engine and an inverted
matching engine which recognizes keywords as they come in character by character.
There's no process waiting and polling inside Simple PPP; you can't do that in a driver
without interfering with the foreground too much. The driver never gets an event,
and it never does a dialog. If it has something to say, it will post a notification.
- Simple PPP will automatically redial when an Internet service provider doesn't
answer or is busy. As long as something is trying to send IP packets, Simple PPP
will keep trying to dial. There is no delay between redials.
- Simple PPP will automatically redial when an open connection is dropped while it
was being actively used. Usually, file transfers can be recovered after the redial.
This works quite well if you have a permanently-assigned IP address and your server
provider answers on the first or second redial. TCP will give you about two minutes to
get reconnected, and that's usually enough. Try downloading a big image in Netscape
and unplug your modem during the download. Plug the modem back in and wait. It may
take a minute or two while everything cranks, but it usually works.
A new buffering strategy improves performance. The low-level serial input and output
routines have been redesigned and rewritten for better performance. MacPPP uses significant
CPU time even when no traffic is in progress. SimplePPP does not. The buffering system attempts to output entire packets with single writes, which improves performance
over packet-oriented media such as Ricochet links. On the input side, the input processing
is done at deferred task level, to eliminate long interrupt lockouts. It's hard to get a buffer overrun with Simple PPP, even on a slow Macintosh.
A new diagnostic system helps you figure out what happens when there's a problem.
Considerable effort has gone into collecting enough information to give useful error
No more unwanted dialing.
The old MacPPP/FreePPP problem of randomly dialing in the background when there
was no traffic to send has been fixed. Simple PPP dials when an applicationwrites
to MacTCP, unlike other versions of PPP which dial when an application merelyopens
MacTCP. A number of applications like to periodically open MacTCP and not send anything,
which is harmless on a LAN but starts MacPPP dialing.
The Simple PPP Alpha Test Version
What's in this version
Simple PPP itself
Simple PPP Extension.
Simple PPP Control
Simple PPP Logger
, which dumps events within Simple PPP.
Modem Info Editor
, for editing files of modem information
These documents, in HTML.
This is an alpha test version. It has not yet been tested on a wide variety of machines.
Simple PPP version 1.5 requires System 7.1 or better and MacTCP. Open Transport is
This is a development release. Please don't download this if you're new to using the
Please don't put copies of the alpha release on other servers. It's too soon.
Send defect reports to email@example.com
These are just the highlights. The changes from MacPPP are so extensive that this
is basically a new piece of software.
Simple PPP consists of two basic parts, a System Extension and a Control Panel. The
System Extension is a major rewrite. Starting from a MacPPP base, much of the code
has been completely replaced, and the parts that haven't been replaced have been
heavily modified. The Control Panel is completely new.
Simple PPP contains extensive internal checking. It may not be defect-free yet,
but when it breaks, we find out why. There are over a hundred assertions within
Simple PPP, and they're all turned on. If you get an assertion failure, an alert
comes up, followed by a trap to MacsBug if it is installed. Please report all
assertion failures to firstname.lastname@example.org
Debug logging. Events within PPP can be logged to a file using the "Simple PPP logger"
program. You can log everything, or just errors.
Many race conditions in MacPPP have been eliminated. Most of these were associated
with MacPPP's improperly designed support of virtual memory,which is why MacPPP has
never worked right with virtual memory or RamDoubler.
A major effort has been made to comply strictly with the guidelines of Inside Macintosh,
and to avoid doing anything considered remotely improper in Macintosh code.
Simple PPP never brings up a dialog box. All error messages are notifications, so
they won't interfere with anything else you're doing. This is consistent with the
Apple Human Interface Guidelines for background-only tasks.
Line speeds of 115Kb/sec and 230Kb/sec are supported on systems that have drivers
that offer those speeds. (Simple PPP requires a serial driver that works at those
speeds. Newer versions of the MacOS come with such a driver.)
Authentication via both Password Authentication Protocol (PAP) and Challenge Handshake
Authentication Protocol (CHAP) with the MD5 algorithm from RSA Data Security, Inc.
is supported. Most authentication code is now common to all authentication protocols.
Note that for both protocols, the user name and password are stored as plaintext in
the preferences file, so there is a security issue here.
The Simple PPP Control Panel is an all-new C++ application built with Metrowerks PowerPlant
Restrictions and limitations
Open Transport is not supported at this time. Apple has not yet issued a stable version
of Open Transport, and the available documentation does not cover how to write an
OT-compatible MDEV-type driver. Simple PPP may actually work with Open Transport,
but we promise nothing.
Simple PPP insists on doing its own dialing and logging in. It does not offer a terminal
window, so you can't dial manually or log in manually. You also cannot have the Apple
Internet Dialer do the dialing for it. The Apple Internet Dialer is really a workaround for MacPPP's inability to dial properly, so this isn't a serious limitation.
If a connection breaks, and there's been recent traffic on it (within the last two
minutes), Simple PPP will detect this, redial, and bring up the connection again.
If the service provider answers on the first try, you usually recover TCP connections
that were open at the time. Some service providers may assign you a new IP address after
the reconnection, in which case recovery won't work.We suggest to ISPs that they
allow five minutes after a disconnect before reassigning the IP address to a new
user, and Metricom, the operators of the wireless Ricochet network, are putting this in for
their systems. In the meantime, this feature tends to work well only if you have
a permanently assigned IP address.
The user name and password for authentication must be saved via the Simple PPP Control
Panel. Simple PPP will never prompt you for a password. This creates a security issue;
anyone who has physical access to your Macintosh can access your Internet account. No attempt is made to encrypt the stored copy of the password, because then you'd
have to enter a password to decrypt your password. (It's possible to create the illusion
of security by doing some scrambling of the stored password, but since the descrambling algorithm has to be in the program, it's easy enough to write a "cracking" program
for such scramblers.)
When a service provider is slow to answer or a redial is required, the MacTCP Domain
Name Resolver will often hit its hard-coded 39 second timeout and give up. This usually
results in messages such as "Unable to find any domain name server" from applications. Eudora often produces this message. With Eudora, when you see this, just tell
Eudora to fetch your mail again (Command-M). Maybe Apple will fix this.
When Simple PPP is dialing, the only way to stop it is to open the Simple PPP control
panel and click on "Stop".
Simple PPP is compatible with MacPPP and FreePPP preference files, but not with old
control panels and various programs that turn PPP on and off. Such programs will
say that MacPPP is not installed, or will dim out their "Open" button. The Simple
PPP control panel must be used.
Login scripts are handled slightly differently than in MacPPP or FreePPP. Most simple
scripts will still work, but complex ones probably will not. Try editing your script
with the Simple PPP Control Panel and see if it complains. There have been two big
improvements in script handling. First, "wait for" lines are now matched regardless
of case. This gets rid of the old annoying "Login:" vs "login:" problem. Second,
if the script outputs a line and then waits for input, input matching starts at the
moment the output starts; Simple PPP won't lose the first character of input.
Source code information
Simple PPP is composed of free software, and is offered under the terms of the Free
Software Foundation's General Public Licence. Parts of it are based on Merit's MacPPP,
which is also free software. There's some code from Van Jacobson at Lawrence Livermore Labs, and some code from RSA Data Security Inc, all of which are permitted to be
used in free software. You can download all the source code from ftp.animats.com
once it's past alpha test; right now it's not quite ready for others to modify.
If you make changes and distribute a new version of Simple PPP, the usual General
Public Licence terms apply: you can' t charge for it, and you must
redistribute the source code.
February 20, 1996
Back to the Simple PPP home page