home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
slip-cm.zip
/
README
< prev
next >
Wrap
Text File
|
1994-04-08
|
11KB
|
259 lines
SLIP Connection Manager (CM) for OS/2 TCP/IP V2
-----------------------------------------------
Andy Robinson
netMAINE
andy@maine.maine.edu
Features:
* Allows offline composition of mail in a SLIP-only environment (stock
LAMAIL is not very friendly toward this activity).
* Allows a pseudo-demand-dial capability for TCP/IP applications such
as TELNET, FTP, etc.
* Sends/retrieves mail via POP3 (LAMPOP) (Send capability requires
POP3 server to support XTND XMIT operation!!)
Prequisites:
The following software packages must be installed on your computer
before installing SLIP/CM:
* TCP/IP V2 for OS/2
* LAMPOP (David Bolen's POP3 client for OS/2)
SLIP/CM ASSUMES A SLIP-ONLY ENVIRONMENT!! If your computer is
permanently attached to an IP network, you probably don't need
SLIP/CM!
SLIP/CM requires a POP3 server that can send mail using XTND XMIT
(this is a requirement of LAMPOP's SEND option). If your POP3
server does not support XTND XMIT, you'll either have to modify
the SLIP/CM code or do without SLIP/CM.
Package Contents:
README (this file)
CMANAGER.CMD (connection manager main program)
CMPERFORM.CMD (CM command interface)
CMSTART.CMD (CM 'start connection' primitive)
CMSTOP.CMD (CM 'stop connection' primitive)
CMFORCE.CMD (CM 'force connection' primitive)
CMEXIT.CMD (CM 'terminal CM' primitive)
CMWRAPPER.CMD (template for CM application wrapper)
DEMANDFTP.CMD (wrapper for FTP)
DEMANDFTPPM.CMD (wrapper for FTPPM)
DEMAND3270.CMD (wrapper for PMANT)
DEMANDGOPHER.CMD (wrapper for IBM EWS Gopher client)
SETTIME.CMD (wrapper for NISTP.EXE* (set time by NIST clock))
CHECKMAIL.CMD (exchange mail (send and receive) via POP3 server)
SPMAIL.CMD (send pending mail using POP3 client/server)
SENDMAIL.CMD (front-end for SENDMAIL.EXE to allow offline compose)
TASKS.CMD (list of tasks running on system)
TASK_ACTIVE.CMD (determine if particular task is active)
SDATE.CMD (generate "seconds since epoch" date form)
* NISTP.EXE not included
Disclaimer:
This package may be used, copied, and distributed at will, as long as
this README file accompanies all distributions, and as long as no fee is
charged for this package or for any product which uses it (reasonable media
and/or transmission fees excluded). Any modified versions of this
package should include proper attributions and this README file.
This package is provided as-is, with no waranties expressed or implied
as to its suitability for any purpose including the one for which it was
designed. The author assumes no responsiblity for lost revenues, time, or
productivity incurred due to the use of this package. The user of this
package assumes all responsibility for installation, configuration, and
debugging. The author is not under any obligation to support or update
this package, though he will attempt to provide support on a time-available
basis.
Installation:
*NOTE* This installation procedure has not been tested. If you have
problems, please contact andy@maine.maine.edu immediately!
1. Install TCP/IP V2 and LAMPOP
2. Install this package into a directory in your PATH
3. Add the following lines to CONFIG.SYS:
SET TCPBIN=<\bin directory of TCP/IP hierarchy>
SET SLIP.POP_SERVER=<host name of POP3 server>
SET SLIP.POP_DIRECTORY=<incoming mail directory i.e., \etc\mail>
SET SLIP.POP_INDEX=<incoming mail index i.e., \etc\mail\inbox.ndx>
SET SLIP.USERNAME=<your SLIP service/POP3 username>
SET SLIP.PASSWORD=<your SLIP service/POP3 password>
SET SLIP.DIALSTRING=<dialstring for your SLIP service>
REBOOT THE SYSTEM!
*NOTE* That SLIP/CM assumes the username your SLIP provider uses
is the same as the username for the POP3 server (same with the
password). If this is not the case, you will need to modify the
programs accordingly.
*NOTE* Having a plaintext version of your password in CONFIG.SYS
may be a drawback. A previous version of the program used VREXX
to issue a windowed prompt for the username and password--you may
wish to do something similar.
*NOTE* For a better description of the POP_xxx variables, see the
documentation for LAMPOP.
*NOTE* If your POP3 server does not support sending mail (via the
XTND XMIT operation), you can't use SLIP/CM.
Examples (real life (almost)):
SET TCPBIN=D:\Software\Package\TCPIP\BIN
SET SLIP.USERNAME=atr
SET SLIP.PASSWORD=snicker
SET SLIP.DIAL_STRING=ATDT1-800-555-1212
SET SLIP.POP_SERVER=pop3.some.net
SET SLIP.POP_DIRECTORY=D:\Software\Package\TCPIP\etc\mail
SET SLIP.POP_INDEX=D:\Software\Package\TCPIP\etc\mail\inbox.ndx
4. Create the MODIFIED directory as a branch of TCPBIN:
MKDIR %TCPBIN%\Modified
5. Move SENDMAIL.EXE into the MODIFIED directory:
COPY %TCPBIN%\sendmail.exe %TCPBIN%\modified
ERASE %TCPBIN%\sendmail.exe
6. Copy SENDMAIL.CMD from this package into the TCPBIN directory:
COPY <source>\SENDMAIL.CMD %TCPBIN%
7. Modify (including renaming) the ANSREMOTE.CMD from this package
as necessary. Unless you use ANSRemote, you will have to make
some changes to this file. This may involve using SLIPTERM to
manually go through the SLIP login sequence first, then modifying
ANSREMOTE.CMD to do it automagically.
8. Use TCP/IP Configuration or directly modify %etc%\SLIP.CFG to list
ANSREMOTE.CMD (or whatever you've renamed it to) as the SLIP startup
script.
9. You are now basically ready to go. If you want to customize any of
the wrappers, or design new wrappers for specific applications, go
for it.
10. Start CMANAGER.CMD. I put a program object pointing to CMANAGER in the
STARTUP folder so CMANAGER is always running.
*NOTE* You can set up program objects to call CMSTART and CMSTOP to
provide an manual SLIP setup/takedown capability.
*NOTE* Doubleclicking on the wrapper icons such as CHECKMAIL,
DEMAND3270, etc., will start the respective sessions. SLIP/CM is
smart enough to keep the connection going as long as there are any
active sockets, and will not re-start SLIP.EXE if it is already
running.
NOTES ABOUT MAIL SUPPORT
------------------------
SLIP/CM resorts to some kludges to implement offline composition of
mail.
First, SLIP/CM replaces SENDMAIL.EXE with SENDMAIL.CMD. SENDMAIL.CMD
becomes the MTA for LAMAIL (SENDMAIL.EXE is saved in another directory).
When you send (F5) a message from LAMAIL, SENDMAIL.CMD gets control.
SENDMAIL.CMD checks to see if SLIP.EXE is running. If SLIP.EXE is running,
SENDMAIL.CMD calls LAMPOP (*not* SENDMAIL.EXE) to send the message
immediately.
If SLIP.EXE is *not* running, SENDMAIL.CMD writes a record to a file called
PENDING_MAIL in the %tmp% directory, and writes body of the mailfile to a
unique filename in the %tmp% directory.
If SENDMAIL.CMD is called with the -bd options (start daemon), SENDMAIL.EXE
*is* invoked in daemon mode.
When you run CHECKMAIL.CMD, CMANAGER starts the SLIP connection. Once the
connection is established, CHECKMAIL calls LAMPOP to receive any mail pending
on the POP3 server (CHECKMAIL uses the SLIP.xxxxx environment variables
described in step 3 to pass information to LAMPOP).
Once all the pending mail is received, CHECKMAIL calls SPMAIL.CMD.
SPMAIL.CMD scans the PENDING_MAIL file and uses LAMPOP to send any messages
that were composed offline. Once these messages have been successfully
passed to the POP3 server, their %tmp% incarnations are erased and the
PENDING_MAIL file updated accordingly. If there are errors during
transmission, any and all unsent messages will be retained and will be
retried the next time you run CHECKMAIL.
As you can see, the mail support is a kludge--and if you have any ideas as
to how to improve the implementation, please let me know!!
NOTES ABOUT CMANAGER
--------------------
The CMANAGER.CMD program manages the SLIP connection. It receives requests
to START or STOP via a REXX IPC queue called CMCOMMANDQUEUE. The interface
to this queue is CMPERFORM.CMD. Using CMPERFORM, you can send arbitrary
requests to CMANAGER.CMD. CMANAGER only responds to the following requests:
1. START -- start a SLIP connection
2. STOP -- stop a SLIP connection (quiesce)
3. EXIT -- terminate CMANAGER
4. FORCE -- force the SLIP connection immediately
Each of these requests has an associated primitive, CMSTART(), CMSTOP(),
CMEXIT(), and CMFORCE(). The primitives provide the most convenient way
to include CMANAGER functionality in REXX programs. CMSTART() primitive
can optionally block (using SLIPWAIT) until the SLIP connection becomes
active.
Note that CPERFORM.CMD blocks until it receives an acceptance message on
a separate (unique) IPC queue from CMANAGER. If you use CPERFORM to
send an unknown request, your program will block until you terminate it
(i.e., with CTRL-C). In any event, the response from CMANAGER does not
indicate successful completion of the request--it only indicates that
CMANAGER has seen your request and agreed that it is a legitimate request.
As far as SLIP/CM is concerned, TCP/IP applications are either wrapped
or unwrapped. A wrapped application has a SLIP/CM front-end--for example,
DEMANDFTP, DEMAND3270, and CHECKMAIL. These applications can simulate a
demand-dial capability by calling the CMSTART/CMSTOP primitives.
Unwrapped applications are the raw programs supplied with TCP/IP, such as
PING, PMANT, TELNET, FTP, etc. These applications will not work unless
the SLIP connection is active.
The first time CMANAGER receives a START request, it will start the
SLIP.EXE driver. After that, it increments a counter of pending
connections. CMANAGER will not terminate the SLIP connection until:
1. A FORCE request is received
2. The number of pending connections = 0 *and*
The number of active STREAM/DGRAM sockets = 0
Condition 2 is important: it reduces repetitive invokations of SLIP.EXE,
and it allows you to run "unwrapped" TCP/IP programs after SLIP is started
For example, if you run DEMAND3270 to start a 3270 session to a remote host,
then run PMPING (unwrapped), then terminate your 3270 session, the SLIP
session will not be terminated until you terminate PMPING as well.
ALL SLIP/CM WRAPPERS SHOULD CALL BOTH CMSTART() AND CMSTOP()! If
a STOP request is somehow lost, the SLIP connection may not be terminated
when it is supposed to be--which could lead to large connect-time bills.
Make sure that any wrappers you write call CMSTOP() for every call to
CMSTART()--and make sure that the wrappers have exits to ensure that
the CMSTOP() will be performed even if the wrapper is terminated abnormally
by CTRL-C or a kill signal.