]> git.ozlabs.org Git - ppp.git/commitdiff
Update from Steve Perkins
authorPaul Mackerras <paulus@samba.org>
Thu, 26 Mar 1998 02:54:53 +0000 (02:54 +0000)
committerPaul Mackerras <paulus@samba.org>
Thu, 26 Mar 1998 02:54:53 +0000 (02:54 +0000)
39 files changed:
NeXT/ChangeLog.rtf [new file with mode: 0644]
NeXT/Examples/NXHosting_with_PPP [new file with mode: 0644]
NeXT/Examples/Persistent_Connection [new file with mode: 0644]
NeXT/Examples/README [new file with mode: 0644]
NeXT/Examples/chap-secrets.example [new file with mode: 0644]
NeXT/Examples/flow-control-hints [new file with mode: 0644]
NeXT/Examples/ip-down.example [new file with mode: 0644]
NeXT/Examples/ip-up.example [new file with mode: 0644]
NeXT/Examples/options.example [new file with mode: 0644]
NeXT/Examples/pap-secrets.example [new file with mode: 0644]
NeXT/Examples/ppp_multiple_hosts.tar.gz [new file with mode: 0644]
NeXT/Examples/pppdown [new file with mode: 0644]
NeXT/Examples/pppkill.c [new file with mode: 0644]
NeXT/Examples/pppup.annex [new file with mode: 0644]
NeXT/Examples/pppup.direct [new file with mode: 0644]
NeXT/Examples/pppup.portmaster [new file with mode: 0644]
NeXT/Examples/pppup.remote [new file with mode: 0644]
NeXT/Examples/pppup.zyxel [new file with mode: 0644]
NeXT/Examples/redial.sh [new file with mode: 0644]
NeXT/INSTALL
NeXT/Makefile
NeXT/Makefile.top
NeXT/NeXT_Version [deleted file]
NeXT/NeXT_Version.h [new file with mode: 0644]
NeXT/README.NeXT [deleted file]
NeXT/TODO.NeXT
NeXT/bsd-comp.c
NeXT/hppa/README.hppa [new file with mode: 0755]
NeXT/if_ppp.c
NeXT/if_pppvar.h
NeXT/inlines.h
NeXT/libposix/Makefile [new file with mode: 0644]
NeXT/libposix/libposix.c [new file with mode: 0644]
NeXT/mach/features.h [new file with mode: 0644]
NeXT/nbq.h
NeXT/ppp_tty.c
NeXT/random.c [deleted file]
NeXT/random.h [deleted file]
README.NeXT

diff --git a/NeXT/ChangeLog.rtf b/NeXT/ChangeLog.rtf
new file mode 100644 (file)
index 0000000..25c5e98
--- /dev/null
@@ -0,0 +1,427 @@
+{\rtf0\ansi{\fonttbl\f0\fmodern Courier;\f1\fswiss Helvetica;\f2\fmodern Ohlfs;}
+\paperw12040
+\paperh11720
+\margl40
+\margr40
+{\colortbl;\red59\green11\blue84;\red0\green0\blue0;\red19\green34\blue84;\red6\green0\blue85;}
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs24\fc0\cf0 \
+
+\b\gray128\fc1\cf1 11
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 perkins
+\b0    
+\b\fc0\cf0 Jul 10 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/Documentation/WWW Pages/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Fixed\
+       
+\b0 \
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\i\gray136\fc3\cf3         Mail setup for FAQ\
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [perkins Wed Jul 10 14:59:39 EDT 1996]\
+[perkins Wed Jun 05 21:31:44 EDT 1996]\
+On 06/04/96, Francois Magnan wrote:\
+
+\gray46\fc4\cf4 >\
+>I have written down the steps I did to configure sendmail 8.7.5 for a \
+>standalone machine using a dial up PPP connection to link to the \
+>internet. It uses the user database to set From and Reply to fields \
+>correctly to each user of the system own's Pop account (in all \
+>outgoing mail). Is there a need for this? Should I post it? Could an \
+>expert verify it before an unexperienced user try this???\
+>\
+>Thank you,\
+>Francois Magnan\
+>   \
+>-- \
+>______________________________________________________\
+>Francois Magnan\
+>Departement de Mathematique & Statistiques\
+>Universite de Montreal\
+>email: magnan@mathcn.umontreal.ca (MIME, NeXTMail Ok!)\
+>\
+>\
+
+\gray0\fc0\cf0 \
+Sorry for this.... My news server was always telling me it could not \
+send the post.\
+\
+Francois\
+\
+\
+-- \
+______________________________________________________\
+Francois Magnan\
+Departement de Mathematique & Statistiques\
+Universite de Montreal\
+email: magnan@mathcn.umontreal.ca (MIME, NeXTMail Ok!)\
+\
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0\cf0 \
+
+\b\gray128\fc1\cf1 13
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 perkins
+\b0    
+\b\fc0\cf0 Jul 10 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/PPP Daemon/Interoperation/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Open\
+       
+\b0 \
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\i\gray136\fc3\cf3         PPP-2.2 doesn't negotiate well with Netcom's PPP server using bsdcomp\
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [perkins Wed Jul 10 15:01:24 EDT 1996]\
+\
+[aisbell@cubicsol.com Mon Jun 17 16:47:27 CDT 1996]\
+    Using the default PPP options file which specifies the "bsdcomp 10,10" pppd option, negotiation with Netcom's PPP server has been problematic since early June, 1996.  Negotiation succeeds, ipcp comes up, but then the Netcom server resends a negotiation packet causing ipcp to be brought down followed by successful renegotiation bringing ipcp up.  This causes ip-up to run, then ip-down, and then ip-up again.  Depending on what is being done in ip-up and ip-down, this multiple repeated execution, possibly concurrently, can cause problems.\
+\
+    However, BSD compression negotiation is rejected by the Netcom server.  So by disabling BSD compression negotiation (i.e., specifying the "-bsdcomp" instead of the "bsdcomp 10,10" pppd option), this problem seems to disappear.
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               \
+
+\b\gray128\fc1\cf1 15
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 perkins
+\b0    
+\b\fc0\cf0 Jul 10 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/Kernel Server/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Open\
+       
+\b0 \
+
+\b\i\gray136\fc3\cf3   PPP running out of netbuffers & thrashing\
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [perkins Wed Jul 10 15:02:51 EDT 1996]\
+\
+[rvose@ix.netcom.com Wed Jun 26 01:03:20 CDT 1996]\
+You'll have to excuse me if this is categorized wrong.  I'm a PPP newbie.\
+\
+I'm running PPP 2.2.046 on a NeXTstation Turbo Color w/32MB RAM to access my ISP over a modem.  Certain operations cause my system to thrash until I break into the NMI to stop it.  When I look at messages in the NMI, at the very end are several errors from PPP indicating that it's out of 'netbuffers'  I'm not sure if PPP is causing the trash, but the netbuffer errors seemed to point to it.  A friend of mine running the same configuration has the same problems.\
+\
+I'm looking for a way to recreate the problem on demand, and will forward that on when I find it.  The trashing usually appears while using OmniWeb 2.0.1 from Lighthouse Design, but I've had similar problems using NetSurfer.  The problem seems to happen much faster with NetSurfer.\
+\
+Again, I'll try to get you more details.  Does this sound like a PPP problem? 
+\b \
+ ===============================================\
+\
+
+\b0 [perkins Mon Jul 01 10:33:36 EDT 1996]\
+\
+See Bug #16 for more information.\
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               \
+
+\b\gray128\fc1\cf1 16
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 perkins
+\b0    
+\b\fc0\cf0 Jul 10 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/Kernel Server/Panic/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Obsolete\
+       
+\b0 \
+
+\b\i\gray136\fc3\cf3   Re: PPP causing thrashing - Tracking ID 15\
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [perkins Wed Jul 10 15:04:07 EDT 1996]\
+\
+[rvose@ix.netcom.com Mon Jul  1 04:37:03 CDT 1996]\
+Last week I had submitted report indicating that my NeXTstation Color Turbo machine ran out of network buffers and thrashed to the point of crashing.  The tracking ID assigned was 16.\
+\
+I believe that this problem may have been due to my swapfile size growing beyond the high-water mark.  My machine crashed several times this evening (thrashing) while connected and I happened to notice that the swapfile size was pushing the hiwat limit.  I increased the hiwat limit on the file from 40 MB (which is the NeXT default) to 105 MB (the partition size where the file residess - it's on its own drive) and voila!  No more thrashing.  I've been connected over PPP and hitting the system hard with network transactions with ZERO difficulties.\
+\
+Just wanted to pass that info along.  I'm not sure if the combination of the system hitting the hiwat mark on the swapfile + PPP needing more resources caused the thrashing problem, but it seems reasobable.\
+\
+Thanks...\
+\
+Randy\
+rvose@ix.netcom.com\
+\
+\b \
+ ===============================================\
+\
+
+\b0 [perkins Mon Jul 01 10:33:24 EDT 1996]\
+\
+This bug is in relation to bug #15\
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               \
+
+\b\gray128\fc1\cf1 21
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 perkins
+\b0    
+\b\fc0\cf0 Aug 10 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/PPP Daemon/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Fixed\
+       
+\b0 \
+
+\b\i\gray136\fc3\cf3   ip-up and ip-down examples need updating\
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [perkins Sat Aug 10 09:41:59 EDT 1996]\
+\
+Update ip-up and ip-down examples.\
+\
+\
+\
+\
+ams@best.com (Samuel G. Streeper) wrote:\
+\
+
+\gray46\fc4\cf4 > You need to restart the nameserver on your home system when\
+> you bring PPP up:\
+> \
+>      kill -USR2 <nmserver pid>\
+> \
+> (You may want to do this in your ppp-up script)  I've heard some\
+> people also do the same with lookupd but that hasn't been necessary\
+> for me.\
+
+\gray0\fc0\cf0 \
+    Sending the pre-OS 4.0 lookupd a USR2 signal causes it to toggle logging, \
+but sending it a HUP signal forces it to restart and thus read any new \
+resolv.conf indo.  You shouldn't have to do this unless you need to use \
+different nameservers when establishing your PPP connection.  I need to \
+connect to several different PPP servers, so I slide in the correct \
+resolv.conf and send resolv.conf a HUP signal in pppd's ip-up.\
+\
+    Note that sending the OS 4.0 lookupd a HUP signal won't cause it to \
+restart.  Restarting it manually will leave the system unusable until a \
+reboot :-(  NeXT is aware of this problem.\
+-- \
+Art Isbell                      NeXT/MIME Mail: aisbell@ix.netcom.com\
+Trego Systems                              Voice/Fax: +1 408 335 2515\
+CaseServ:  NEXTSTEP/OpenStep              Voice Mail: +1 408 335 1154\
+   managed care solutions              US Mail: Felton, CA 95018-9442\
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               \
+
+\b\gray128\fc1\cf1 22
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 perkins
+\b0    
+\b\fc0\cf0 Aug 13 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/PPP Daemon/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Open\
+       
+\b0 \
+
+\b\i\gray136\fc3\cf3   NXHosting \
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [perkins Tue Aug 13 09:06:52 EDT 1996]\
+\
+In article <4ule10$g2t@nuke.csu.net>, John Rudd <kzin@arcadia.sjsu.edu> wrote:\
+
+\gray46\fc4\cf4 >(isc-ts2-* are our dialup PPP lines.. each line in the hunt group has a \
+>different IP addy associated with it.. so you are likely to get a different \
+>one each time.  And this is why I can't do the "Services -> OpenSesame -> \
+>Open on host X", because that sends "-NXHost copernicus".. which is what my \
+>home machine internally identifies itself as)\
+
+\gray0\fc0\cf0 \
+The only way to get -NXHost to work over PPP is to have an IP address\
+assigned to your Ethernet port, and have a route to that address\
+reachable over the PPP.\
+\
+When you try to -NXHost, it uses UDP, and for some reason the UDP\
+protocol decides to use the Ethernet's IP address for outgoing\
+packets, rather than using the PPP's IP address.\
+\
+You'll also have similar problems trying to get talk to work over\
+PPP. Unless there is a route to your Ethernet's IP address, it isn't\
+going to work.\
+\
+-- \
+Chris Osborn, Network Administrator     Napa Valley College\
+707 253 3130 - Voice                    2277 Napa-Vallejo Hwy.\
+707 253 3063 - Fax                      Napa, CA 94558\
+<fozztexx@nvc.cc.ca.us>    <¬http://www.nvc.cc.ca.us/~fozztexx>\
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               \
+
+\b\gray128\fc1\cf1 25
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 perkins
+\b0    
+\b\fc0\cf0 Sep 17 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/Documentation/Installation Instructions/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Fixed\
+       
+\b0 \
+
+\b\i\gray136\fc3\cf3   typo?\
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [sysadmin Tue Sep 17 12:05:33 EDT 1996]\
+In ./NeXT/INSTALL, I assume '-DBPFILTER' in the second paragraph  \
+should be '-DNBPFILTER'? And the third paragraph applies with the  \
+second paragraph condition?\
+\
+ 4) If you plan in using tcpdump to monitor packets, you must\
+    enable the Berkley Packet Filter code.  Edit ./NeXT/Makefile\
+    and make sure the '-DNBPFILTER' option is defined in DFLAGS.\
+    WARNING: If you choose to use BPF, you must make sure that you\
+    compile _AND LOAD_ the bpf_reloc LKS _BEFORE_ you load the\
+    ppp_reloc LKS.  See the ./NeXT/bpf directory for more  \
+information.\
+\
+    If you don't want to compile in this code, please make sure that\
+    '-DBPFILTER' is _not_ defined in the ./NeXT/Makefile DFLAGS.\
+\
+    Also, make sure you read the installation file in ./NeXT/bpf.   \
+You\
+    will need to create a few special device files in /dev/.\
+\
+Stephen Johnson\
+stephen@ccc1.tamu.edu\
+\
+\
+
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               \
+
+\b\gray128\fc1\cf1 26
+\b0\gray0\fc0\cf0      Submitted:      
+\b\fc2\cf2 J. P. McCann
+\b0    
+\b\fc0\cf0 Oct 06 1996 00:00\
+       
+\b0 Topic:             
+\b /PPP-2.x/PPP Daemon/Option Handling/
+\b0 \
+       Owner:          
+\b perkins 
+\b0 (nobody)
+\b \
+
+\b0    Status:         
+\b Superseded\
+       
+\b0 \
+
+\b\i\gray136\fc3\cf3   Netcom ISP hookups disconnect with bsdcomp values\
+
+\i0\gray0\fc0\cf0      
+\b0 \
+
+\pard\tx1480\tx2020\tx2560\tx3080\tx3620\tx4160\tx4680\tx5220\tx5760\tx6280\f1\li960\fc0\cf0 [jpmeia@ix.netcom.com Sun Oct  6 20:11:22 CDT 1996]\
+When trying to connect to Netcom with any bsdcomp values (eg, bsdcomp 10,10) in the options script, connection will fail vice ignore bsdcomp.  Must use the "-bsdcomp" option to negotiate a connection that does not fail.
+\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\li960\fc0\cf0 \
+
+\li0 \
+Trackers:      perkins\
+               
+}
diff --git a/NeXT/Examples/NXHosting_with_PPP b/NeXT/Examples/NXHosting_with_PPP
new file mode 100644 (file)
index 0000000..7c744c4
--- /dev/null
@@ -0,0 +1,56 @@
+From: gbrown@alumni.caltech.edu (Glenn Brown)
+Subject: Re: ppp and NXHost problems
+Date: 23 Nov 1994 07:37:57 GMT
+Organization: California Institute of Technology, Pasadena
+
+If you want to NXHost over PPP, Simply execute the following 7 lines
+after the ppp connection has been brought up (these are simply the
+lines from the rc.net script that signal the nmserver that it should
+check for new interfaces.  Note that the kill command does not kill the
+nmserver.  Rather, it sends the "USR2" signal to the nmserver.)
+
+#!/bin/sh
+#  Let the nmserver know the fruits of our network configuration endeavor.
+pid=`ps cax | egrep nmserver | awk '{print $1;}'`
+if [ -n "$pid" ]; then
+    echo "Reinitializing nmserver's network portion"
+    /bin/kill -USR2 $pid
+fi
+
+Note 1: You have to executed the lines under "sh".  I suggest you
+save them in a file and type "/bin/sh file".
+
+Note 2: I haven't actually tried this (I don't have another NeXT to
+test it on), but I figured out out reading the rc scripts.  Please let
+me know the result if you try it.
+
+--Glenn
+
+----------------------------------------------------------------------
+
+In article <4ule10$g2t@nuke.csu.net>, John Rudd <kzin@arcadia.sjsu.edu> wrote:
+>(isc-ts2-* are our dialup PPP lines.. each line in the hunt group has a 
+>different IP addy associated with it.. so you are likely to get a different 
+>one each time.  And this is why I can't do the "Services -> OpenSesame -> 
+>Open on host X", because that sends "-NXHost copernicus".. which is what my 
+>home machine internally identifies itself as)
+
+The only way to get -NXHost to work over PPP is to have an IP address
+assigned to your Ethernet port, and have a route to that address
+reachable over the PPP.
+
+When you try to -NXHost, it uses UDP, and for some reason the UDP
+protocol decides to use the Ethernet's IP address for outgoing
+packets, rather than using the PPP's IP address.
+
+You'll also have similar problems trying to get talk to work over
+PPP. Unless there is a route to your Ethernet's IP address, it isn't
+going to work.
+
+-- 
+Chris Osborn, Network Administrator     Napa Valley College
+707 253 3130 - Voice                    2277 Napa-Vallejo Hwy.
+707 253 3063 - Fax                      Napa, CA 94558
+<fozztexx@nvc.cc.ca.us>    <¬http://www.nvc.cc.ca.us/~fozztexx>
+
+
diff --git a/NeXT/Examples/Persistent_Connection b/NeXT/Examples/Persistent_Connection
new file mode 100644 (file)
index 0000000..0813c51
--- /dev/null
@@ -0,0 +1,125 @@
+#! /usr/bin/perl
+
+# ip-down -- executed by pppd on connection death
+#
+# This particular implementation of ip-down attempts to re-establish
+# the ppp connection.  It does this by first forking and having the
+# parent die (returning control to the invoking pppd for final
+# cleanup).
+#
+# The child waits until the specified port (pppd passes the path to
+# the port's device as argument 2) is available and launches pppd (or
+# whatever is specfied by $PATH_pppd.
+#
+# This script requires "syslog.pl" (included with perl).  Because of
+# this, it also requires "syslog.ph";  "syslog.ph" can be
+# manufactured using the h2ph script included with the perl
+# distribution.  Under NeXTSTEP, one can create syslog.ph by:
+#
+#        h2ph < /usr/include/bsd/sys/syslog.h > syslog.ph
+#
+# 'syslog.ph' should either be copied into your machines perl library
+# (wherever syslog.pl resides), or you should add wherever syslog.ph
+# resides to Perl's library search path.
+#
+# Removing all references to syslog (including openlog() and
+# closelog()) will also work, but will render this script's execution
+# completely silent.
+#
+# By default, this script logs to the default target for ppp's logs --
+# LOCAL2.
+#
+# hacqued by: <bbum@friday.com>, jan 30 1995
+#
+# Please send any changes/improvements to <bbum@friday.com>.  And
+# please try not to laugh at this code... or, at least, tell me why
+# you are laughing so I won't make the same mistakes twice.
+
+# ABSOLUTE path to PPP daemon (or whatever you want executed after the
+# port becomes available).
+
+$PATH_pppd = "/usr/local/ppp/bin/pppd";
+
+# number of seconds to sleep between checking for port availability
+$lock_sleep = 2;
+
+require "syslog.pl";
+
+FORK: {
+    if ($pid = fork) {
+       # this is the parent.  It must die so the old pppd can
+       # clean-up and exit.
+       exit;
+    } elsif ($! =~ /No more process/) {
+       # oops! ran out of processes.  This is supposed to be a
+       # recoverable error, so sleep and try again.
+       sleep 5;
+       redo FORK;      
+    } elsif (!defined($pid)) {
+       # fork error -- log it and die.
+       &openlog("pppd/ip-down", 'cons,pid', LOG_LOCAL2);
+       &syslog('warning',
+               "Fork() error '$!'");
+       &closelog;
+       die "can't fork: $!\n";
+    }
+}
+
+# everything from here down is the child.
+&openlog("pppd/ip-down", 'cons,pid', LOG_LOCAL2);
+
+if ( ! @ARGV ) {
+    # no arguments -- exec specified thing (assume the process
+    # being called has a clue about what port it should use)
+
+    &syslog('info', "No device specified. Executing '$PATH_pppd'.");
+    &closelog;
+
+    exec $PATH_pppd;
+    ## NOT REACHED: exec never returns
+}
+
+# (assume-- it will if pppd starts ip-down)
+# ARGV contains:
+#          interface-name tty-device speed local-IP-address
+#          remote-IP-address
+($interface_name,
+ $tty_device,
+ $speed,
+ $local_IP_address,
+ $remote_IP_address) = @ARGV;
+
+# find the raw device name
+@path = split ('/', $tty_device);
+$device = pop @path;
+
+# Generate path to lock file -- assumes NeXT style device locking
+$lock = "/usr/spool/uucp/LCK/LCK..$device";
+
+# log some info.
+&syslog('info',
+       "Reconnecting '$interface_name' ($local_IP_address:$remote_IP_address) through '$tty_device' at '$speed' baud.");
+
+# check for lock
+if ( -e $lock) {
+
+    &syslog('info',
+           "'$device' locked. Waiting for unlock.");
+
+    # loop until unlocked
+    while ( -e $lock ) {
+       sleep $lock_sleep;
+    }
+}
+
+#### port available -- log and execute
+
+&syslog('info',
+       "Port '$device' available. Launching '$PATH_pppd'");
+
+&closelog;
+
+exec $PATH_pppd;
+### NOT REACHED
+
+
diff --git a/NeXT/Examples/README b/NeXT/Examples/README
new file mode 100644 (file)
index 0000000..bc35d58
--- /dev/null
@@ -0,0 +1,3 @@
+This directory contains example files that people have found useful
+on NeXTStep systems.  They were collected by Stephen Perkins
+(perkins@netmass.com).
diff --git a/NeXT/Examples/chap-secrets.example b/NeXT/Examples/chap-secrets.example
new file mode 100644 (file)
index 0000000..5cc3abb
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# This file is used to control CHAP access
+# the local machine.  See the man pages
+# for details.  Make sure this file does
+# not have world read access.
+#
+#"userid" "providerid" "Password"
+
+
diff --git a/NeXT/Examples/flow-control-hints b/NeXT/Examples/flow-control-hints
new file mode 100644 (file)
index 0000000..e0e6787
--- /dev/null
@@ -0,0 +1,9 @@
+From katzlbt@vuse.vanderbilt.edu mentions:
+
+I was working with software flow control (at 38400 baud) so the output
+to /dev/cufa resulted in a deadlock.  If the modem does not dial but
+shows TR, check hardware flow control by using the device /dev/cufa
+with tip. If this results in a deadlock relace your modem cable, for
+now replace /dev/cufa with /dev/cua and change the baudrate to 19200.
+
+
diff --git a/NeXT/Examples/ip-down.example b/NeXT/Examples/ip-down.example
new file mode 100644 (file)
index 0000000..92576ec
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+# -*- Fundamental -*-
+#
+# args: interface-name tty-device speed local-IP remote-IP
+
+PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc:/usr/local/bin; export PATH
+
+#
+# Remove the route to localhost that we created in ip-up
+#
+/usr/etc/route delete $4 127.0.0.1
+
+#  Let the nmserver know the fruits of our network configuration
+#  endeavor. This allows NXHost connections. Thanks to Glenn Brown
+#  <gbrown@alumni.caltech.edu>  
+pid=`ps cax | egrep nmserver | awk '{print $1;}'`
+if [ -n "$pid" ]; then
+    echo "PPP Reinitializing nmserver's network portion" > /dev/console
+    kill -USR2 $pid
+fi
+
+#
+# Let lookupd know that things have changed
+#
+pid=`ps cax | egrep lookupd | awk '{print $1;}'`
+if [ -n "$pid" ]; then
+    echo "PPP Reinitializing lookupd" > /dev/console
+    kill -HUP $pid
+fi
+
+
+
+
diff --git a/NeXT/Examples/ip-up.example b/NeXT/Examples/ip-up.example
new file mode 100644 (file)
index 0000000..0cd5266
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+# -*- Fundamental -*-
+#
+#
+# args: interface-name tty-device speed local-IP remote-IP
+
+PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc:/usr/local/bin; export PATH
+
+#
+# Add a route to localhost so netinfo won't sleep.
+#
+/usr/etc/route add $4 127.0.0.1 0
+
+
+#  Let the nmserver know the fruits of our network configuration
+#  endeavor. This allows NXHost connections. Thanks to Glenn Brown
+#  <gbrown@alumni.caltech.edu>  
+pid=`ps cax | egrep nmserver | awk '{print $1;}'`
+if [ -n "$pid" ]; then
+    echo "PPP Reinitializing nmserver's network portion" > /dev/console
+    kill -USR2 $pid
+fi
+
+
+#
+# Let lookupd know that things have changed
+pid=`ps cax | egrep lookupd | awk '{print $1;}'`
+if [ -n "$pid" ]; then
+    echo "PPP Reinitializing lookupd" > /dev/console
+    kill -HUP $pid
+fi
+
+
+#
+# Send any mail that has been queued while the link
+# was down.
+/usr/lib/sendmail -q &
+
+
+#
+# Synchronize our clock with some of the public NTP servers.
+#
+# norad.arc.nasa.gov  - 192.203.230.10
+# tick.usno.navy.mil  - 192.5.41.40
+#
+/usr/etc/ntp -sf 192.203.230.10 192.5.41.40 > /dev/console 2>&1 &
diff --git a/NeXT/Examples/options.example b/NeXT/Examples/options.example
new file mode 100644 (file)
index 0000000..14b58b8
--- /dev/null
@@ -0,0 +1,134 @@
+#
+# NOTE:  All options in the file are commented out.  PPP.app
+#        typically takes care of setting options on a per provider
+#        basis.  If you want to set a global option, then 
+#        add/uncomment the appropriate option in this file.
+#
+#
+# This is an example options file.  The options file
+# should be placed in /etc/ppp/options.  These options
+# are global to all ppp connections.  See the "OPTIONS FILES" section
+# in the pppd man page for more details.
+#
+# Options specified here don't need to be respecified
+# on the pppd command line.  Note: Most of the example
+# scripts in this directory assume an empty options file.
+# However, it doesn't hurt to respecify them.
+#
+
+#
+# The size of the Maximum Transfer Unit.  Higher values
+# give better performance for file transfers.  Lower values
+# give better performance for interactive performance.
+#
+#mtu 296
+
+#
+# If you want to periodically touch the other end to make 
+# sure it is still alive, set these options.
+#
+#lcp-echo-interval 15    # interval in seconds between touches
+#lcp-echo-failure  3     # number of failed attempts before link shutdown
+
+#
+# If you want to enable debugging of the pppd process, leave
+# this uncommented.  Output will be sent to the file
+# /usr/adm/ppp2.2.debug (or whatever you set it to in
+# /etc/syslog.conf.
+#
+#debug
+
+#
+# If you want kernel debugging (i.e. debug output from the
+# NeXT LKS), enable this:
+#
+# kdebug 1  is SC_DEBUG
+#        2  is SC_LOG_INPKT
+#        4  is SC_LOG_OUTPKT
+#        8  is SC_LOG_RAWIN
+#        16 is SC_LOG_FLUSH
+# 
+# add together to get debugging you want.
+#
+#kdebug 17
+
+#
+# If you want pppd to set the PPP connection as the default
+# route when the link is brought up, enable this option.
+# Standalone systems dialing into a provider probably want this
+# option.
+#
+#defaultroute
+
+#
+# These two options disable some of the
+# various types of authentication.
+#
+# Note: Some systems require authenticaion before
+#       negotiation can complete.  If you disable
+#       authentication on these systems, they will
+#       not complain, but they will also not allow
+#       negotiaion to complete and your link will
+#       not come up.
+#
+# NOTE: PAP and CHAP authentication are enabled
+#       by default.
+#
+# If you uncomment either or both of these, you will
+# refuse that type of authentication if the server
+# requests it.  DO NOT put +pap or +chap.  This will
+# require the server to authenticate to you and it will
+# refuse (causing PPP to fail).  read the pppd man page
+# to create the proper secrets files.
+#
+#-pap
+#-chap
+
+#
+# This specifies that should use a UUCP-style lock on the
+# serial device to ensure exclusive access to the device.
+#
+#lock
+
+#
+# Use hardware flow control (i.e. RTS/CTS) to control the
+#  flow of data on the serial port.
+#
+# On NeXT, you also must use the proper device.
+#  /dev/cufa 
+#    -or-
+#  /dev/cufb
+#
+#crtscts
+
+#
+# bsdcomp nr,nt
+#
+# Request that the peer compress packets that it sends,
+# using the BSD-Compress scheme, with a maximum code size
+# of nr bits, and agree to compress packets sent to the
+# peer with a maximum code size of nt bits.  If nt is not
+# specified, it defaults to the value given for nr.
+# Values in the range 9 to 15 may be used for nr and nt;
+# larger values give better compression but consume more
+# kernel memory for compression dictionaries.  Alterna-
+# tively, a value of 0 for nr or nt disables compression
+# in the corresponding direction.
+#
+# It is OK if the peer doesn't support BSD compression.  In that
+# case, the peer will NAK this option and things will continue
+# normally.
+#
+#bsdcomp 10,10 
+
+#
+# Add an entry to this system's ARP [Address Resolution
+# Protocol] table with the IP address of the peer and the
+# Ethernet address of this system.
+#
+# This is only necessary if your are allowing others to dial
+# into you (i.e. you are the server).
+#proxyarp
+
+
+
diff --git a/NeXT/Examples/pap-secrets.example b/NeXT/Examples/pap-secrets.example
new file mode 100644 (file)
index 0000000..8e415a4
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# This file is used to control PAP access
+# the local machine.  See the man pages
+# for details.  Make sure this file does
+# not have world read access.
+#
+#"userid" "providerid" "Password"
+
+
diff --git a/NeXT/Examples/ppp_multiple_hosts.tar.gz b/NeXT/Examples/ppp_multiple_hosts.tar.gz
new file mode 100644 (file)
index 0000000..ddeda96
Binary files /dev/null and b/NeXT/Examples/ppp_multiple_hosts.tar.gz differ
diff --git a/NeXT/Examples/pppdown b/NeXT/Examples/pppdown
new file mode 100644 (file)
index 0000000..c35471f
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# This script fill find processes with 'pppd' in the name 
+# and send them SIGINT.  It must be run suid root to work
+# correctly.  Some people don't like suid root shell scripts.
+# In that case, check out the example pppkill.c which contains a
+# C program that does the same thing.  This might be a bit safer
+# to make suid root.
+#
+# Note: there is the potential that this script can kill more than
+#       one process.  Maybe even an incorrect process.  It could 
+#       probably be done better.
+#
+
+PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc:/usr/local/bin; export PATH
+
+kill -INT `ps -ax | egrep "(pppd)" | egrep -v "egrep" | sed 's/^\([ 0-9]*\) .*/\1'/`
+exit 0
diff --git a/NeXT/Examples/pppkill.c b/NeXT/Examples/pppkill.c
new file mode 100644 (file)
index 0000000..932eaca
--- /dev/null
@@ -0,0 +1,90 @@
+Many thanks to:
+   shess@winternet.com (Scott Hess)  
+   andrew_abernathy@wire.seanet.com (Andrew Abernathy)
+   michal@ellpspace.math.ualberta.ca (Michal Jaegermann)
+
+for contributing programs that can take the place
+of the pppdown script.  I have included Scott Hess's 
+(now modified) here.  If you would like to see the other program, please
+mail Andrew.
+
+======================================================================
+
+From shess@winternet.com Mon Jan  9 02:45 EST 1995
+Date: Mon, 9 Jan 95 01:45 CST
+From: shess@winternet.com (Scott Hess)
+Reply-To: shess@winternet.com (Scott Hess)
+To: Steve Perkins <perkins@cps.msu.edu>
+Subject: Bringing down ppp.
+
+[munch]
+
+In any case, having to run pppdown as root has been annoying,
+because I don't like to run things as root more than necessary.
+In other words, more than about once a week is too often :-).  So,
+I wrote the following quick&dirty hack.  Basic operation is to read
+the pppd pid from a file where it's stored and send a SIGINT to
+that process.  Since there's not a shell script in sight, this
+should be a reasonably safe program to make setuid root.  [I'll
+have to think on what someone can do if they crack it or /etc/ppp
+and can send SIGINT to just anyone.  Perhaps it should check to
+see if the process is really a pppd?  Oh, well.]
+
+howard:/tmp> ls -l /usr/local/ppp/bin/killppp 
+
+-rwsr-sr-x  1 root        1464 Jan  7 12:41 /usr/local/ppp/bin/killppp*
+howard:/tmp> cat /usr/local/ppp/src/killppp.c 
+
+/*
+ * Originally written by Scott Hess <shess@winternet.com>
+ * and later modified by Michal Jaegermann  <michal@ellpspace.math.ualberta.ca>
+ */
+
+#include <libc.h>
+#include <stdio.h>
+
+
+#include <libc.h>
+#include <stdio.h>
+
+#define PIDF "/etc/ppp/ppp0.pid"
+
+int
+main( void)
+{
+    FILE *ff;
+    int pid;
+
+    
+    if( NULL == (ff = fopen( PIDF, "r"))) {
+        perror( "opening " PIDF
+       "\nppp0 link does not seem to be active" );
+        exit(1);
+    }
+    
+
+    if( fscanf( ff, "%d", &pid)<1) {
+        fprintf( stderr, "Cannot read pid from" PIDF "\n");
+        exit(1);
+    }
+    
+
+    fclose( ff);
+    if( kill( pid, SIGINT)==-1) {
+        perror( "killing pppd");
+       fprintf( stderr, "removing stale" PIDF "file\n");
+       if (0 != unlink( PIDF)) {
+           perror("cannot remove" PIDF);
+       }
+       exit(1);
+    }
+    return 0;
+}
+
+Later,
+---
+scott hess <shess@winternet.com> (WWW to "http://www.winternet.com/~shess/")
+Home:   12901 Upton Avenue South, #326  Burnsville, MN 55337  (612) 895-1208
+Office: 101 W. Burnsville Pkwy, Suite 108E, Burnsville, MN 55337    890-1332
+<?If you haven't the time to design, where will you find the time to debug?>
+
diff --git a/NeXT/Examples/pppup.annex b/NeXT/Examples/pppup.annex
new file mode 100644 (file)
index 0000000..d5ee18f
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh -f
+# -*- Fundamental -*-
+#
+# kdebug 1  is SC_DEBUG
+#        2  is SC_LOG_INPKT
+#        4  is SC_LOG_OUTPKT
+#        8  is SC_LOG_RAWIN
+#        16 is SC_LOG_FLUSH
+# 
+# add together to get debugging you want
+# Remember: for HW flow control you must you /dev/cufa or /dev/cufb
+#
+#
+#  This is an example that dials a modem, logs into a remote Annex terminal
+#  server and starts ppp. 
+#
+exec /usr/local/bin/pppd bsdcomp 10,10 mtu 296 lcp-echo-interval 15 \
+lcp-echo-failure 3 debug crtscts kdebug 17 defaultroute modem -pap -chap \
+connect '/usr/local/bin/chat -v ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIAL TONE" ABORT "ERROR" "" ATZ0 "OK" ATDT####### CONNECT "" MSUnet: ppp sername: USER assword: PASS PPP.' \
+/dev/cufa 57600 lock
+
diff --git a/NeXT/Examples/pppup.direct b/NeXT/Examples/pppup.direct
new file mode 100644 (file)
index 0000000..4958fc6
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh -f
+#
+# -*- Fundamental -*-
+#
+# kdebug 1  is SC_DEBUG
+#        2  is SC_LOG_INPKT
+#        4  is SC_LOG_OUTPKT
+#        8  is SC_LOG_RAWIN
+#        16 is SC_LOG_FLUSH
+# 
+# add together to get debugging you want
+# Remember: for HW flow control you must you /dev/cufa or /dev/cufb
+#
+# This is used to start a ppp session over a link that is directly
+# connected to another computer.  Make sure the peer runs at the
+# same speed.
+#
+/usr/local/bin/pppd bsdcomp 10,10 ipcp-restart 4 ipcp-max-configure 5 lcp-echo-failure 3 lcp-echo-interval 30 debug crtscts kdebug 17 -pap -chap /dev/ttyfb 38400 lock
+exit 0
diff --git a/NeXT/Examples/pppup.portmaster b/NeXT/Examples/pppup.portmaster
new file mode 100644 (file)
index 0000000..c6431ff
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh -f
+#
+#  Call a portmaster terminal server;
+#  start ppp.
+#
+# Thanks to Terence John Parr <parrt@parr-research.com>
+#
+exec /usr/local/ppp/bin/pppd \
+netmask 255.255.255.0 bsdcomp 10,10 mtu 296 lcp-echo-interval 15 \
+lcp-echo-failure 3 debug crtscts kdebug 31 defaultroute modem +pap -chap \
+connect '/usr/local/ppp/bin/chat -v ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIAL TONE" ABORT "ERROR" "" ATZ0 "OK" ATDT000-0000 CONNECT "" ogin:--ogin: mylogin: assword: mypassword.' \
+/dev/cufb 57600
diff --git a/NeXT/Examples/pppup.remote b/NeXT/Examples/pppup.remote
new file mode 100644 (file)
index 0000000..5e10552
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/csh -f
+#
+# -*- Fundamental -*-
+#
+#
+# kdebug 1  is SC_DEBUG
+#        2  is SC_LOG_INPKT
+#        4  is SC_LOG_OUTPKT
+#        8  is SC_LOG_RAWIN
+#        16 is SC_LOG_FLUSH
+# 
+# add together to get debugging you want
+# Remember: for HW flow control you must you /dev/cufa or /dev/cufb
+#
+# This script is used as the shell for a user account entitiled ppp.
+# When users log into this account, PPP is automatically started
+# (through this script).  The 'echo' command is to help the remote
+# process synchronize with this end.
+echo Starting PPP
+/usr/bin/mesg n
+/bin/stty -tostop litout
+exec /usr/local/bin/pppd passive bsdcomp 10,10 lcp-echo-interval 15 lcp-echo-failure 3 debug kdebug 17 57600
diff --git a/NeXT/Examples/pppup.zyxel b/NeXT/Examples/pppup.zyxel
new file mode 100644 (file)
index 0000000..a1d87fc
--- /dev/null
@@ -0,0 +1,27 @@
+ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIAL TONE" ABORT "ERROR"
+""
+ATI1 "OK"
+AT+FCLASS=0 "OK"
+ATS42.1=0 "OK"
+ATS38.3=1 "OK"
+ATS38.5=1 "OK"
+ATS2=128 "OK"
+ATS46.2=1 "OK"
+AT&K4 "OK"
+AT&N0 "OK"
+ATM0 "OK"
+ATV1 "OK"
+ATQ0 "OK"
+ATX5 "OK"
+AT&C1 "OK"
+AT&D3 "OK"
+AT&H3 "OK"
+AT&J0 "OK"
+AT&L0 "OK"
+AT&M0 "OK"
+AT&R1 "OK"
+AT&S0 "OK"
+ATN1 "OK"
+ATDT########
+CONNECT "" ogin: USERNAME assword: PASSWORD
+ACTIVE
diff --git a/NeXT/Examples/redial.sh b/NeXT/Examples/redial.sh
new file mode 100644 (file)
index 0000000..5c40acf
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/csh
+# Script for multiple redialing to bring up PPP connection.
+# Written by Colin.Allen@tamu.edu
+# I make no warranties about this script, but if you have suggestions
+# for improving it please feel free to email them to me.
+
+# Last modified 11-29-95
+
+if ( -f /usr/local/ppp/etc/ppp0.pid ) then
+
+# The ppp0.pid file should only exist with an active ppp connection
+# in which case we don't want to try to dial out. Sometimes the file
+# will need to be deleted manually if ppp was dropped abnormally.
+
+        echo ERROR: PPP already running.
+        set quit = y
+else
+        set quit = n
+        set count = 0
+        set limit = 500
+       set script = pppup
+
+endif
+
+while ( $quit != y );
+
+# Next we loop as long as we are not quitting.  Each circuit we check
+# for a connection and if it's there we launch PopOver.
+# Delete or add other programs as desired.
+
+        if ( -f /usr/local/ppp/etc/ppp0.pid ) then
+                set quit = y
+                echo Connected after $count attempts.
+                echo -n "Launching PopOver...Process id: "
+                nohup /LocalApps/PopOver.app/PopOver &
+                echo Done.
+
+# If the connection is not there we ascertain whether the modem is
+# still trying to get a connection by looking to see if "chat" appears
+# in the output of ps.  It is bound to appear at least once because ps
+# will find the grep process.  If it appears exactly once then any
+# previous connection attempt has failed and we need to allow time
+# for the modem to reset, then we are free to dial again.
+
+# You may be able to optimize this script by adjusting the sleep values
+# below.  My modem (a ZyXEL 1496E) takes about 8 seconds to reset after
+# hanging up.
+
+        else
+                set chat =  `ps | grep -c chat`
+                if ( $chat == 1 ) then
+                        if ( $count != 0 ) then
+                                echo "no connect"
+                                sleep 8
+                        endif
+                        @ count++
+                        if ( $count == $limit ) then
+                                echo "Dial count over limit.  Aborting."
+                                set quit = y
+                        else
+                                /usr/local/ppp/scripts/$script
+                                echo -n "($count) Dialing..."
+                                sleep 5
+                                echo -n "trying to connect..."
+                                sleep 5
+                        endif
+                else
+
+# If chat is still working we just wait a bit and loop again.
+
+                        echo -n "."
+                        sleep 5
+                endif
+        endif
+end
+
index d43f541315aa4aff258ef8156095e1fe91bc1d54..bd00b615e77bb916f81177269049f783ac72b519 100644 (file)
@@ -4,24 +4,22 @@
 
 Authoritative information can be found at:
 
 
 Authoritative information can be found at:
 
-  WWW site:     http://www.thoughtport.com:8080/PPP/ 
-  FTP site:     ftp://ftp.thoughtport.com/pub/next/ppp
-  Mirror FTP:   ftp://ftp.duq.edu/pub/next/ppp/
-  Mirror FTP:   ftp://ftp.NMR.EMBL-Heidelberg.DE/pub/next/ppp/
+  WWW site:     http://www.peak.org/next/ppp/
+  WWW mirror:   http://www.thoughtport.com:8080/PPP/
+
+  FTP site:     ftp://next-ftp.peak.org/pub/next/apps/internet/ppp/dev
+  FTP Mirror:   ftp://ftp.NMR.EMBL-Heidelberg.DE/pub/next/ppp/
 
 If you have questions or problems, please visit the WWW site
 for FAQ and mailing list information.
 
 
 If you have questions or problems, please visit the WWW site
 for FAQ and mailing list information.
 
-NEW: If you want to submit a bug report, use the new MailBug.app
-     provided in this directory.  You will need to install it as
-     you would any package.  If you don't have email access, please
-     use bug submission form on the WWW site.
+NEW: If you want to submit a bug report, please
+     use the bug submission form on the WWW site.
 
 If you use this software and are pleased with its performance, you are
 encouraged to make a donation to support continued development.  50%
 of all donations go to charity.  For more information, please see:
 
 If you use this software and are pleased with its performance, you are
 encouraged to make a donation to support continued development.  50%
 of all donations go to charity.  For more information, please see:
-  http://www.thoughtport.com:8080/PPP/donations.html
-
+  http://www.thoughtport.com:8080/cgi-bin/PPP/donation
 
 
 NeXT Specific Installation Instructions
 
 
 NeXT Specific Installation Instructions
@@ -43,51 +41,41 @@ To install on a computer running NeXTSTEP:
     ./NeXT/hppa/README.hppa and install the serial
     driver patch.  Successfull installation of this
     patch will require a reboot of your machine.  HPPA
     ./NeXT/hppa/README.hppa and install the serial
     driver patch.  Successfull installation of this
     patch will require a reboot of your machine.  HPPA
-    is not supported.
+    is no longer supported.
 
  3) If you have previously installed a SLIP package, comment out
     the slip configuration code in /etc/rc.local and reboot your
     machine.  SLIP and PPP _should_ interoperate but for initial
     testing it is best to remove SLIP.
 
 
  3) If you have previously installed a SLIP package, comment out
     the slip configuration code in /etc/rc.local and reboot your
     machine.  SLIP and PPP _should_ interoperate but for initial
     testing it is best to remove SLIP.
 
- 4) If you are using Intel, you _must_ get the latest NeXT serial
-    drivers from NeXTAnswers.  You need both the serial and ttyport
-    drivers (version 3.33 or later).  Install these according to
-    the directions.  PPP-2.3 is optimized to work with 
-    the NeXT drivers.   It will work with the Mux driver, but
-    that driver has been known to cause panics with PPP.
-
- 5) If you plan in using tcpdump to monitor packets, you must
-    enable the Berkley Packet Filter code.  Edit ./NeXT/Makefile
-    and make sure the '-DNBPFILTER' option is defined in DFLAGS.
-    WARNING: If you choose to use BPF, you must make sure that you
-    compile _AND LOAD_ the bpf_reloc LKS _BEFORE_ you load the
-    ppp_reloc LKS.  Also, make sure you read the installation file in
-    ./NeXT/bpf.  You will need to create a few special device files in
-    /dev/.
-
-    If you don't want to compile in this code, please make sure that
-    '-DBPFILTER' is _not_ defined in the ./NeXT/Makefile DFLAGS.
-
- 6) Type ./configure in the top level PPP directory.  This will set
+ 4) If you are using Intel OS version 3.3, you _must_ get the latest
+    NeXT serial drivers from NeXTAnswers.  You need both the serial
+    and ttyport drivers (version 3.33 or later).  Install these
+    according to the directions.  PPP-2.3 is optimized to work with 
+    the NeXT drivers.   It will work with the Mux driver (especially
+    beneficial for OS versions prior to 3.3), but that driver has been
+    known to cause panics with PPP.  If you use OS 4.x you can use the
+    drivers that came with the system.
+
+ 5) Type ./configure in the top level PPP directory.  This will set
     up some necessary links.
 
     up some necessary links.
 
7) If you have developer 3.2, you need to use the old version of
6) If you have developer 3.2, you need to use the old version of
     chat.c.  Perform:
       a) cd to the chat directory
       b) backup chat.c (mv chat.c chat.c.orig)
       c) use the old chat (mv chat.c.3.2 chat.c)
 
     chat.c.  Perform:
       a) cd to the chat directory
       b) backup chat.c (mv chat.c chat.c.orig)
       c) use the old chat (mv chat.c.3.2 chat.c)
 
8) Edit ./Makefile and set the installation directories.
7) Edit ./Makefile and set the installation directories.
     If you change the ETCDIR you will need to modify pathnames in
     pppd/pathnames.h. I recommend keeping it set to /etc/ppp. 
     If you don't specifically like that directory, you may
     also change the Makefile directory and put a link in /etc/ppp
     If you change the ETCDIR you will need to modify pathnames in
     pppd/pathnames.h. I recommend keeping it set to /etc/ppp. 
     If you don't specifically like that directory, you may
     also change the Makefile directory and put a link in /etc/ppp
-    that points to the proper place.
+    that points to the proper place. 
 
     You will also want to set the -arch flags to the appropriate
     architectures.  Leaving it blank will default to your current
 
     You will also want to set the -arch flags to the appropriate
     architectures.  Leaving it blank will default to your current
-    architecture.
+    architecture. 
 
  9) Do a:
       make 
 
  9) Do a:
       make 
@@ -99,10 +87,9 @@ To install on a computer running NeXTSTEP:
 If you are performing an upgrade, you are done after successfully
 making and installing the latest release.  All you need to do is to
 reboot your machine so that the new loadable kernel server (LKS) is
 If you are performing an upgrade, you are done after successfully
 making and installing the latest release.  All you need to do is to
 reboot your machine so that the new loadable kernel server (LKS) is
-loaded. Make sure you remember to edit /etc/rc.local and add the code
-to load the bpf_reloc LKS (if you enabled BPF support).  You should be
-able to start the upgraded PPP just like normal.  If this doesn't
-work, see the "Troubleshooting" section later on.
+loaded.  You should be able to start the upgraded PPP just like
+normal.  If this doesn't work, see the "Troubleshooting" section later
+on.
 
 Also, you might want to compare the ip-up and ip-down scripts in 
 the ./NeXT/Examples directory with those you have installed in
 
 Also, you might want to compare the ip-up and ip-down scripts in 
 the ./NeXT/Examples directory with those you have installed in
@@ -135,20 +122,8 @@ done once.  These steps do not need to be re-performed for an upgrade.
    separators ;) somewhere near the end of the file /etc/rc.local:
  
 ======================================================================
    separators ;) somewhere near the end of the file /etc/rc.local:
  
 ======================================================================
-#
-# Load the Berkley Packet Filter LKS
-# This must be done before PPP.  Comment this out
-# if you disabled BPF. If you use BPF, you _must_ 
-# load it before the PPP LKS.  If you chaged pathnames
-# in the Makefile, make sure the appropriate paths are
-# used below.
-#
-if [ -f /usr/local/bpf/reloc/bpf_reloc ]; then
-       /usr/etc/kl_util -a /usr/local/bpf/reloc/bpf_reloc
-fi
-
 # 
 # 
-# Load the selected version of the PPP-2.2 loadable
+# Load the selected version of the PPP-2.3 loadable
 # kernel server (LKS).
 #     
 if [ -f /usr/local/ppp/reloc/ppp_reloc ]; then
 # kernel server (LKS).
 #     
 if [ -f /usr/local/ppp/reloc/ppp_reloc ]; then
@@ -157,15 +132,10 @@ if [ -f /usr/local/ppp/reloc/ppp_reloc ]; then
 fi
 ======================================================================
 
 fi
 ======================================================================
 
-  If you choose not to use BPF, then comment out the first lines
-  of code by adding the '#' mark in front of them (similar to the 
-  comment lines that are already in place).  All three lines
-  (including the 'if' and 'fi') need to be commented.
-
   This code will now be executed next time you reboot your machine.
   This code will now be executed next time you reboot your machine.
-  You can verify that this was executed by checking  the output of
+  You can verify that this was executed by checking the output of
   /usr/adm/messages upon a successful reboot.  There should be a
   /usr/adm/messages upon a successful reboot.  There should be a
-  section of output that says the PPP-2.2 LKS was successfully loaded.
+  section of output that says the PPP-2.3 LKS was successfully loaded.
 
 
 2) The default Makefile paths place PPP files  in a directory called
 
 
 2) The default Makefile paths place PPP files  in a directory called
@@ -199,7 +169,6 @@ fi
    to you from the command line.  However, before you can immediately
    see them, you may need to log out and log back in.
  
    to you from the command line.  However, before you can immediately
    see them, you may need to log out and log back in.
  
-
 3) Once you start trying to make PPP connections, it is important
    to have access to the logging information that PPP generates. This
    will allow you to follow the progress of PPP and will aid in
 3) Once you start trying to make PPP connections, it is important
    to have access to the logging information that PPP generates. This
    will allow you to follow the progress of PPP and will aid in
@@ -218,11 +187,11 @@ fi
    Now, as root, use vi or your favorite editor to edit the file
    /etc/syslog.conf.  You need to add the line:
 
    Now, as root, use vi or your favorite editor to edit the file
    /etc/syslog.conf.  You need to add the line:
 
-       local2.debug            /usr/adm/ppp2.2.log
+       local2.debug            /usr/adm/pppd.log
 
    It is _imperative_ that you place a <tab> character
    between the level "local2.debug" and the file name
 
    It is _imperative_ that you place a <tab> character
    between the level "local2.debug" and the file name
-   "/usr/adm/ppp2.2.log.  Do _not_ use spaces. If your
+   "/usr/adm/pppd.log.  Do _not_ use spaces. If your
    editor converts tab characters to spaces, you need to
    use a different editor.  Also beware of cutting and pasting
    between buffers.  Sometimes a tab will be converted to spaces
    editor converts tab characters to spaces, you need to
    use a different editor.  Also beware of cutting and pasting
    between buffers.  Sometimes a tab will be converted to spaces
@@ -230,7 +199,7 @@ fi
    my /etc/syslog.conf:
 
 ======================================================================
    my /etc/syslog.conf:
 
 ======================================================================
-local2.debug                                   /usr/adm/ppp2.2.log
+local2.debug                                   /usr/adm/pppd.log
 *.err;kern.debug;auth.notice                   /dev/console
 kern.debug;daemon,auth.notice;*.err;mail.crit  /usr/adm/messages
 mark.debug,daemon.info                         /usr/adm/messages
 *.err;kern.debug;auth.notice                   /dev/console
 kern.debug;daemon,auth.notice;*.err;mail.crit  /usr/adm/messages
 mark.debug,daemon.info                         /usr/adm/messages
@@ -248,12 +217,13 @@ mail.info                                 /usr/spool/mqueue/syslog
    This step is necessary because if syslog does not see the file, it
    will not create it.  So, removing the file is a handy way to turn
    off the logging.  To create an empty logging file, as root execute:
    This step is necessary because if syslog does not see the file, it
    will not create it.  So, removing the file is a handy way to turn
    off the logging.  To create an empty logging file, as root execute:
-        touch /usr/adm/ppp2.2.log
+        touch /usr/adm/pppd.log
 
    Upon a successful reboot, logging will be enabled for pppd
    (remember to specify the 'debug' option to pppd to get reasonable 
    information sent to the logging file).
 
 
    Upon a successful reboot, logging will be enabled for pppd
    (remember to specify the 'debug' option to pppd to get reasonable 
    information sent to the logging file).
 
+
 4) You should copy a few files to a new directory.  Part of the
    installation process creates a new directory (or link)
    called /etc/ppp/. Further, it creates an empty file called
 4) You should copy a few files to a new directory.  Part of the
    installation process creates a new directory (or link)
    called /etc/ppp/. Further, it creates an empty file called
@@ -265,82 +235,13 @@ mail.info                                 /usr/spool/mqueue/syslog
    following commands.  It assumes you are in the PPP distribution
    directory:
 
    following commands.  It assumes you are in the PPP distribution
    directory:
 
-     cp NeXT/Examples/options /etc/ppp/options
+     cp NeXT/Examples/options.example /etc/ppp/options
      cp NeXT/Examples/ip-up.example /etc/ppp/ip-up
      cp NeXT/Examples/ip-down.example /etc/ppp/ip-down
      /usr/etc/chown root.wheel /etc/ppp/options /etc/ppp/ip-up /etc/ppp/ip-down
      chmod 644 /etc/ppp/options
      chmod  511 /etc/ppp/ip-up /etc/ppp/ip-down
      cp NeXT/Examples/ip-up.example /etc/ppp/ip-up
      cp NeXT/Examples/ip-down.example /etc/ppp/ip-down
      /usr/etc/chown root.wheel /etc/ppp/options /etc/ppp/ip-up /etc/ppp/ip-down
      chmod 644 /etc/ppp/options
      chmod  511 /etc/ppp/ip-up /etc/ppp/ip-down
 
 
-5) If you have a standalone machine, it is necessary for you to make
-   sure your system is configured to correctly support a network.  The
-   following steps will help in correctly configuring your machine.
-   Please note, if you do not have a standalone machine (i.e. you are
-   on a local network), you need to speak with your system
-   administrator to determine the proper configuration for your
-   machine.  In most cases, a machine correctly configured for a
-   network will not need to perform the steps listed here. The
-   following only applies to standalone machines.
-
-   It is suggested that you reboot your machine _before_ you start 
-   these procedures.  This is to verify that you successfully
-   completed the previous steps and that your machine does indeed
-   reboot.  If it doesn't, you should replace /etc/rc.local with the
-   backup copy and reboot.  Then, determine why your modifications
-   failed.  After successfully rebooting, you are ready to move on to 
-   these steps.
-
-   As root, make a backup copy of /etc/hostconfig.  You might
-   name it /etc/hostconfig.prePPP.  If, after the following steps, you
-   run into problems booting your machine, you may replace
-   /etc/hostconfig with the backup and you should be able to
-   successfully reboot.
-
-   Start up the HostManager.app (under /NextAdmin).  After
-   successfully entering the root password, you should get the
-   HostManager Menu.  Select the "Local..." menu option to get the
-   main window.  Modify it as follows: 
-
-          For "NetInfo Binding", select "use local domain only"
-           and make sure the box for "Readable only by local net" 
-           is checked.
-
-           For "Hostname", fill in your host name as appropriate.  Do
-           _not_ add the domain name.  For example, use "sidney"
-           rather than "sidney.cps.msu.edu". 
-
-           For "NIS Domain Name", select "None"
-
-           For "Internet Address", use the provided IP address
-           (probably 192.42.172.1) unless your system administrator has
-           assigned you your own unique IP address.  In this case,
-           reverify that you are a standalone machine.  Please
-           note... if your PPP service provider has assigned you an
-           IP address, do _NOT_ use that address here.  That address
-           will be used later.  Use whatever address is already in
-           the display.
-
-           For "Broadcast Address", select "Default"
-       
-          For "Time Standard", select "Ignore Network Time"
-
-           For "Netmask", select "Default"
-
-           For "Router", select "None"
-
-  When this is complete, click the "Set" button.   You will then have
-  the option to reboot or to skip the reboot.  Choose the appropriate 
-  action.  It is suggested that you reboot immediately and verify that
-  your system does indeed reboot (and behave as normal).  If it
-  doesn't, replace /etc/hostconfig with the backup copy and then
-  reboot.  Once you are back up, determine the problem with your
-  configuration. 
-
-  Please note that this description is generic and will work in most
-  cases.  There are lots of variations that people can and will need 
-  to make. Your network administrator will be able to provide you with
-  the correct details for your particular site.
 
 Congratulations!  You have successfully installed PPP and are now
 ready to start up a connection.  See the section "Initial Testing" for
 
 Congratulations!  You have successfully installed PPP and are now
 ready to start up a connection.  See the section "Initial Testing" for
@@ -354,7 +255,11 @@ One of the most notoriously difficult portions of getting PPP links up
 and running involves writing the script that automatically dials your
 modem, connects to the peer, and starts the remote ppp process.  Once
 you are connected to the peer, each PPP process will start
 and running involves writing the script that automatically dials your
 modem, connects to the peer, and starts the remote ppp process.  Once
 you are connected to the peer, each PPP process will start
-communications and things become much easier.
+communications and things become much easier.  Several frontends are
+available that help ease this problem.  See:
+  http://www.peak.org/next/ppp/NeXT_PPP_Frontends.html
+for more information on those.  If you want or need to go the
+scripting route, then please read on.
 
 Before you dive into script writing, there is a simpler solution that
 will allow you to test the ppp portion.  Once this works, getting the
 
 Before you dive into script writing, there is a simpler solution that
 will allow you to test the ppp portion.  Once this works, getting the
@@ -413,7 +318,7 @@ There are several ways to determine if the link has actaully been
 established.  I will go through some of them.
 
 1) You may look at the pppd log file (typically
 established.  I will go through some of them.
 
 1) You may look at the pppd log file (typically
-   /usr/adm/ppp2.2.log).  If you see lines that look similar to:
+   /usr/adm/pppd.log).  If you see lines that look similar to:
 
     Jan 11 23:13:38 sidney2b pppd[2141]: local  IP address 35.9.12.55
     Jan 11 23:13:38 sidney2b pppd[2141]: remote IP address 35.9.10.13
 
     Jan 11 23:13:38 sidney2b pppd[2141]: local  IP address 35.9.12.55
     Jan 11 23:13:38 sidney2b pppd[2141]: remote IP address 35.9.10.13
@@ -484,7 +389,8 @@ the scripts icon.  This will start the chat process that will dial the
 modem and log into the remote system.  It will then turn control over
 to pppd.  If your script is successful (as described in the
 "Determining if the link is actually up" section), you will be all
 modem and log into the remote system.  It will then turn control over
 to pppd.  If your script is successful (as described in the
 "Determining if the link is actually up" section), you will be all
-set.  All your apps, OmniWeb, FTP, telnet, etc should work.
+set.  All your apps, OmniWeb, FTP, telnet, etc should work.  Please
+note that pppd itself will not appear to do anything but sit there.
 
 Once you are through using the connection, you can close down the PPP
 link by executing the ppp down script.  Again, this can be done by
 
 Once you are through using the connection, you can close down the PPP
 link by executing the ppp down script.  Again, this can be done by
@@ -519,9 +425,8 @@ the command line).
 
 The second thing is a list of name servers.  These should be local to
 your ppp provider.  Your network administrator will be able to provide
 
 The second thing is a list of name servers.  These should be local to
 your ppp provider.  Your network administrator will be able to provide
-you with the appropriate addresses. There are default name servers to
-use in case the local provider is not responding.  An example file
-might look like:
+you with the appropriate addresses and you should use those, not the
+ones listed below.  An example file might look like:
 
 ----------------------------------------------------------------------
 domain cps.msu.edu
 
 ----------------------------------------------------------------------
 domain cps.msu.edu
@@ -538,12 +443,6 @@ nameserver 35.8.2.41
 nameserver 35.8.2.41
 nameserver 128.247.160.56
 
 nameserver 35.8.2.41
 nameserver 128.247.160.56
 
-#
-# Other servers -- hopefully something will work if needed
-#shadooby.cc.umich.edu
-nameserver 35.1.1.91
-#ns.nasa.gov
-nameserver 128.102.16.10
 ----------------------------------------------------------------------
 
 You will need to reboot your computer for the new nameservers to take
 ----------------------------------------------------------------------
 
 You will need to reboot your computer for the new nameservers to take
@@ -607,136 +506,10 @@ the bug report form found there.  Please remember to include your
 hardware type and the LKS version number in all reports.  This number
 may be found in the file /usr/adm/messages (once the LKS has been
 installed). Also, for most questions, it is best to append a copy of
 hardware type and the LKS version number in all reports.  This number
 may be found in the file /usr/adm/messages (once the LKS has been
 installed). Also, for most questions, it is best to append a copy of
-the /usr/adm/ppp2.2.log file.
+the /usr/adm/pppd.log file.
 
 If you do have troubles, please see the FAQ on:
 
 If you do have troubles, please see the FAQ on:
-  http://www.thoughtport.com:8080/PPP/
-
-Here are a few of the more common problems that this FAQ addresses:
-
-======================================================================
-1) pppd bombs out with an error similar to:
- Jan 26 14:46:25 localhost pppd[256]: Connected...
- Jan 26 14:46:26 localhost pppd[256]: ioctl(PPPIOCGUNIT): Inappropriate ioctl for device
- Jan 26 14:46:26 localhost pppd[256]: Exit.
-
-There are two things that can cause this error.  The most common error
-is that you are using the innappropriate device for communication to
-your modem.  You should be using /dev/cufa or /dev/cufb.  Second, the
-Loadable Kernel Server (LKS) and the user level daemon (pppd) must be
-of the same version.  While unusual, the error above can be the result
-of using the wrong Loadable Kernel Server (LKS) with pppd (or vice
-versa).  Some versions of PPP installed the LKS (ppp_reloc) in
-/usr/lib/kern_loader/ppp and some in /usr/local/ppp/reloc.  The second
-is going to be the standard place for installation from now on.
-
-Solution: Make sure that you are using the appropriate device for
-communications with your modem.  Further, make sure that your
-/etc/rc.local is loading the correct version of the LKS and make sure
-you are really calling the correct pppd for use with the LKS that you
-loaded. 
-======================================================================
-
-2) PPP works fine, but when the link is up, netinfo sleeps when you
-   try to print or send mail.
-
-This problem is typically a result of an improper routing setup on the
-PPP client (your host).  When PPP starts up, it will dynamically
-negotiate an IP address for use on the PPP interface (usually ppp0).
-If you don't specify an IP address to pppd, then the address will
-usually be provided by the peer.  It may change each time that you
-bring up a PPP link.  If you did specify an IP address, pppd will
-attempt to use that address first.  If that fails, it will try to get
-an address from the peer.  Either way, the PPP interface usually has a
-new IP address.  The routing problem can result when trying to access
-your local host (and netinfo) on the IP address that was dynamically
-negotiated.
-
-Solution: The solution is straightforward.  You must add a route from
-the IP address that your PPP interface uses to the special loopback IP
-address 127.0.0.1.  The 'route' command will allow you to do this.
-For instance, if you are assigned the address 35.8.74.211 during PPP
-negotiation, you can add the needed route by\7fentering (as the user
-root):
-
-  /usr/etc/route add 35.8.74.211 127.0.0.1 0
-
-This route needs to be added each time the link comes up.  However,
-one problem with hard coding this command into /etc/ppp/ip-up is that
-you may get a different IP address each time the link comes
-up. Fortunately, Bill Bereza <berezaw@river.it.gvsu.edu> submitted
-this nice script clip that can be pasted into /etc/ppp/ip-up.  This
-will create the correct route entry for you automatically.  Place this
-in /etc/ppp/ip-up:
-
-    /usr/etc/route add $4 127.0.0.1 0
-
-You will also want to add this little clip to /etc/ppp/ip-down:                                        <br>
-
-   /usr/etc/route delete $4 127.0.0.1
-
-This removes the route when your link goes down.
-
-======================================================================
-
-3) People who are trying to set up a NeXT as a PPP server that
-   they dial into often complain that they can make a connection, but
-   the remote machine can only ping the server.  No other packets
-   work.
-
-Check out the 'proxyarp' option to pppd.  Servers (connected to their
-LAN) must proxyarp for the remote address (i.e. the address of the
-machine dialing in).
-
-======================================================================
-
-4) Your pppd/chat dials the modem but you cannot get a negotiation
-   to start.  The /usr/adm/ppp2.2.log file shows something similar
-   to:
-
-  Mar 13 12:02:41 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:02:44 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:02:47 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:02:51 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:02:54 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:02:57 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:03:00 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:03:03 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:03:06 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:03:09 crystal pppd[243]: sent [LCP ConfReq id=0x1 <pcomp> <accomp>]
-  Mar 13 12:03:12 crystal pppd[243]: LCP: timeout sending Config-Requests
-  Mar 13 12:03:12 crystal pppd[243]: Connection terminated.
-  Mar 13 12:03:12 crystal pppd[243]: Serial link is not 8-bit clean:
-  Mar 13 12:03:12 crystal pppd[243]: All received characters had bit 7 set to 0
-
-Discussion: This is a common problem.  It is typically the result of a
-failure to properly start the remote PPP process.  The problem arises
-since the local PPP starts sending packets as soon as chat
-exits. Since there is no remote PPP process running to interpret the
-packets, the remote command line interpreter starts sending error
-messages for each received packet (considered garbage to the remote
-CLI).  Thus, your local PPP process is receiveing error message text
-instead of the expected PPP packets.  Since error message text is
-usually ascii (values < 127) PPP believes that the link is not 8-bit
-clean.
-
-Solution: Make sure you add the '-v' option to chat (in your dial
-script) and then check the output of /usr/adm/ppp2.2.log to see why
-chat failed to start the remote PPP process.
-
-
-
-======================================================================
-
-5) NXHosting applications over PPP fails.  I don't know why this 
-   happens.  Rest assured, that I and others do have it working.
-   The most obvious things to check are that you have your system set
-   up as a public window server.  Also, make sure that you reset the
-   nmserver in /etc/ppp/ip-up (see the example ip-up file).  If it
-   still doesn't work, you might want to add your peer to your
-   /etc/hosts.equiv file.  I don't know if that has anything to do
-   with it or not, but I don't know why some people can't NXHost
-   and others can.
+  http://www.peak.org/next/ppp/
 
 
 Updates
 
 
 Updates
@@ -746,16 +519,16 @@ You may want to join the mailing list for PPP.  This will keep
 you informed of new releases and will provide an arena for discussing
 problems with the NeXT specific PPP port.  To add yourself to the list
 (or for any other administrative requests), send an email message to:
 you informed of new releases and will provide an arena for discussing
 problems with the NeXT specific PPP port.  To add yourself to the list
 (or for any other administrative requests), send an email message to:
-       listproc@listproc.thoughtport.com
+       majordomo@peak.org
 with no subject and message body consisting of:
 with no subject and message body consisting of:
-       subscribe nextppp Stephen J. Perkins
+       subscribe nextppp 
 (please use your own name ;). To send mail to all the participants on
 the list, address your messages to:
 (please use your own name ;). To send mail to all the participants on
 the list, address your messages to:
-       nextppp@listproc.thoughtport.com
+       nextppp@peak.org
 
 If you want announcements only, there is a second "announcements only"
 list.  To subscribe to this, you may use the alternate body:
 
 If you want announcements only, there is a second "announcements only"
 list.  To subscribe to this, you may use the alternate body:
-       subscribe nextppp-announce Stephen J. Perkins
+       subscribe nextppp-announce 
 You don't need to subscribe to both.  All announcements are forwarded
 to the regular list.
 
 You don't need to subscribe to both.  All announcements are forwarded
 to the regular list.
 
@@ -772,11 +545,10 @@ Noted bugs
 
 There have been various problems reported when trying to install LKSs
 the way NeXT intended (i.e. placing them in /usr/lib/kern_loader/* and
 
 There have been various problems reported when trying to install LKSs
 the way NeXT intended (i.e. placing them in /usr/lib/kern_loader/* and
-modifying /etc/kern_loader.conf). The main problem seems to be that
-after modifying /etc/iftab, /etc/rc.net (on NSFIP) will not correctly
-configure the interfaces.  This means that booting under NSFIP will
-hang. So, for the time, it is suggested that you install the package
-manually and load the LKS in /etc/rc.local.
+modifying /etc/kern_loader.conf). The main problem is that if users
+have a bad copy of the LKS, the system will panic and will be unable
+to boot. So, for the time, it is suggested that you install the package
+manually and load the LKS in /etc/rc.local as directed above.
 
 
 Modem Configuration
 
 
 Modem Configuration
@@ -805,4 +577,6 @@ ftpmail service, send a message to "ftpmail@decwrl.dec.com" whose body
 consists of the single line "help".
 
 
 consists of the single line "help".
 
 
-Thanks Stephen J. Perkins
+Thanks
+
+Stephen J. Perkins
index f3be5f6df51a16a34674bcde21f8d630a0d18643..b39a849409022b57cc3e823ec65d1156c827e1aa 100755 (executable)
@@ -1,7 +1,7 @@
 #
 # Makefile for NeXT OS 3.2
 #
 #
 # Makefile for NeXT OS 3.2
 #
-# $Id: Makefile,v 1.2 1997/04/30 05:39:28 paulus Exp $
+# $Id: Makefile,v 1.3 1998/03/26 02:51:37 paulus Exp $
 #
 
 #ARCHFLAGS = -arch i386 -arch m68k
 #
 
 #ARCHFLAGS = -arch i386 -arch m68k
@@ -29,16 +29,6 @@ LKS_DIR=/usr/local/ppp/reloc
 # OLD_MUX        Fixes double buffer problem with the MuX serial
 #                driver.
 #
 # OLD_MUX        Fixes double buffer problem with the MuX serial
 #                driver.
 #
-# NBPFILTER       If defined, adds hooks for the Berkley Packet Filter
-#                If this symbol is defined, you must load the
-#                bpf_reloc LKS _BEFORE_ you load the ppp_reloc LKS.
-#                See the ./bpf directory for more information.    
-#
-# NETBUF_PROXY   Enable proxy routines for custom Netbuf handling
-#
-# CHECK_BOUNDS   Turn on bounds checking on netbufs.  NETBUF_PROXY
-#                must be enabled for this to work.
-#
 # OPTIMIZE_PPPREND Enable an optimization supported by the NeXT serial
 #                  drivers.  Basically they buffer characters for an
 #                  interrupt and call ppprend.
 # OPTIMIZE_PPPREND Enable an optimization supported by the NeXT serial
 #                  drivers.  Basically they buffer characters for an
 #                  interrupt and call ppprend.
@@ -46,18 +36,16 @@ LKS_DIR=/usr/local/ppp/reloc
 # NEW_CLOCAL     Used to enable the new code that sets CLOCAL.  Else,
 #                the old code is used.
 #
 # NEW_CLOCAL     Used to enable the new code that sets CLOCAL.  Else,
 #                the old code is used.
 #
-#
-#
 
 
-DFLAGS = -DINET -DKERNEL -DMACH -DPOSIX_KERN \
+DFLAGS = -D_POSIX_SOURCE -DINET -DKERNEL -DMACH -DPOSIX_KERN \
        -DNUM_PPP=2 -DVJC -DPPP_COMPRESS \
        -DNUM_PPP=2 -DVJC -DPPP_COMPRESS \
-       -DDEBUG -DNEW_CLOCAL -DNBPFILTER -DOPTIMIZE_PPPREND
+       -DDEBUG -DNEW_CLOCAL -DOPTIMIZE_PPPREND
 
 
-IFLAGS = -I. -I.. -I../pppd
+IFLAGS = -I. -I../include -I../pppd
 
 
-CFLAGS = -pipe -posix $(ARCHFLAGS) $(DFLAGS) $(IFLAGS) 
+CFLAGS = -O -g -pipe $(ARCHFLAGS) $(DFLAGS) $(IFLAGS) 
 
 
-OBJS = bsd-comp.o if_ppp.o nbq.o ppp_tty.o vjcompress.o
+OBJS = bsd-comp.o if_ppp.o ppp_tty.o vjcompress.o
 SRCS = $(OBJS:.o=.c)
 
 
 SRCS = $(OBJS:.o=.c)
 
 
@@ -65,7 +53,6 @@ SRCS = $(OBJS:.o=.c)
 # Default target
 #
 all:   ppp_reloc
 # Default target
 #
 all:   ppp_reloc
-       cd bpf; $(MAKE) ARCHFLAGS="$(ARCHFLAGS)" all
 
 
 install: all
 
 
 install: all
@@ -73,15 +60,13 @@ install: all
        if (test ! -r /etc/ppp) then (ln -s $(ETCDIR) /etc/ppp) fi
        install -c -m 644 -o root -g daemon ppp_reloc $(LKS_DIR)
        touch $(ETCDIR)/options
        if (test ! -r /etc/ppp) then (ln -s $(ETCDIR) /etc/ppp) fi
        install -c -m 644 -o root -g daemon ppp_reloc $(LKS_DIR)
        touch $(ETCDIR)/options
-       cd bpf; $(MAKE) ARCHFLAGS="$(ARCHFLAGS)" install
 
 ppp_reloc:     $(OBJS) Load_Commands.sect Unload_Commands.sect
        kl_ld $(ARCHFLAGS) -n ppp -l Load_Commands.sect -u Unload_Commands.sect \
 
 ppp_reloc:     $(OBJS) Load_Commands.sect Unload_Commands.sect
        kl_ld $(ARCHFLAGS) -n ppp -l Load_Commands.sect -u Unload_Commands.sect \
-              -i instance -o $@ $(OBJS)
+              -d ppp_loadable -i instance -o $@ $(OBJS)
 
 clean:
        rm -f ppp_reloc ppp_loadable core make $(OBJS) *~ 
 
 clean:
        rm -f ppp_reloc ppp_loadable core make $(OBJS) *~ 
-       cd bpf; $(MAKE) clean
 
 
 $(SRCS): if_pppvar.h nbq.h inlines.h Makefile
 
 
 $(SRCS): if_pppvar.h nbq.h inlines.h Makefile
index e833fdfa510cf7fa5f71d13f7a6d33c6e8d7c694..456139bd82bf98c64b5670140ba138e219c69aef 100644 (file)
@@ -1,23 +1,32 @@
-
 # ppp top level makefile for NeXT systems
 #
 # ppp top level makefile for NeXT systems
 #
-# $Id: Makefile.top,v 1.2 1997/04/30 05:39:28 paulus Exp $
+# $Id: Makefile.top,v 1.3 1998/03/26 02:51:39 paulus Exp $
 #
 
 #
 
+# Change the values of ARCHFLAGS to include the 
+# appropriate architectures.  A blank entry compiles
+# for the local architecture
+#ARCHFLAGS = -arch i386 -arch m68k -arch hppa -arch sparc
+#ARCHFLAGS = -arch i386 -arch m68k
+ARCHFLAGS =
+
+#
+# It is not suggested that you change any values from here
+# on.
+#
 BINDIR = /usr/local/ppp/bin
 MANDIR = /usr/local/ppp/man
 ETCDIR = /etc/ppp
 
 BINDIR = /usr/local/ppp/bin
 MANDIR = /usr/local/ppp/man
 ETCDIR = /etc/ppp
 
-#ARCHFLAGS = -arch i386 -arch m68k -arch hppa -arch sparc
-#ARCHFLAGS = -arch i386 -arch m68k
-ARCHFLAGS =
 
 all:
 
 all:
+       cd NeXT/libposix; $(MAKE) ARCHFLAGS="$(ARCHFLAGS)" all
        cd chat; $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" all
        cd pppstats; $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" all
        cd pppd; $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" all
        cd NeXT; $(MAKE) ARCHFLAGS="$(ARCHFLAGS)" all
 
        cd chat; $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" all
        cd pppstats; $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" all
        cd pppd; $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" all
        cd NeXT; $(MAKE) ARCHFLAGS="$(ARCHFLAGS)" all
 
+
 install: 
        cd chat; \
        $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" BINDIR=$(BINDIR) MANDIR=$(MANDIR) install
 install: 
        cd chat; \
        $(MAKE) -f Makefile.NeXT ARCHFLAGS="$(ARCHFLAGS)" BINDIR=$(BINDIR) MANDIR=$(MANDIR) install
@@ -30,6 +39,7 @@ install:
 
 clean: 
        rm -f *~
 
 clean: 
        rm -f *~
+       (cd libposix; $(MAKE) -f Makefile.NeXT clean)
        (cd chat; $(MAKE) -f Makefile.NeXT clean)
        (cd pppstats; $(MAKE) -f Makefile.NeXT clean)
        (cd pppd; $(MAKE) -f Makefile.NeXT clean)
        (cd chat; $(MAKE) -f Makefile.NeXT clean)
        (cd pppstats; $(MAKE) -f Makefile.NeXT clean)
        (cd pppd; $(MAKE) -f Makefile.NeXT clean)
@@ -41,6 +51,11 @@ NEXTTOP = \
        README.NeXT                             \
        ${NULL}
 
        README.NeXT                             \
        ${NULL}
 
+NEXTPOSIX = \
+       libposix/Makefile.NeXT                  \
+       libposix/libposix.c                     \
+       ${NULL}
+
 NEXTPPPD = \
        pppd/Makefile.NeXT                      \
        pppd/sys-NeXT.c                         \
 NEXTPPPD = \
        pppd/Makefile.NeXT                      \
        pppd/sys-NeXT.c                         \
@@ -48,13 +63,16 @@ NEXTPPPD = \
 
 NEXTNET = \
        net/if_ppp.h                            \
 
 NEXTNET = \
        net/if_ppp.h                            \
+       net/ppp_defs.h                          \
        ${NULL}
 
 NEXTSTATS = \
        pppstats/Makefile.NeXT                  \
        ${NULL}
 
 NEXTSTATS = \
        pppstats/Makefile.NeXT                  \
-       pppstats/pppstats.c                     \
        ${NULL}
 
        ${NULL}
 
+#      pppstats/pppstats.c                     
+
+
 NEXTCHAT = \
        chat/Makefile.NeXT                      \
        chat/chat.c.3.2                         \
 NEXTCHAT = \
        chat/Makefile.NeXT                      \
        chat/chat.c.3.2                         \
@@ -64,10 +82,9 @@ NEXTLKS = \
        NeXT/ChangeLog.rtf                      \
        NeXT/INSTALL                            \
        NeXT/Load_Commands.sect                 \
        NeXT/ChangeLog.rtf                      \
        NeXT/INSTALL                            \
        NeXT/Load_Commands.sect                 \
-       NeXT/MailBug.app.tar.gz                 \
        NeXT/Makefile                           \
        NeXT/Makefile.top                       \
        NeXT/Makefile                           \
        NeXT/Makefile.top                       \
-        NeXT/NeXT_Version                      \
+        NeXT/NeXT_Version.h                    \
        NeXT/TODO.NeXT                          \
        NeXT/Unload_Commands.sect               \
        NeXT/bsd-comp.c                         \
        NeXT/TODO.NeXT                          \
        NeXT/Unload_Commands.sect               \
        NeXT/bsd-comp.c                         \
@@ -75,7 +92,6 @@ NEXTLKS = \
        NeXT/if_pppvar.h                        \
        NeXT/inlines.h                          \
        NeXT/linedisc.h                         \
        NeXT/if_pppvar.h                        \
        NeXT/inlines.h                          \
        NeXT/linedisc.h                         \
-       NeXT/nbq.c                              \
        NeXT/nbq.h                              \
        NeXT/netbuf.h                           \
        NeXT/ppp_tty.c                          \
        NeXT/nbq.h                              \
        NeXT/netbuf.h                           \
        NeXT/ppp_tty.c                          \
@@ -93,30 +109,16 @@ NEXTMACH = \
        ${NULL}
 
 
        ${NULL}
 
 
-NEXTBPF = \
-       NeXT/bpf/Load_Commands.sect             \
-       NeXT/bpf/Makefile                       \
-       NeXT/bpf/NeXT_Support.c                 \
-       NeXT/bpf/README.NeXT                    \
-       NeXT/bpf/Unload_Commands.sect           \
-       NeXT/bpf/bpf.4                          \
-       NeXT/bpf/bpf.c                          \
-       NeXT/bpf/bpf.h                          \
-       NeXT/bpf/bpf_compat.h                   \
-       NeXT/bpf/bpf_filter.c                   \
-       NeXT/bpf/bpfdesc.h                      \
-       NeXT/bpf/netbuf.h                       \
-       NeXT/bpf/promisc.c                      \
-       NeXT/bpf/spl.h                          \
-       ${NULL}
-
 NEXTEXAMP = \
 NEXTEXAMP = \
+       NeXT/Examples/NXHosting_with_PPP        \
        NeXT/Examples/Persistent_Connection     \
        NeXT/Examples/README                    \
        NeXT/Examples/Persistent_Connection     \
        NeXT/Examples/README                    \
+       NeXT/Examples/chap-secrets.example      \
        NeXT/Examples/flow-control-hints        \
        NeXT/Examples/ip-down.example           \
        NeXT/Examples/ip-up.example             \
        NeXT/Examples/flow-control-hints        \
        NeXT/Examples/ip-down.example           \
        NeXT/Examples/ip-up.example             \
-       NeXT/Examples/options                   \
+       NeXT/Examples/options.example           \
+       NeXT/Examples/pap-secrets.example       \
        NeXT/Examples/ppp_multiple_hosts.tar.gz \
        NeXT/Examples/pppdown                   \
        NeXT/Examples/pppkill.c                 \
        NeXT/Examples/ppp_multiple_hosts.tar.gz \
        NeXT/Examples/pppdown                   \
        NeXT/Examples/pppkill.c                 \
@@ -125,12 +127,12 @@ NEXTEXAMP = \
        NeXT/Examples/pppup.portmaster          \
        NeXT/Examples/pppup.remote              \
        NeXT/Examples/pppup.zyxel               \
        NeXT/Examples/pppup.portmaster          \
        NeXT/Examples/pppup.remote              \
        NeXT/Examples/pppup.zyxel               \
-       NeXT/Examples/rc.ppp                    \
        NeXT/Examples/redial.sh                 \
        ${NULL}
 
 NEXTPORT = \
           ${NEXTTOP}                   \
        NeXT/Examples/redial.sh                 \
        ${NULL}
 
 NEXTPORT = \
           ${NEXTTOP}                   \
+          ${NEXTPOSIX}                 \
           ${NEXTPPPD}                  \
           ${NEXTNET}                   \
           ${NEXTSTATS}                 \
           ${NEXTPPPD}                  \
           ${NEXTNET}                   \
           ${NEXTSTATS}                 \
@@ -138,12 +140,10 @@ NEXTPORT = \
           ${NEXTLKS}                   \
           ${NEXTHPPA}                  \
           ${NEXTMACH}                  \
           ${NEXTLKS}                   \
           ${NEXTHPPA}                  \
           ${NEXTMACH}                  \
-          ${NEXTBPF}                   \
           ${NEXTEXAMP}                 \
           ${NULL}
 
 
           ${NEXTEXAMP}                 \
           ${NULL}
 
 
-
 #
 #  The idea is to make for easy distribution of new port material.
 #  Just make sure all relevant files appear in the lists above,
 #
 #  The idea is to make for easy distribution of new port material.
 #  Just make sure all relevant files appear in the lists above,
@@ -155,27 +155,27 @@ NEXTPORT = \
 #
 
 portdist: 
 #
 
 portdist: 
-       echo NeXT-ppp2.3-`sed -e '/version_string/!d' \
-             -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q ./NeXT/NeXT_Version` > .fname
+       echo NeXT-ppp2.3.3-`sed -e '/version_string/!d' \
+             -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q ./NeXT/NeXT_Version.h` > .fname
        rm -rf `cat .fname`
        mkdir `cat .fname`
        rm -rf `cat .fname`
        mkdir `cat .fname`
+       mkdir `cat .fname`/libposix
        mkdir `cat .fname`/pppd
        mkdir `cat .fname`/net
        mkdir `cat .fname`/chat
        mkdir `cat .fname`/NeXT
        mkdir `cat .fname`/NeXT/hppa
        mkdir `cat .fname`/NeXT/mach
        mkdir `cat .fname`/pppd
        mkdir `cat .fname`/net
        mkdir `cat .fname`/chat
        mkdir `cat .fname`/NeXT
        mkdir `cat .fname`/NeXT/hppa
        mkdir `cat .fname`/NeXT/mach
-       mkdir `cat .fname`/NeXT/bpf
        mkdir `cat .fname`/NeXT/Examples
        mkdir `cat .fname`/pppstats
        -ln $(NEXTTOP) `cat .fname`
        mkdir `cat .fname`/NeXT/Examples
        mkdir `cat .fname`/pppstats
        -ln $(NEXTTOP) `cat .fname`
+       -ln $(NEXTPOSIX) `cat .fname`/libposix
        -ln $(NEXTPPPD) `cat .fname`/pppd
        -ln $(NEXTNET) `cat .fname`/net
        -ln $(NEXTCHAT) `cat .fname`/chat
        -ln $(NEXTLKS) `cat .fname`/NeXT
        -ln $(NEXTHPPA) `cat .fname`/NeXT/hppa
        -ln $(NEXTMACH) `cat .fname`/NeXT/mach
        -ln $(NEXTPPPD) `cat .fname`/pppd
        -ln $(NEXTNET) `cat .fname`/net
        -ln $(NEXTCHAT) `cat .fname`/chat
        -ln $(NEXTLKS) `cat .fname`/NeXT
        -ln $(NEXTHPPA) `cat .fname`/NeXT/hppa
        -ln $(NEXTMACH) `cat .fname`/NeXT/mach
-       -ln $(NEXTBPF) `cat .fname`/NeXT/bpf
        -ln $(NEXTEXAMP) `cat .fname`/NeXT/Examples
        -ln $(NEXTSTATS) `cat .fname`/pppstats
        for file in $(NEXTPORT); do \
        -ln $(NEXTEXAMP) `cat .fname`/NeXT/Examples
        -ln $(NEXTSTATS) `cat .fname`/pppstats
        for file in $(NEXTPORT); do \
diff --git a/NeXT/NeXT_Version b/NeXT/NeXT_Version
deleted file mode 100644 (file)
index 4b23fed..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# ppp-2.3 port to the NeXT
-# version_string 0.5.0
-#
-# $Id: NeXT_Version,v 1.2 1997/04/30 05:39:29 paulus Exp $
-#
diff --git a/NeXT/NeXT_Version.h b/NeXT/NeXT_Version.h
new file mode 100644 (file)
index 0000000..41fe944
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+* ppp-2.3 port to the NeXT
+* version_string 0.5.1
+*
+* $Id: NeXT_Version.h,v 1.1 1998/03/26 02:51:41 paulus Exp $
+*/
+#define PPPVERSION "0.5.1"
diff --git a/NeXT/README.NeXT b/NeXT/README.NeXT
deleted file mode 100644 (file)
index 0f0a6ab..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-#  $Id: README.NeXT,v 1.1 1995/12/18 03:29:54 paulus Exp $
-#
-
-This file has been "reset" for ppp-2.2.
-
-----------------------------------------------------------------------
-
-The NeXT OS does not provide a way of determining the ethernet address
-of a particular interface and thus the -proxyarp option to pppd and
-this code does not work in quite the way that it would on other
-versions. Given an ethernet interface, to find the address for the
-code will firstly find the hostname associated with that interface's
-IP address. From here it tries 2 methods of obtaining the hardware
-address. The first is to look for an entry in the ethernets
-database. This can be done by simplay placing a single line in
-/etc/ethers with your address and hostname.  The second method used is
-to look for the ethernet address in the / netinfo domain. This will
-most likely have the ethernet address on systems where a configuration
-server is used to boot the client machines. Thus on a large numbver of
-systems the code will find the ethernet address without any
-modification of /etc/ethers. If for any reason the address as given by
-netinfo needs to be overridden then this can be done by placing an
-ethry in /etc/ethers which is then used in preference. This code has
-been tested on both black and white hardware where it does seem to
-work correctly.
-
-Thanks to Pete French <pete@ohm.york.ac.uk> for the code fix.  
-
-Status: installed fix.  Proxy-arp works as stated above.
-
-----------------------------------------------------------------------
-
-The ioctl problems for NS Intel have been reduced. :) A real workaround for
-the errors in PPPIOCG* routines is in place.  The ioctl macro is only
-used to handle the bad return values.  See ppptioctl() for a
-description of the fix.
-
-This fix also fixed the problems encountered when trying to use
-multiple interfaces.  Previously, the second interface would steal
-from the first.
-
-I have been in contact with NeXT about this bug.  I hope that it 
-will be fixed in 3.3.  It turns out, after further study, that the
-problem only occurred when using the NeXT supplied serial drivers.
-The MuX driver worked flawlessly (thanks Mark!).  However, please note
-that PPP works with either driver installed.
-
-----------------------------------------------------------------------
-
-==============
-From ppp-2.1.2
-==============
-
-#
-# LKS for NeXT OS
-#
-# $ORIG: README.NeXT,v 1.2 1994/10/02 19:34:44 perkins Exp $
-#
-
-Known Problems:  The following are excerpts from mail messages
-                  (sometimes concatenations from several people or
-                  edited).
-
-----------------------------------------------------------------------
-
-for NS intel:
-
-I wasn't able to get LKSs working with ppp_reloc placed in
-/etc/kern_loader.conf at all.  rc.net insisted on setting the
-interface flags to UP, and I wasn't able to get it not to by changing
-iftab the way I could on black hardware.
-
-Rather than wasting time trying to debug rc.net, I just took ppp_reloc
-out of kern_loader.conf and used kl_util from rc.local to load ppp
-(which happens after netinfo is up and running, and after rc.net).
-
-If you insist on installing your LKS in /usr/lib/kern_loader/* and
-modifying your /etc/kern_loader.conf appropriately, you will want to
-add a line like:
-
-ppp*   !false
-
-in /etc/iftab.  Again, note that this approach does not work correctly
-on Intel based systems.  The suggested approach is to modify
-/etc/rc.local as suggested in the file INSTALL.
-
-Status: Work around by calling rc.ppp from rc.local
-
------------------------------------------------------------------------
-
-It seems that some modems, specifically my telebit T3000 take a little
-bit of time to initialize after a DTR drop, so if "modem" is set on
-the command line, they can [accidentally] drop the first part of the
-chat command.  An easy fix is to put delay into the script, or just
-change the code in main.c (pppd) to:
-
-        if (!default_device && modem) {
-            setdtr(fd, FALSE);
-            sleep(1);
-            setdtr(fd, TRUE);
-            sleep(2);  /* <-- Give modems time to reinit after DTR drop*/
-
-Also, I am among the many having difficulty getting a SIGHUP when the
-peer drops the connection (on the dial out case).
-
-status:  Decided for the time being that this should be added to
-         the chat script by using the \\d construct.
-
-         The SIGHUP problem is addressed in the next release.
-         A temporary fix is to use the '/bin/csh' instead of the
-         normal '/bin/sh' in the script that starts pppd.
-
-----------------------------------------------------------------------
-For Proxy-arp, there is a problem in not finding the ether address
-correctly. The address is marked as AF_UNSPEC and full of zeroes
-rather than being AF_DLI. I don't know quite why as yet.
-
-The bug also occurs under 3.0 systems too. Has anyone at NeXT
-commented on this bug? 
-
-NeXT does not provide a way of determining the ethernet address of a
-particular interface and thus this code does not work in quite the way
-that it would on other versions. Given an ethernet interface, to find
-the address for the code will firstly find the hostname associated
-with that interface's IP address. From here it tries 2 methods of
-obtaining the hardware address. The first is to look for an entry in
-the ethernets database. This can be done by simplay placing a single
-line in /etc/ethers with your address and hostname.  The second method
-used is to look for the ethernet address in the / netinfo domain. This
-will most likely have the ethernet address on systems where a
-configuration server is used to boot the client machines. Thus on a
-large numbver of systems the code will find the ethernet address
-without any modification of /etc/ethers. If for any reason the address
-as given by netinfo needs to be overridden then this can be done by
-placing an ethry in /etc/ethers which is then used in preference. This
-code has been tested on both black and white hardware where it does
-seem to work correctly.
-
-Thanks to Pete French <pete@ohm.york.ac.uk> for the code fix.  
-
-Status: installed fix.  Proxy-arp works as stated above.
-
-----------------------------------------------------------------------
-
-This kernel is known to work on black and white hardware runnign OS
-GG3.2. On White hareware if you should run the NeXT supplied serial drivers.
-It currently does not work with the MuX driver.  However, we are in
-contact with the MuX developers and are working on a solution.
-
-  Rumors abound that MuX v1.4 works as long as you undefine
-  `DOUBLE_BUFFER'.
-
-This has not been thoroughly verified.
-
-----------------------------------------------------------------------
-
-If you change the LKS_DIR installation directory to something other
-than /usr/lib/kern_loader/ppp, you will probably want to change the
-default location that pppstats searches.  Do a search for *system and
-change the pathname appropriately.
-
-----------------------------------------------------------------------
-
-For problems, send mail to Steve Perkins (perkins@cps.msu.edu).
-Please include your hardware type the LKS version number in all
-reports.  This number may be found in the file /usr/adm/messages (once
-the LKS has been installed).
index fc0c1a95b407d3ef24d215af4c3a113fd45affb1..a8932889db645ec6bc9e6f76760f021edcc517b8 100644 (file)
@@ -1,11 +1,7 @@
 #
 #
-#  $Id: TODO.NeXT,v 1.2 1997/04/30 05:39:29 paulus Exp $
+#  $Id: TODO.NeXT,v 1.3 1998/03/26 02:51:42 paulus Exp $
 #
 
 #
 
-* FAQ on shell chat scripts and special characters
-
-* Add /dev/bpf* in installation docs
-
 * Check persist option
 
 * Fix installer to recognize other installation.
 * Check persist option
 
 * Fix installer to recognize other installation.
 
 * NUM_PPP in pppd/pppd.h and Makefile are different
 
 
 * NUM_PPP in pppd/pppd.h and Makefile are different
 
-* Unify NBPFILTER symbol
-
-* Better Load support for BPF.  Figure out how to support
-  NeXT (moto) with driverkit stuff.
-
 * Fix with VirtModem
 
 * Fix with VirtModem
 
-* If the dialing program fails to get a line, but returns success,
-  then ppp will report that it could not determine the ip address,
-  and not notice the "received own echo reply" condition.
-
 * Use kget inside interrupt handler.
 
 * Use kget inside interrupt handler.
 
+* Move LKS to user space via an IP Tunneler
+
 Look at NAT:There *is* a way to get multiple machines on a network to use
        one IP address.  RFC 1631 -- The IP Network Address Translator
        (NAT) describes how this works.
 Look at NAT:There *is* a way to get multiple machines on a network to use
        one IP address.  RFC 1631 -- The IP Network Address Translator
        (NAT) describes how this works.
index a77c450c06547390cfbceae1fe681962cd414819..8ae940450513e17076aed67f08524ab07bcbcd66 100644 (file)
 /*
  * This version is for use with mbufs on BSD-derived systems.
  *
 /*
  * This version is for use with mbufs on BSD-derived systems.
  *
- * $Id: bsd-comp.c,v 1.4 1997/04/30 05:39:29 paulus Exp $
+ * $Id: bsd-comp.c,v 1.5 1998/03/26 02:51:45 paulus Exp $
  */
 
 #include <sys/types.h>
 #include <sys/param.h>
  */
 
 #include <sys/types.h>
 #include <sys/param.h>
-#include <sys/types.h>
 #include <sys/socket.h>
 
 #define        KERNEL 1
 #include <sys/socket.h>
 
 #define        KERNEL 1
@@ -62,6 +61,7 @@
 #include <net/if.h>
 
 #include <net/ppp_defs.h>
 #include <net/if.h>
 
 #include <net/ppp_defs.h>
+
 #include <net/if_ppp.h>
 
 #include "nbq.h"
 #include <net/if_ppp.h>
 
 #include "nbq.h"
@@ -93,7 +93,6 @@
 #include <netinet/ip.h>
 
 #define        mtod(m,type)    ((type)NB_MAP(m))
 #include <netinet/ip.h>
 
 #define        mtod(m,type)    ((type)NB_MAP(m))
-typedef unsigned short u_int16_t;
 
 /*
  * PPP "BSD compress" compression
 
 /*
  * PPP "BSD compress" compression
diff --git a/NeXT/hppa/README.hppa b/NeXT/hppa/README.hppa
new file mode 100755 (executable)
index 0000000..daf140f
--- /dev/null
@@ -0,0 +1,95 @@
+NeXTSTEP on HP-PA OS 3.2 has a few problems that require special
+installation procedures.
+
+There seem to be two major problems.  The first is related to the use
+of FAT binaries on HPPA Lodable Kernel Servers and the second seems to
+be kernel bugs. NeXT says they will be fixed in 3.3.  I guess we will
+have to wait and see. 
+
+Problem 1
+=========
+
+For some reason, the HPPA kernel loading utility kl_util is unable to
+load FAT LKS modules.  So before you try to load a FAT LKS onto an
+HPPA machine, you will need to use lipo to thin it down. You may use a
+command similar to:
+    lipo ppp_reloc -thin hppa -output ppp_reloc.hppa
+to get a thin version named ppp_reloc.hppa. 
+
+
+
+Problem 2
+=========
+
+Alain Fauconnet managed to get PPP-2.1.2 working
+on HPPA.  He graciously allowed me to incorporate his changes into
+PPP-2.2.  I have included part of his original instructions for
+getting the serial driver patch installed.  You should follow these
+procedures for PPP-2.2.  Also, you may wish to send him a short thank
+you for his excellent work.
+
+Please note, that you only need these instructions to install the
+SerialDriverPatch.  After that is installed, you may install PPP-2.2
+as specified in the README.NeXT file at the top level directory.
+
+Here are the original instructions:
+
+Temporary PPP 2.1.2 kit for HP-PA systems running NeXTSTEP 3.2
+==============================================================
+
+                                                       14-Nov-1994
+                                                       Alain Fauconnet
+                                                       <af@biomath.jussieu.fr>
+
+
+INSTALLATION FOR A HP-PA/NEXSTEP MACHINE
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+       1) Serial driver patch
+
+This tarfile includes a ./hppaSerialPatch tree that is a temporary
+work-around for a severe bug in the HP-PA serial tty driver. I have
+been allowed to include it here provided that it is clearly stated that
+it is *not* an official patch from NeXT and that it should *not* be
+installed on machines that do not absolutely require it. The problem
+will be corrected in NeXTSTEP 3.3, according to the NeXT people.
+
+As I understand it, the problem is about the select() call on a file
+descriptor opened on a tty line. This affect emacs (hangs when run from
+a remote tty session), MicroEMACS (arrow keys don't work), PPP (protocol
+hangs) and probably other programs as well.
+
+I felt the need to add some installation instructions, since I've lost
+some hair in that process myself.
+
+Install it as follows :
+
+a) go to the hppaSerialPatch directory
+
+b) type `make'. Compilation should complete with a few warnings about
+`linesw'
+
+c) type `make install' (YOU DON'T NEED TO BE root FOR THAT, the
+installed tree will be created in /tmp/hppaSerialPatch.*
+
+d) as root, bring up  /NextAdmin/Configure.app, choose Configuration ->
+Install driver... and select
+/tmp/hppaSerialPatch.bproj/usr/Devices/hppaSerialPatch.config from the
+file selection box.
+
+e) reboot the system. As root, bring up /NextAdmin/Configure.app again
+and look if "hppaSerialPatch" appears on the "Other" line. If not, click
+the "Other" icon. Click "Add". The correct driver will probably appear
+as "Long Name" in the list of drivers. Select it and click "Add".
+Go back to "Summary" and click "Save". Reboot the system.
+Check the file /usr/Devices/System.config/Instance0.table,
+"hppaSerialPatch" should appear in the line of "Active Drivers".
+
+f) the /tmp/hppaSerialPatch trees may be deleted now.
+
+
+GOOD LUCK !
+
+Thanks to:
+               Jean Michel LUNATI <Jean_Michel_Lunati@NeXT.COM>
+               Philip Prindeville <philipp@res.enst.fr>
index 0e9b3e6a499a9252b7dd4b191d62c8fd4eb26d79..85938b6a6fed01df3511d48cf4e320ff061c2c07 100644 (file)
 /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
 
 #if !defined(lint)
 /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
 
 #if !defined(lint)
-static char sccsid[] = "$Revision: 1.4 $ ($Date: 1997/11/27 05:59:11 $)";
+static char sccsid[] = "$Revision: 1.5 $ ($Date: 1998/03/26 02:51:47 $)";
 #endif /* not lint*/
 
 #define KERNEL 1
 #define KERNEL_FEATURES 1
 #define INET 1
 
 #endif /* not lint*/
 
 #define KERNEL 1
 #define KERNEL_FEATURES 1
 #define INET 1
 
-/* #include "ppp.h" */
-
+#if NS_TARGET >= 40
+#if NS_TARGET >= 41
+#include <kernserv/clock_timer.h>
+#include <kernserv/lock.h>
+#else
+#include <kern/lock.h>
+#endif /* NS_TARGET */
+#endif /* NS_TARGET */
 
 #include <sys/param.h>
 
 #include <sys/param.h>
+#if NS_TARGET >= 41
+typedef simple_lock_data_t lock_data_t;                /* XXX */
+#endif /* NS_TARGET */
 #include <sys/proc.h>
 #include "netbuf.h"
 #include <sys/socket.h>
 #include <sys/proc.h>
 #include "netbuf.h"
 #include <sys/socket.h>
@@ -99,7 +108,9 @@ static char sccsid[] = "$Revision: 1.4 $ ($Date: 1997/11/27 05:59:11 $)";
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/errno.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/errno.h>
+#if !(NS_TARGET >= 40)
 #include <kernserv/prototypes.h>
 #include <kernserv/prototypes.h>
+#endif
 #if defined(m68k)
 #import "spl.h"
 #else
 #if defined(m68k)
 #import "spl.h"
 #else
@@ -122,14 +133,15 @@ static char sccsid[] = "$Revision: 1.4 $ ($Date: 1997/11/27 05:59:11 $)";
 #include <netinet/tcp.h>
 #endif
 
 #include <netinet/tcp.h>
 #endif
 
-
 #include <net/ppp_defs.h>
 #ifdef VJC
 #include <net/vjcompress.h>
 #endif
 #include <net/if_ppp.h>
 #include <net/ppp_defs.h>
 #ifdef VJC
 #include <net/vjcompress.h>
 #endif
 #include <net/if_ppp.h>
+#include "NeXT_Version.h"
 #include "if_pppvar.h"
 
 #include "if_pppvar.h"
 
+
 struct ppp_softc ppp_softc[NUM_PPP];
 
 
 struct ppp_softc ppp_softc[NUM_PPP];
 
 
@@ -138,15 +150,6 @@ struct     ppp_softc ppp_softc[NUM_PPP];
 #include <net/ppp-comp.h>
 #endif
 
 #include <net/ppp-comp.h>
 #endif
 
-#ifdef NBPFILTER
-#include <bpf/bpf.h>
-/*
- * We store the address of necessary BPF functions
- * here.
- */
-struct bpf_fns fnarg;
-#endif
-
 /*
  * The max number of NETBUF_Ts we wish to compress and cache for
  * sending.
 /*
  * The max number of NETBUF_Ts we wish to compress and cache for
  * sending.
@@ -282,22 +285,16 @@ pppattach()
     register struct ppp_softc *sc;
     register int i = 0;
     
     register struct ppp_softc *sc;
     register int i = 0;
     
-    IOLog("\nPPP version 2.3.0 for NS 3.2 and 3.3\n");
-    IOLog("LKS: %s\n", sccsid);
+    IOLog("\nPPP version 2.3.3-%s for NeXTSTEP and OPENSTEP\n", PPPVERSION);
     IOLog("by  Stephen Perkins, Philip Prindeville, and Pete French\n");
     IOLog("by  Stephen Perkins, Philip Prindeville, and Pete French\n");
-
-    IOLog("Installing PPP on Line Discipline %d\n", PPPDISC);
     if (install_ppp_ld() < 0) {
        IOLog("ppp: Could not install line discipline\n");
     }
     
     if (install_ppp_ld() < 0) {
        IOLog("ppp: Could not install line discipline\n");
     }
     
-
-    IOLog("Installing interfaces:\n");
     for (sc = ppp_softc; i < NUM_PPP; sc++, i++) {
        sc->sc_if = if_attach(NULL, NULL, pppoutput, 
                              pppgetbuf, pppcontrol, "ppp", i, "Serial line PPP", 
                              PPP_MTU, IFF_POINTOPOINT, NETIFCLASS_VIRTUAL, (void *) sc);
     for (sc = ppp_softc; i < NUM_PPP; sc++, i++) {
        sc->sc_if = if_attach(NULL, NULL, pppoutput, 
                              pppgetbuf, pppcontrol, "ppp", i, "Serial line PPP", 
                              PPP_MTU, IFF_POINTOPOINT, NETIFCLASS_VIRTUAL, (void *) sc);
-       IOLog("     Initializing ppp%d\n", i);
        nbq_init(&sc->sc_freeq, &qparms[QFREE]);
        nbq_init(&sc->sc_rawq, &qparms[QRAW]);
        nbq_init(&sc->sc_fastq, &qparms[QFAST]);
        nbq_init(&sc->sc_freeq, &qparms[QFREE]);
        nbq_init(&sc->sc_rawq, &qparms[QRAW]);
        nbq_init(&sc->sc_fastq, &qparms[QFAST]);
@@ -306,15 +303,12 @@ pppattach()
        nbq_init(&sc->sc_npq, &qparms[QNP]);
        nbq_init(&sc->sc_compq, &qparms[QCACHE]);
        IOLog("     ppp%d successfully attached.\n", i);
        nbq_init(&sc->sc_npq, &qparms[QNP]);
        nbq_init(&sc->sc_compq, &qparms[QCACHE]);
        IOLog("     ppp%d successfully attached.\n", i);
-#ifdef NBPFILTER
-       bpfattach((caddr_t *) &sc->sc_bpf, sc->sc_if, DLT_PPP, PPP_HDRLEN);
-#endif
     }
 
     ipforwarding = 1;
     ipsendredirects = 1;
 
     }
 
     ipforwarding = 1;
     ipsendredirects = 1;
 
-    IOLog("PPP-2.3 Successfully Installed.\n\n");
+    IOLog("PPP Successfully Installed.\n\n");
 }
 
 int
 }
 
 int
@@ -354,6 +348,9 @@ pppalloc(pid)
 {
     int nppp, i;
     struct ppp_softc *sc;
 {
     int nppp, i;
     struct ppp_softc *sc;
+#if NS_TARGET >= 40
+    struct timeval tv_time;
+#endif /* NS_TARGET */
 
     for (nppp = 0, sc = ppp_softc; nppp < NUM_PPP; nppp++, sc++)
        if (sc->sc_xfer == pid) {
 
     for (nppp = 0, sc = ppp_softc; nppp < NUM_PPP; nppp++, sc++)
        if (sc->sc_xfer == pid) {
@@ -380,7 +377,14 @@ pppalloc(pid)
     for (i = 0; i < NUM_NP; ++i)
        sc->sc_npmode[i] = NPMODE_ERROR;
     /* XXX - I'm not sure why the npqueue was zapped here... */
     for (i = 0; i < NUM_NP; ++i)
        sc->sc_npmode[i] = NPMODE_ERROR;
     /* XXX - I'm not sure why the npqueue was zapped here... */
+
+#if NS_TARGET >= 40
+    ns_time_to_timeval(clock_value(System), &tv_time);
+    sc->sc_last_sent = sc->sc_last_recv = tv_time.tv_sec;
+#else
     sc->sc_last_sent = sc->sc_last_recv = time.tv_sec;
     sc->sc_last_sent = sc->sc_last_recv = time.tv_sec;
+#endif
+
     sc->sc_compsched = 0;
     sc->sc_decompsched = 0;
 
     sc->sc_compsched = 0;
     sc->sc_decompsched = 0;
 
@@ -443,6 +447,10 @@ pppioctl(sc, cmd, data, flag)
 #ifdef HAS_BROKEN_TIOCSPGRP
     struct tty *tp = sc->sc_devp;
 #endif
 #ifdef HAS_BROKEN_TIOCSPGRP
     struct tty *tp = sc->sc_devp;
 #endif
+#if NS_TARGET >= 40
+       struct timeval tv_time;
+#endif /* NS_TARGET */
+
 
     switch (cmd) {
     case FIONREAD:
 
     switch (cmd) {
     case FIONREAD:
@@ -614,7 +622,12 @@ pppioctl(sc, cmd, data, flag)
 
     case PPPIOCGIDLE:
        s = splimp();
 
     case PPPIOCGIDLE:
        s = splimp();
+#if NS_TARGET >= 40
+       ns_time_to_timeval(clock_value(System), &tv_time);
+       t = tv_time.tv_sec;
+#else
        t = time.tv_sec;
        t = time.tv_sec;
+#endif /* NS_TARGET */
        ((struct ppp_idle *)data)->xmit_idle = t - sc->sc_last_sent;
        ((struct ppp_idle *)data)->recv_idle = t - sc->sc_last_recv;
        splx(s);
        ((struct ppp_idle *)data)->xmit_idle = t - sc->sc_last_sent;
        ((struct ppp_idle *)data)->recv_idle = t - sc->sc_last_recv;
        splx(s);
@@ -799,11 +812,6 @@ pppoutput(ifp, in_nb, arg)
        goto bad;
     }
 
        goto bad;
     }
 
-#ifdef NETBUF_PROXY
-       m0->pktinfo.first.tv_sec = time.tv_sec;
-       m0->pktinfo.first.tv_usec = time.tv_usec;
-       m0->pktinfo.size1 = NB_SIZE(m0);
-#endif
 
     /*
      * Compute PPP header.
 
     /*
      * Compute PPP header.
@@ -874,13 +882,6 @@ urgent:            flags |= M_HIGHPRI;
     *cp++ = protocol >> 8;
     *cp++ = protocol & 0xff;
 
     *cp++ = protocol >> 8;
     *cp++ = protocol & 0xff;
 
-#if defined(NBPFILTER) && defined(NETBUF_PROXY)
-   /*
-    * We need to copy the header to the original copy.
-    */
-    bcopy(mtod(m0, u_char *), NB_MAP_ORIG(m0), PPP_HDRLEN);
-
-#endif
 
     if (sc->sc_flags & SC_LOG_OUTPKT) {
        IOLog("ppp%d: output:\n", if_unit(ifp));        /* XXX */
 
     if (sc->sc_flags & SC_LOG_OUTPKT) {
        IOLog("ppp%d: output:\n", if_unit(ifp));        /* XXX */
@@ -888,22 +889,6 @@ urgent:            flags |= M_HIGHPRI;
     }
 
 
     }
 
 
-#if defined(NBPFILTER)  && !defined(NETBUF_PROXY)
-    /*
-     * See if bpf wants to look at the packet.
-     * We must hand it off _before_ any compression
-     * takes place.  If NETBUF_PROXY is defined,
-     * we do the handoff later (in ppp_tty.c)
-     * because we keep a copy of the original
-     * datagram around.
-     */
-
-   if (sc->sc_bpf)
-      bpf_tap(sc->sc_bpf, NB_MAP(m0), NB_SIZE(m0));
-#endif
-
-
     /*
      * Put the packet on the appropriate queue.
      */
     /*
      * Put the packet on the appropriate queue.
      */
@@ -1137,6 +1122,9 @@ ppp_outpkt(sc)
     NETBUF_T m;
     u_char *cp;
     int address, control, protocol;
     NETBUF_T m;
     u_char *cp;
     int address, control, protocol;
+#if NS_TARGET >= 40
+    struct timeval tv_time;
+#endif
 
     /*
      * Grab a packet to send: first try the fast queue, then the
 
     /*
      * Grab a packet to send: first try the fast queue, then the
@@ -1157,17 +1145,20 @@ ppp_outpkt(sc)
     control = PPP_CONTROL(cp);
     protocol = PPP_PROTOCOL(cp);
 
     control = PPP_CONTROL(cp);
     protocol = PPP_PROTOCOL(cp);
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.second.tv_sec = time.tv_sec;
-       m->pktinfo.second.tv_usec = time.tv_usec;
-#endif
+#if NS_TARGET >= 40
+       ns_time_to_timeval(clock_value(System), &tv_time);
+#endif /* NS_TARGET */
 
     switch (protocol) {
     case PPP_IP:
        /*
         * Update the time we sent the most recent packet.
         */
 
     switch (protocol) {
     case PPP_IP:
        /*
         * Update the time we sent the most recent packet.
         */
-       sc->sc_last_sent = time.tv_sec;
+#if NS_TARGET >= 40
+       sc->sc_last_sent = tv_time.tv_sec;
+#else
+        sc->sc_last_sent = time.tv_sec;
+#endif /* NS_TARGET */
 
 #ifdef VJC
        /*
 
 #ifdef VJC
        /*
@@ -1187,15 +1178,9 @@ ppp_outpkt(sc)
                switch (type) {
                case TYPE_UNCOMPRESSED_TCP:
                    protocol = PPP_VJC_UNCOMP;
                switch (type) {
                case TYPE_UNCOMPRESSED_TCP:
                    protocol = PPP_VJC_UNCOMP;
-#ifdef NETBUF_PROXY
-                   m->pktinfo.flags |= NBFLAG_VJCINC;
-#endif
                    break;
                case TYPE_COMPRESSED_TCP:
                    NB_SHRINK_TOP(m, vjhdr - (u_char *) ip);
                    break;
                case TYPE_COMPRESSED_TCP:
                    NB_SHRINK_TOP(m, vjhdr - (u_char *) ip);
-#ifdef NETBUF_PROXY
-                   m->pktinfo.flags |= NBFLAG_VJC;                 
-#endif
                    protocol = PPP_VJC_COMP;
                    cp = mtod(m, u_char *);
                    cp[0] = address;    /* header has moved */
                    protocol = PPP_VJC_COMP;
                    cp = mtod(m, u_char *);
                    cp[0] = address;    /* header has moved */
@@ -1219,11 +1204,6 @@ ppp_outpkt(sc)
     }
 
 
     }
 
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.size2 = NB_SIZE(m);
-#endif
-
-
 #ifdef PPP_COMPRESS
     if (protocol != PPP_LCP && protocol != PPP_CCP
        && sc->sc_xc_state && (sc->sc_flags & SC_COMP_RUN)) {
 #ifdef PPP_COMPRESS
     if (protocol != PPP_LCP && protocol != PPP_CCP
        && sc->sc_xc_state && (sc->sc_flags & SC_COMP_RUN)) {
@@ -1243,34 +1223,14 @@ ppp_outpkt(sc)
 
        if (mcomp != NULL) {
 
 
        if (mcomp != NULL) {
 
-#ifdef NETBUF_PROXY
-         /*
-          * duplicate all the stat info into the new
-          * buffer.
-          */
-           m->pktinfo.flags |= NBFLAG_CCP;
-
-           NB_DUPLICATE(m, mcomp);
-#endif
-
            NB_FREE(m);
            m = mcomp;
            cp = mtod(m, u_char *);
            protocol = cp[3];
        }
            NB_FREE(m);
            m = mcomp;
            cp = mtod(m, u_char *);
            protocol = cp[3];
        }
-#ifdef NETBUF_PROXY
-       else
-         m->pktinfo.flags |= NBFLAG_CCPINC;
-#endif 
-
     }
 #endif /* PPP_COMPRESS */
 
     }
 #endif /* PPP_COMPRESS */
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.size3 = NB_SIZE(m);
-#endif
-
-
     /*
      * Compress the address/control and protocol, if possible.
      */
     /*
      * Compress the address/control and protocol, if possible.
      */
@@ -1279,9 +1239,6 @@ ppp_outpkt(sc)
        protocol != PPP_LCP) {
        /* can compress address/control */
        NB_SHRINK_TOP(m, 2);
        protocol != PPP_LCP) {
        /* can compress address/control */
        NB_SHRINK_TOP(m, 2);
-#ifdef NETBUF_PROXY
-       m->pktinfo.flags |= NBFLAG_AC;
-#endif
     }
     if (sc->sc_flags & SC_COMP_PROT && protocol < 0xFF) {
        /* can compress protocol */
     }
     if (sc->sc_flags & SC_COMP_PROT && protocol < 0xFF) {
        /* can compress protocol */
@@ -1290,15 +1247,8 @@ ppp_outpkt(sc)
            cp[1] = cp[0];
        }
        NB_SHRINK_TOP(m, 1);
            cp[1] = cp[0];
        }
        NB_SHRINK_TOP(m, 1);
-#ifdef NETBUF_PROXY
-       m->pktinfo.flags |= NBFLAG_PC;
-#endif
     }
 
     }
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.third.tv_sec = time.tv_sec;
-       m->pktinfo.third.tv_usec = time.tv_usec;
-#endif 
 
     s = splimp();
     nbq_enqueue(&sc->sc_compq, m);
 
     s = splimp();
     nbq_enqueue(&sc->sc_compq, m);
@@ -1466,11 +1416,10 @@ ppp_inproc(sc, m)
     NETBUF_T dmp;
     u_char *iphdr;
     u_int hlen;
     NETBUF_T dmp;
     u_char *iphdr;
     u_int hlen;
+#if NS_TARGET >= 40
+    struct timeval tv_time;
+#endif /* NS_TARGET */
 
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.third.tv_sec = time.tv_sec;
-       m->pktinfo.third.tv_usec = time.tv_usec;
-#endif     
 
     incr_cnt(sc->sc_if, if_ipackets);
 
 
     incr_cnt(sc->sc_if, if_ipackets);
 
@@ -1499,22 +1448,10 @@ ppp_inproc(sc, m)
      */
     if (proto == PPP_COMP && sc->sc_rc_state && (sc->sc_flags & SC_DECOMP_RUN)
        && !(sc->sc_flags & SC_DC_ERROR) && !(sc->sc_flags & SC_DC_FERROR)) {
      */
     if (proto == PPP_COMP && sc->sc_rc_state && (sc->sc_flags & SC_DECOMP_RUN)
        && !(sc->sc_flags & SC_DC_ERROR) && !(sc->sc_flags & SC_DC_FERROR)) {
-#ifdef NETBUF_PROXY
-       m->pktinfo.flags |= NBFLAG_CCP;
-#endif     
        /* decompress this packet */
        rv = (*sc->sc_rcomp->decompress)(sc->sc_rc_state, m, &dmp);
        if (rv == DECOMP_OK){
 
        /* decompress this packet */
        rv = (*sc->sc_rcomp->decompress)(sc->sc_rc_state, m, &dmp);
        if (rv == DECOMP_OK){
 
-#ifdef NETBUF_PROXY
-         if (dmp != NULL)
-           {
-
-             NB_DUPLICATE(m, dmp);
-/*           bcopy(&(m->pktinfo), &(dmp->pktinfo), sizeof(bpf_encapsulater)); */
-
-           }
-#endif
          NB_FREE(m);
          if (dmp == NULL){
            /* No error, but no decompressed packet returned */
          NB_FREE(m);
          if (dmp == NULL){
            /* No error, but no decompressed packet returned */
@@ -1544,9 +1481,6 @@ ppp_inproc(sc, m)
        if (sc->sc_rc_state && (sc->sc_flags & SC_DECOMP_RUN))
          {
 
        if (sc->sc_rc_state && (sc->sc_flags & SC_DECOMP_RUN))
          {
 
-#ifdef NETBUF_PROXY
-           m->pktinfo.flags |= NBFLAG_CCPINC;
-#endif
            (*sc->sc_rcomp->incomp)(sc->sc_rc_state, m);
        }
        if (proto == PPP_CCP) {
            (*sc->sc_rcomp->incomp)(sc->sc_rc_state, m);
        }
        if (proto == PPP_CCP) {
@@ -1557,10 +1491,6 @@ ppp_inproc(sc, m)
 
     ilen = NB_SIZE(m);
 
 
     ilen = NB_SIZE(m);
 
-#ifdef NETBUF_PROXY
-    m->pktinfo.size2 = ilen;
-#endif
-
 #ifdef VJC
     if (sc->sc_flags & SC_VJ_RESET) {
        /*
 #ifdef VJC
     if (sc->sc_flags & SC_VJ_RESET) {
        /*
@@ -1583,9 +1513,6 @@ ppp_inproc(sc, m)
        if (sc->sc_flags & SC_REJ_COMP_TCP)
            goto bad;
 
        if (sc->sc_flags & SC_REJ_COMP_TCP)
            goto bad;
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.flags |= NBFLAG_VJC;
-#endif     
 
        xlen = vj_uncompress_tcp(cp + PPP_HDRLEN, ilen - PPP_HDRLEN,
                                 ilen - PPP_HDRLEN,
 
        xlen = vj_uncompress_tcp(cp + PPP_HDRLEN, ilen - PPP_HDRLEN,
                                 ilen - PPP_HDRLEN,
@@ -1650,9 +1577,6 @@ ppp_inproc(sc, m)
        if (sc->sc_flags & SC_REJ_COMP_TCP)
            goto bad;
 
        if (sc->sc_flags & SC_REJ_COMP_TCP)
            goto bad;
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.flags |= NBFLAG_VJCINC;
-#endif     
 
        vj_uncompress_uncomp(cp + PPP_HDRLEN, ilen-PPP_HDRLEN, &sc->sc_comp);
 
 
        vj_uncompress_uncomp(cp + PPP_HDRLEN, ilen-PPP_HDRLEN, &sc->sc_comp);
 
@@ -1661,24 +1585,6 @@ ppp_inproc(sc, m)
     }
 #endif /* VJC */
 
     }
 #endif /* VJC */
 
-#ifdef NETBUF_PROXY
-    m->pktinfo.size3 = NB_SIZE(m);
-    m->pktinfo.fourth.tv_sec = time.tv_sec;
-    m->pktinfo.fourth.tv_usec = time.tv_usec;
-#endif     
-
-#ifdef NBPFILTER
-    /*
-     * See if bpf wants to look at the packet.
-     * Size includes the PPP header by not the trailer.
-     */
-    if (sc->sc_bpf)
-#ifndef NETBUF_PROXY
-       bpf_tap(sc->sc_bpf, NB_MAP(m), NB_SIZE(m)); 
-#else
-       bpf_tap(sc->sc_bpf, m, 0);
-#endif
-#endif
 
     rv = 0;
     switch (proto) {
 
     rv = 0;
     switch (proto) {
@@ -1696,7 +1602,13 @@ ppp_inproc(sc, m)
        }
        NB_SHRINK_TOP(m, PPP_HDRLEN);
        inet_queue(sc->sc_if, NB_TO_nb(m));
        }
        NB_SHRINK_TOP(m, PPP_HDRLEN);
        inet_queue(sc->sc_if, NB_TO_nb(m));
+#if NS_TARGET >= 40
+       /*  I am assuming the time is different here than above. */
+       ns_time_to_timeval(clock_value(System), &tv_time);
+       sc->sc_last_recv = tv_time.tv_sec; /* update time of last pkt rcvd */
+#else
        sc->sc_last_recv = time.tv_sec; /* update time of last pkt rcvd */
        sc->sc_last_recv = time.tv_sec; /* update time of last pkt rcvd */
+#endif
        return;
 #endif
 
        return;
 #endif
 
index bbad31d05703f6669553237fe361f5eeb56e6840..f3bf00438b202944350f27c4e417af0c6e551e7f 100644 (file)
@@ -20,7 +20,9 @@
 /* Portions Copyright (C) 1990 Brad K. Clements (streams support)
  */
 
 /* Portions Copyright (C) 1990 Brad K. Clements (streams support)
  */
 
+#if !(NS_TARGET >= 40)
 #import <kernserv/prototypes.h>
 #import <kernserv/prototypes.h>
+#endif /* NS_TARGET */
 
 /*
  * Supported network protocols.  These values are used for
 
 /*
  * Supported network protocols.  These values are used for
@@ -34,7 +36,6 @@
 
 /* only defined in the posix universe... */
 /*typedef      int pid_t; */
 
 /* only defined in the posix universe... */
 /*typedef      int pid_t; */
-typedef unsigned short u_int16_t;
 
 struct ppp_softc {
        netif_t sc_if;          /* network-visible interface */
 
 struct ppp_softc {
        netif_t sc_if;          /* network-visible interface */
@@ -58,10 +59,6 @@ struct ppp_softc {
 #endif
        u_int   sc_bytessent;   /* count of octets sent */
        u_int   sc_bytesrcvd;   /* count of octets received */
 #endif
        u_int   sc_bytessent;   /* count of octets sent */
        u_int   sc_bytesrcvd;   /* count of octets received */
-#if NBPFILTER
-       caddr_t sc_bpf;         /* hook for BPF */
-       int if_pcount;          /* Really belongs in ifnet_t */
-#endif
        enum NPmode sc_npmode[NUM_NP]; /* what to do with each NP */
 #ifdef PPP_COMPRESS
        struct compressor *sc_xcomp; /* transmit compressor */
        enum NPmode sc_npmode[NUM_NP]; /* what to do with each NP */
 #ifdef PPP_COMPRESS
        struct compressor *sc_xcomp; /* transmit compressor */
index 5a83d0743093fe0f14ca4be22a10c9bb66cbc925..88e155a05014e4eaf40891a096632442bedfed2a 100644 (file)
@@ -217,31 +217,3 @@ extern struct uthread *uthread_from_thread(thread_t);
 
 #define        curproc         (proc_from_thread(current_thread()))
 
 
 #define        curproc         (proc_from_thread(current_thread()))
 
-#ifdef NBPFILTER
-#include <bpf/bpf.h>
-
-extern struct bpf_fns fnarg;
-
-static inline void
-bpfattach(caddr_t *driverp, netif_t ifp, u_int dlt, u_int hdrlen)
-{
-  struct bpf_attachargs atarg = {driverp, (caddr_t) ifp, dlt, hdrlen};
-
-  if (cdevsw[BPF_MAJOR_CHAR].d_ioctl != 0)
-    {
-      (*cdevsw[BPF_MAJOR_CHAR].d_ioctl)(0, BIOCATTACH, &atarg, 0);
-      (*cdevsw[BPF_MAJOR_CHAR].d_ioctl)(0, BIOCGFNS, &fnarg, 0);
-    }
-}
-
-
-static inline void
-#ifndef NETBUF_PROXY
- bpf_tap(caddr_t arg, u_char *pkt, u_int pktlen) 
-#else
- bpf_tap(caddr_t arg, NETBUF_T pkt, u_int pktlen)
-#endif
-{
-  (*fnarg.tapfn)(arg, pkt, pktlen);
-}
-#endif
diff --git a/NeXT/libposix/Makefile b/NeXT/libposix/Makefile
new file mode 100644 (file)
index 0000000..d4c9188
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# libposix makefile
+# $Id: Makefile,v 1.1 1998/03/26 02:52:03 paulus Exp $
+#
+
+ARCHFLAGS = 
+
+SRCS = libposix.c
+OBJS = libposix.o
+
+CFLAGS = -O -D_POSIX_SOURCE $(ARCHFLAGS)
+
+all: $(OBJS)
+
+clean:
+       rm -f *.o *~ core
+
diff --git a/NeXT/libposix/libposix.c b/NeXT/libposix/libposix.c
new file mode 100644 (file)
index 0000000..a9a5887
--- /dev/null
@@ -0,0 +1,165 @@
+/*  Yes, that's right:  of all the platforms supported by ppp, 
+    only Mach OpenStep 4.x doesn't support POSIX.  Sheesh.
+
+    Stranger still, the POSIX declatations are still in the 4.x header files,
+    and the gcc -posix still defines _POSIX_SOURCE.  So... 
+    we emulate (sometimes badly) the missing POSIX functions.  This
+    is by no means a complete or general POSIX emulation.  Just enough 
+    to get us by for ppp, so we don't have to pollute the rest of the 
+    sources of every other (non-braindead) platform.  Much of the
+    code was snarfed from NeXT's 4.0 ppp port, the rest inspired by
+    "POSIX Programmers Guide" by Donald Lewine.
+    
+    Maybe if we complain NeXT will upgrade to BSD4.4 libs like the rest of
+    the free world (and maybe pink elephants will fly out of my...  -KC)
+ */
+
+#include <signal.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <errno.h>
+
+int sigemptyset(sigset_t *set)
+{
+       *set = 0;
+       return 0;
+}
+
+int sigaddset(sigset_t *set, int signo)
+{
+       *set |= 1<<signo;
+       return 0;
+}
+
+int sigprocmask(int how, const sigset_t *set, sigset_t *oset)
+{
+       switch(how) {
+       case SIG_BLOCK:
+               *oset = sigblock(*set);
+               break;
+       case SIG_UNBLOCK:
+               /* XXX How does one emulate this with ancient BSD? (KC) */
+               break;
+       case SIG_SETMASK:
+               *oset = sigsetmask(*set);
+               break;
+       }
+       return 0;
+}
+
+int sigsuspend(const sigset_t *sigmask)
+{
+       sigpause(*sigmask);
+}
+
+int sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
+{
+       struct sigvec vec, ovec;
+       int st;
+
+       vec.sv_handler = act->sa_handler;
+       vec.sv_mask = act->sa_mask;
+       vec.sv_flags = act->sa_flags;
+       
+       st = sigvec(sig, &vec, &ovec);
+
+       if (oact) {
+               oact->sa_handler = ovec.sv_handler;
+               oact->sa_mask = ovec.sv_mask;
+               oact->sa_flags = ovec.sv_flags;
+       }
+
+       return st;
+}
+
+int tcgetattr(int fildes, struct termios *tp)
+{
+       return ioctl(fildes, TIOCGETA, tp);
+}
+
+int tcsetattr(int fd, int opt, const struct termios *t)
+{
+       int st;
+
+       switch(opt) {
+       case TCSANOW:
+               st = ioctl(fd, TIOCSETA, t);
+               break;
+       case TCSADRAIN:
+               st = ioctl(fd, TIOCSETAW, t);
+               break;
+       case TCSAFLUSH:
+               st = ioctl(fd, TIOCSETAF, t);
+               break;
+       default:
+               st = -1;
+               errno = EINVAL;
+               break;
+       }
+       return st;
+}
+
+/*  XXX we ignore duration (which is 0 in chat.c anyway).
+ */
+int tcsendbreak(int fildes, int duration)
+{
+       struct timeval sleepytime;
+
+       sleepytime.tv_sec = 0;
+       sleepytime.tv_usec = 400000;
+       if (ioctl(fildes, TIOCSBRK, 0) != -1)
+       {
+           select(0, 0, 0, 0, &sleepytime);
+           (void) ioctl(fildes, TIOCCBRK, 0);
+       }
+}
+
+/*  XXX This is the implementation of cfgetospeed from NeXT's ppp-5
+    pppd/sys-NeXT.c.  I don't know whether returning c_ispeed instead
+    of c_ospeed is deliberate or a type-o.
+ */
+speed_t cfgetospeed(const struct termios *t)
+{
+       return t->c_ispeed;
+}
+
+int cfsetospeed(struct termios *t, int speed)
+{ 
+       t->c_ospeed = speed; 
+       return 0; 
+}
+
+speed_t cfgetispeed(const struct termios *t)
+{
+       return t->c_ispeed;
+}
+
+int cfsetispeed(struct termios *t, int speed)
+{ 
+       t->c_ispeed = speed; 
+       return 0; 
+}
+
+int setsid(void)
+{
+    int fd;
+
+    setpgrp(0, getpid());
+    
+    if ( (fd = open("/dev/tty", O_RDWR | O_NDELAY)) < 0)
+           return -1;
+    ioctl(fd, TIOCNOTTY, NULL);
+    close(fd);
+
+    return 0;
+}
+
+int waitpid(pid_t pid, int *stat_loc, int options)
+{
+    if (pid == -1) 
+       pid = 0;
+    return wait4(pid, (union wait *) stat_loc, options, NULL);
+}
+
diff --git a/NeXT/mach/features.h b/NeXT/mach/features.h
new file mode 100644 (file)
index 0000000..e2efd55
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * NeXTStep 3.3 Developer for m68k is missing this file.
+ * Some needed headers try to include it:
+ *    proc.h includes user.h
+ *    user.h includes cpu.h
+ *    m68k cpu.h tries in include features.h
+ *
+ */
index d4b16c6bf904dbc64984d2538dbdaa948178dd21..0fd632c0b70fb582a66139867c3a5e585ab99f53 100644 (file)
 #ifndef __NBQ_H__
 #define __NBQ_H__
 
 #ifndef __NBQ_H__
 #define __NBQ_H__
 
-
 #define KERNEL 1
 
 #include <sys/types.h>
 #define KERNEL 1
 
 #include <sys/types.h>
+#if !(NS_TARGET >= 40)
 #include <kernserv/prototypes.h>
 #include <kernserv/prototypes.h>
+#endif /* NS_TARGET */
 
 #include "netbuf.h"
 typedef u_int mark_t;
 
 
 #include "netbuf.h"
 typedef u_int mark_t;
 
-/*
- * Netbufs and Netbuf wrappers don't help us because we
- * have no way of keeping track of information on start
- * position once nb_grow* or nb_shrink* are called.
- */
-
-#ifdef NETBUF_PROXY
-
-#warning ...you are compiling with NETBUF_PROXY
-
-typedef struct _bpf_encapsulater
-{
-  /*
-   * Depending on the direction of packet travel, these
-   * values have different meanings.
-   *
-   * INCOMING:
-   *    first  -- time first byte of packet received.
-   *    second -- time last byte of packet received.
-   *    third  -- Decompression start time
-   *    fourth  -- Packet Handoff time
-   *   (second-first) -- receive time
-   *   (third-second) -- queue time waiting for decompression
-   *   (fourth-third) -- decompression time
-   *   (fourth - first) -- total receive time.
-   *   (fourth - second) -- total system process time.
-   *
-   *   async_esc  -- The number of characters escaped in this packet.
-   *   size1  --  The size of the inital packet before decompression.
-   *              This value includes the expansion caused by AC and PC compression.
-   *                If flags set:
-   *                   AC implies packet got increased by 2 during receive.
-   *                   PC implies packet got increased by 1 during receive.
-   *              This + "async_esc" - (AC + PC expansion) describe actual bytes over link.
-   *              Includes PPP header and trailer.  
-   *              Doesn't count framing PPP_FLAG character.
-   *
-   *   size2  --  The size after BSD decompression.  PPP trailer was removed
-   *              so packet should be at least 2 shorter than original.
-   *   size3  --  The size after VJ decompression.
-   *
-   *
-   * OUTGOING:  (very similar to incoming)
-   *   first  -- time packet arrived to pppwrite() or pppoutput()
-   *   second -- time compression started
-   *   third  -- time compression ended
-   *   fourth -- time first byte sent to interface
-   *   fifth --  time last byte sent to interface
-   *
-   *   (second - first) Time waiting in system before compression
-   *   (third - second) Time for compression
-   *   (fourth - third) Time waiting in system out queue waiting to be
-   *                      selected for sending to interface
-   *   (fourth - first) Total system processing time
-   *   (fifth-fourth)   Total interface send time.
-   *   (fifth-first)    Total send time.
-   *
-   *   size1 -- The size of the intial packet as receved from the stack
-   *   size2 -- The size after VJ compression
-   *   size3 -- The size after BSD compression
-   *
-   */
-  struct timeval first, second, third, fourth, fifth;
-  unsigned async_esc, size1, size2, size3;
-
-  int flags;                                 /* info about packet   */
-#define NBFLAG_INCOMING     0x01             /* else outgoing       */
-#define NBFLAG_AC           0x02             /* Address compressed  */
-#define NBFLAG_PC           0x04             /* Protocol Compressed */
-#define NBFLAG_VJC          0x08             /* VJ compressed       */
-#define NBFLAG_CCP          0x10             /* BSD compressed      */
-#define NBFLAG_CCPINC       0x20             /* BSD incompressible  */
-#define NBFLAG_VJCINC       0x40             /* VJ incompressible   */                                        
-
-} bpf_encapsulater;
-
-typedef struct _ppp_netbuf_t
-{
-  netbuf_t buffer;
-  netbuf_t orig_buffer;                     /*
-                                            * Original outgoing datagram
-                                            * received.  We do compression and
-                                            * statistics gathering on buffer,
-                                            * we send buffer, but we return
-                                            * orig_buffer to BPF so that it doesn't
-                                            * have to understand all the compression.
-                                            */
-                                              
-
-  struct _ppp_netbuf_t *next;               /* for linked list */
-
-  unsigned int size;                        /* original size requested for netbuf.
-                                            * We leave it up to caller to
-                                            * determine extra space they need.  We
-                                            * may also include extra space we need 
-                                            * for bounds checking.
-                                            */
-
-  unsigned char *wrapper,                   /* unaligned address returned for this containing
-                                            * structure.  Used for freeing.
-                                            */
-
-  *init_offset;                             /* Init_offset is nb_map  of the netbuf_t before
-                                            * user can change it around.  Can check bounds
-                                            * against this.
-                                            */
-  mark_t mark;
-
-  bpf_encapsulater pktinfo;                  /* The size and compression stats that
-                                             * get passed to user level tcpdump
-                                             */
-
-} *ppp_netbuf_t;
-
-/*
- * These prototypes are identical to the corrisponding functions
- * found in netbuf.h except they use the ppp_netbuf_t type.
- */
-extern ppp_netbuf_t    cb_nb_alloc(unsigned size);
-extern void            cb_nb_free(ppp_netbuf_t nb);
-extern void            cb_nb_duplicate(ppp_netbuf_t from, ppp_netbuf_t to);
-extern char *          cb_nb_map(ppp_netbuf_t nb);
-extern char *          cb_nb_map_orig(ppp_netbuf_t nb);
-extern unsigned        cb_nb_size(ppp_netbuf_t nb);
-extern unsigned        cb_nb_size_orig(ppp_netbuf_t nb);
-extern int             cb_nb_shrink_top(ppp_netbuf_t nb, unsigned size);
-extern int             cb_nb_grow_top(ppp_netbuf_t nb, unsigned size);
-extern int             cb_nb_shrink_bot(ppp_netbuf_t nb, unsigned size);
-extern int             cb_nb_grow_bot(ppp_netbuf_t nb, unsigned size);
-extern int             cb_nb_read(ppp_netbuf_t nb, unsigned offset, unsigned size, void *target);
-extern int             cb_nb_write(ppp_netbuf_t nb, unsigned offset, unsigned size, void *source);
-extern void            cb_nb_get_mark(ppp_netbuf_t nb, mark_t *ptr);
-extern void            cb_nb_set_mark(ppp_netbuf_t nb, mark_t ptr);
-extern void            cb_nb_get_next(ppp_netbuf_t nb, ppp_netbuf_t *ptr);
-extern void            cb_nb_set_next(ppp_netbuf_t nb, ppp_netbuf_t ptr);
-extern ppp_netbuf_t    cb_nb_to_NB(netbuf_t);
-extern netbuf_t        cb_NB_to_nb(ppp_netbuf_t);
-
-#define NETBUF_T ppp_netbuf_t
-#define NB_ALLOC cb_nb_alloc
-#define NB_FREE cb_nb_free
-#define NB_DUPLICATE cb_nb_duplicate
-#define NB_MAP cb_nb_map
-#define NB_MAP_ORIG cb_nb_map_orig
-#define NB_SIZE cb_nb_size
-#define NB_SIZE_ORIG cb_nb_size_orig
-#define NB_SHRINK_TOP cb_nb_shrink_top
-#define NB_GROW_TOP cb_nb_grow_top
-#define NB_SHRINK_BOT cb_nb_shrink_bot
-#define NB_GROW_BOT cb_nb_grow_bot
-#define NB_READ cb_nb_read
-#define NB_WRITE cb_nb_write
-#define NB_GET_MARK cb_nb_get_mark
-#define NB_SET_MARK cb_nb_set_mark
-#define NB_GET_NEXT cb_nb_get_next
-#define NB_SET_NEXT cb_nb_set_next
-#define nb_TO_NB cb_nb_to_NB
-#define NB_TO_nb cb_NB_to_nb
-
-#else  /* NETBUF_PROXY */
-
 #define NETBUF_T netbuf_t
 #define NB_ALLOC ppp_nb_alloc
 #define NB_FREE nb_free
 #define NETBUF_T netbuf_t
 #define NB_ALLOC ppp_nb_alloc
 #define NB_FREE nb_free
@@ -200,8 +39,6 @@ extern netbuf_t        cb_NB_to_nb(ppp_netbuf_t);
 #define nb_TO_NB(nb) (nb)
 #define NB_TO_nb(NB) (NB)
 
 #define nb_TO_NB(nb) (nb)
 #define NB_TO_nb(NB) (NB)
 
-#endif /* NETBUF_PROXY  */
-
 
 struct qparms {
     u_char     q_low, q_high, q_max;
 
 struct qparms {
     u_char     q_low, q_high, q_max;
@@ -214,7 +51,6 @@ struct nb_queue {
     NETBUF_T   head, tail;
 };
 
     NETBUF_T   head, tail;
 };
 
-#ifndef NETBUF_PROXY
 #define NB_EXTRA (sizeof(mark_t)+sizeof(netbuf_t))
 
 static inline void
 #define NB_EXTRA (sizeof(mark_t)+sizeof(netbuf_t))
 
 static inline void
@@ -274,12 +110,11 @@ ppp_nb_alloc(unsigned int size)
     size+=NB_EXTRA;
     nb=nb_alloc(size);
     if(nb) {
     size+=NB_EXTRA;
     nb=nb_alloc(size);
     if(nb) {
-       NB_SHRINK_TOP(nb,NB_EXTRA);
+       nb_shrink_top(nb,NB_EXTRA);
        NB_SET_NEXT(nb,NULL);
        NB_SET_MARK(nb,0);
     }
     return nb;
 }
        NB_SET_NEXT(nb,NULL);
        NB_SET_MARK(nb,0);
     }
     return nb;
 }
-#endif /* NETBUF_PROXY  */
 #endif /* __NBQ_H__ */
 
 #endif /* __NBQ_H__ */
 
index 18286a3b100d7414b1a24ce9998e5f86c58d71d6..ea27799d91d3850d58ab1b206e4aca30b44e3d7e 100644 (file)
 #define KERNEL_FEATURES 1
 #define INET 1
 
 #define KERNEL_FEATURES 1
 #define INET 1
 
+#if NS_TARGET >= 40
+#if NS_TARGET >= 41
+#include <kernserv/lock.h>
+#else
+#include <kern/lock.h>
+#endif /* NS_TARGET */
+#endif /* NS_TARGET */
+
 #include <sys/param.h>
 #include <sys/param.h>
+#if NS_TARGET >= 41
+typedef simple_lock_data_t lock_data_t;                /* XXX */
+#endif /* NS_TARGET */
 #include <sys/proc.h>
 #include <sys/user.h>
 #include "netbuf.h"
 #include <sys/proc.h>
 #include <sys/user.h>
 #include "netbuf.h"
 #include <sys/dk.h>
 #include <sys/uio.h>
 #include <sys/errno.h>
 #include <sys/dk.h>
 #include <sys/uio.h>
 #include <sys/errno.h>
+#if !(NS_TARGET >= 40)
+/*  XXX what happened to this header file? */
 #include <machine/param.h>
 #include <machine/param.h>
-
+#endif
 
 #include <kernserv/prototypes.h>
 /* NeXT broke spl.h in 3.2/m68k. Thanks EPS! */
 
 #include <kernserv/prototypes.h>
 /* NeXT broke spl.h in 3.2/m68k. Thanks EPS! */
@@ -675,12 +688,6 @@ pppstart(tp)
            *cp++ = (sc->sc_outfcs >> 8) & 0xFF;
        }
 
            *cp++ = (sc->sc_outfcs >> 8) & 0xFF;
        }
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.fourth.tv_sec = time.tv_sec;
-       m->pktinfo.fourth.tv_usec = time.tv_usec;
-#endif
-
-
        start = mtod(m, u_char *);
        len = NB_SIZE(m);
        stop = start + len;
        start = mtod(m, u_char *);
        len = NB_SIZE(m);
        stop = start + len;
@@ -727,9 +734,6 @@ pppstart(tp)
                sc->sc_bytessent += 2;
                start++;
                len--;
                sc->sc_bytessent += 2;
                start++;
                len--;
-#ifdef NETBUF_PROXY
-       ++(m->pktinfo.async_esc);
-#endif
            }
        }
        /*
            }
        }
        /*
@@ -754,31 +758,6 @@ pppstart(tp)
        sc->sc_bytessent++;
 
 
        sc->sc_bytessent++;
 
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.fifth.tv_sec = time.tv_sec;
-       m->pktinfo.fifth.tv_usec = time.tv_usec;
-#endif
-
-
-#if defined(NBPFILTER) && defined(NETBUF_PROXY)
-
-    /*
-     * See if bpf wants to look at the packet.  Gotta be careful
-     * here because BPF want the uncompressed packet.  For now we
-     * stash a copy that we hand off.  In the future, we may try
-     * to modify BPF to handle compressed packets instead.
-     *
-     * The BPF process point will not work for
-     * non-NETBUF_PROXY points.  In this case, we hand the packet
-     * to BPF earlier in the process (see if_ppp.c).
-     *
-     */
-
-         if (sc->sc_bpf)
-             bpf_tap(sc->sc_bpf, m, 0);
-
-#endif
-
        /* Finished with this netbuf; free it and move on. */
        NB_FREE(m);
        m = NULL;
        /* Finished with this netbuf; free it and move on. */
        NB_FREE(m);
        m = NULL;
@@ -800,7 +779,11 @@ pppstart(tp)
      * drained the t_outq.
      */
     if (!idle && (sc->sc_flags & SC_TIMEOUT) == 0) {
      * drained the t_outq.
      */
     if (!idle && (sc->sc_flags & SC_TIMEOUT) == 0) {
+#if NS_TARGET >= 40
+       timeout(ppp_timeout, (void *) sc, 1);
+#else
        ns_timeout(ppp_timeout, (void *) sc, 1 * (1000000000L / HZ), CALLOUT_PRI_SOFTINT0);
        ns_timeout(ppp_timeout, (void *) sc, 1 * (1000000000L / HZ), CALLOUT_PRI_SOFTINT0);
+#endif /*NS_TARGET */
        sc->sc_flags |= SC_TIMEOUT;
     }
 
        sc->sc_flags |= SC_TIMEOUT;
     }
 
@@ -1038,12 +1021,6 @@ pppinput(c, tp)
            return;
          }
        
            return;
          }
        
-#ifdef NETBUF_PROXY
-       sc->sc_m->pktinfo.second.tv_sec = time.tv_sec;
-       sc->sc_m->pktinfo.second.tv_usec = time.tv_usec;
-       sc->sc_m->pktinfo.size1 = ilen;
-#endif
-
        /*
         * Remove FCS trailer.  Set packet length...
         */
        /*
         * Remove FCS trailer.  Set packet length...
         */
@@ -1085,9 +1062,6 @@ pppinput(c, tp)
        c ^= PPP_TRANS;
     } else if (c == PPP_ESCAPE) {
        sc->sc_flags |= SC_ESCAPED;
        c ^= PPP_TRANS;
     } else if (c == PPP_ESCAPE) {
        sc->sc_flags |= SC_ESCAPED;
-#ifdef NETBUF_PROXY
-       ++(sc->sc_m->pktinfo.async_esc);
-#endif
        return;
     }
 
        return;
     }
 
@@ -1119,11 +1093,6 @@ pppinput(c, tp)
        sc->sc_mp = mtod(m, char *);
        sc->sc_fcs = PPP_INITFCS;
 
        sc->sc_mp = mtod(m, char *);
        sc->sc_fcs = PPP_INITFCS;
 
-#ifdef NETBUF_PROXY
-       m->pktinfo.first.tv_sec = time.tv_sec;
-       m->pktinfo.first.tv_usec = time.tv_usec;
-       m->pktinfo.flags |= NBFLAG_INCOMING;
-#endif
        if (c != PPP_ALLSTATIONS) {
            if (sc->sc_flags & SC_REJ_COMP_AC) {
                IOLogDbg("ppp%d: garbage received: 0x%02x (need 0x%02x)\n",
        if (c != PPP_ALLSTATIONS) {
            if (sc->sc_flags & SC_REJ_COMP_AC) {
                IOLogDbg("ppp%d: garbage received: 0x%02x (need 0x%02x)\n",
@@ -1133,9 +1102,6 @@ pppinput(c, tp)
            *sc->sc_mp++ = PPP_ALLSTATIONS;
            *sc->sc_mp++ = PPP_UI;
            sc->sc_ilen += 2;
            *sc->sc_mp++ = PPP_ALLSTATIONS;
            *sc->sc_mp++ = PPP_UI;
            sc->sc_ilen += 2;
-#ifdef NETBUF_PROXY
-           m->pktinfo.flags |= NBFLAG_AC;
-#endif     
        }
     }
 
        }
     }
 
@@ -1150,9 +1116,6 @@ pppinput(c, tp)
        /* a compressed protocol */
        *sc->sc_mp++ = 0;
        sc->sc_ilen++;
        /* a compressed protocol */
        *sc->sc_mp++ = 0;
        sc->sc_ilen++;
-#ifdef NETBUF_PROXY
-           m->pktinfo.flags |= NBFLAG_PC;
-#endif     
     }
 
     if (sc->sc_ilen == 3 && (c & 1) == 0) {
     }
 
     if (sc->sc_ilen == 3 && (c & 1) == 0) {
diff --git a/NeXT/random.c b/NeXT/random.c
deleted file mode 100644 (file)
index 1c44fa1..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Because the standard library random number
- * functions are not availble at the kernel level
- * I wrote this simple random number generator.
- *
- * It uses the multiplicative congruential method.
- * See pg 263 of Banks and Carson "Discrete-Event
- * System Simulation".
- *
- */
-
-#include "random.h"
-
-static unsigned x0=123457;     /* seed */
-static unsigned a=16807;       /* constant multiplier */
-static unsigned c=0;           /* increment */
-static unsigned m=2147483647;  /* modulus */
-
-/*
- * Set the seed to the argument.
- */
-
-void srand(unsigned i)
-{
-  x0 = i;
-}
-
-
-/*
- * Use Linear Congruential Method to Generate
- * sequence.  Return either int or float...
- */
-  
-unsigned rand(void)
-{
-  unsigned tmpseed;
-
-  tmpseed = (a*x0+c) % m;
-  x0 = tmpseed;
-  return (unsigned) x0;
-}
-
-
-
-float frand(void)
-{
-  unsigned tmpseed;
-
-  tmpseed = (a*x0+c) % m;
-  x0 = tmpseed;
-  return (x0/(float)m);
-}
diff --git a/NeXT/random.h b/NeXT/random.h
deleted file mode 100644 (file)
index 787368d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Because the standard library random number
- * functions are not availble at the kernel level
- * I wrote this simple random number generator.
- *
- * It uses the multiplicative congruential method.
- * See pg 263 of Banks and Carson "Discrete-Event
- * System Simulation".
- *
- */
-
-void srand(unsigned i);
-unsigned rand(void);
-float frand(void);
index 519f43f99688eebe7613ca811dd759a7e116cc30..41fb9e1a375d355e5d1ebbd8739a31b691e9c76c 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-#  $Id: README.NeXT,v 1.3 1997/04/30 05:37:02 paulus Exp $
+#  $Id: README.NeXT,v 1.4 1998/03/26 02:54:17 paulus Exp $
 #
 
 This distribution contains a port of PPP-2.3 for NeXT.  The full
 #
 
 This distribution contains a port of PPP-2.3 for NeXT.  The full
@@ -11,17 +11,24 @@ the version you presently use.  The web site contains a comprehensive
 NeXT specific FAQ, mailing list information, and a bug submission
 form.  Please see:
 
 NeXT specific FAQ, mailing list information, and a bug submission
 form.  Please see:
 
-  http://www.thoughtport.com:8080/PPP/
-     -or-
-  ftp://ftp.thoughtport.com/pub/next/ppp/
+  WWW site:     http://www.peak.org/next/ppp/
+  WWW mirror:   http://www.thoughtport.com:8080/PPP/
+
+  FTP site:     ftp://next-ftp.peak.org/pub/next/apps/internet/ppp/dev
+  FTP Mirror:   ftp://ftp.NMR.EMBL-Heidelberg.DE/pub/next/ppp/
 
 If you use this software and are pleased with its performance, you are
 encouraged to make a donation to support continued development.  50%
 of all donations go to charity.  For more information, please see:
 
 If you use this software and are pleased with its performance, you are
 encouraged to make a donation to support continued development.  50%
 of all donations go to charity.  For more information, please see:
-  http://www.thoughtport.com:8080/PPP/donations.html
-
+  http://www.thoughtport.com:8080/cgi-bin/PPP/donation
 
 
-The subdirectory NeXT contains several files of interest:
+It is recommended that you use the PPP installer package to install
+the latest version of PPP.  This installer package has been designed
+to make installation of PPP exceedingly easy and includes all the
+documentation you need.  However, if you want to manually compile and
+configure PPP, the subdirectory 'NeXT' contains the documentation and
+information you need.  You do NOT need to look at these files if you
+use the installer package.
 
    INSTALL -     A file giving specific directions for installing
                  ppp-2.3 on a NeXT computer.
 
    INSTALL -     A file giving specific directions for installing
                  ppp-2.3 on a NeXT computer.
@@ -29,18 +36,9 @@ The subdirectory NeXT contains several files of interest:
    Examples -    This directory provides more examples of
                  scripts and other helpful utilities.
 
    Examples -    This directory provides more examples of
                  scripts and other helpful utilities.
 
-   MailBug.app - This application is similar to BugNeXT.  It will 
-                 allow you to submit bugs electronically.  
-                 Many thanks to Running-Start, Inc. for this program.
-                 The WWW page also has a bug submission form.
-
    NeXT_Version - This file describes what NeXT specific version of
                   PPP-2.3 you have.
 
    NeXT_Version - This file describes what NeXT specific version of
                   PPP-2.3 you have.
 
-   ChangeLog.rtf - A history of development and bug fixes for ppp-2.3.
+   ChangeLog.rtf - A history of development and bug fixes for ppp-2.3
 
    TODO.NeXT -   A wishlist for features.
 
    TODO.NeXT -   A wishlist for features.
-
-
-
-