The Tymnet adapter (not to be confused with a Tymnet adapter under Tymshare CP) is a program that holds the sole authority {(p2,tba)} to communicate with some Tymnet base. Its only responsibility is to insure that the users of various circuits do not interfere with each other and to provide to the respective circuit users efficient and unrestricted access to the Tymnet circuit. The Tymnet adapter thus multiplexes and demultiplexes the interface between Tymnet and the host.
To see the log of the interface to Tymnet do "OSFLOAD user.systemview.prttymlf PRTTYML 0" and then "EXECUTE PRTTYML". This is a record of troubles at this interface.
See (p2,gtt) about a way to access Gnosis under VM without a dedicated Tymnet base. See (tssc) for most common use of these facilities.
TA supports three kinds of gate which are associated with a particular circuit. They are SIK {(p2,sik)}, SOK {(p2,sok)} and CCK {(p2,cck)}. They originate by the logic described in (p2,newsiksok) and (p2,auxcir) {but most programs can get them only by getting the CCK the logic described in (p2,desttcem) and then using the tap operations on the CCK}.
A circuit can be zapped at the instigation of either Tymnet or the CCK or TBLK key holders. Whatever the cause, the following happens:
SIK and SOK signal EOF.
If the input or output interface is tapping, the corresponding "B" key will be jumped to with order code kt+2.
When the circuit is zapped, the fact that no more data will ever be transferred is signaled according to the byte stream protocol.
Messages from the circuit may be buffered by the TA. If the byte stream consumer {the circuit user} does not consume bytes fast enough {i.e., the interface spends too much time in the consuming state}, backpressure will be generated on the circuit to prevent the TA's buffers from overflowing. {This is the only way the circuit user can cause backpressure to be generated.}
The circuit user can encourage the TA to delay delivering input so that data can be grouped into larger blocks, resulting in less overhead. This is done by means of the (_activation set). Whenever any message in the activation set has been received, it and all messages preceding it will be promptly delivered to the circuit user. (Of course, messages cannot be delivered while the interface is consuming.) (N.B. The message in the activation set may not be the last message in the transmission.) Messages will also be promptly delivered when there are enough of them to reach the limit of data that the consumer will accept. Other than the above, the TA will usually not deliver any messages (even if the interface is producing), but it reserves the right to do so (for example to free up buffer space).
See (p2,maskset) for definition of mask sets.
Note the following differences between this definition and the definition of mask sets used in Tymshare's VM 370 systems. Space is in set 0. Set 5 is specified to contain backspace.
The TA will consume output promptly unless the circuit is generating backpressure.
When the circuit is zapped, the fact that no more data can ever be accepted is signaled according to the byte stream protocol.
bit{s} add'l valid for]
0 1-2 3-7 bytes In Out
circuit message{s}
0 W X {WX} I O {WX bytes of data} {WX > 0}
1 0 1 I O Gobbler
1 0 2 I O Enter Deferred Echo Mode
1 0 3 I O Leave Deferred Echo Mode
1 0 4 I O Green Ball
1 0 5 I O Red Ball
1 0 6 I O Yellow Ball
1 0 7 I O Orange Ball
1 0 8 I Gray Ball
1 0 9 I Black Ball
1 0 10 I Break character
1 0 11 O Hang character
1 0 12 O Enter Transparency Mode
1 0 13 O Leave Transparency Mode
1 0 14 Enter Alternate Output Device Mode
1 0 15 Leave Alternate Output Device Mode
1 1 16 stat I Port status
1 1 17 tc O Probe Terminal Characteristics
1 2 18 tc, val I Terminal Characteristics Response
1 2 19 tc, val O Set Terminal Characteristics.Iovr=0;
Any of these operations will return kt+1 if the circuit has been zapped.
CCK(0,(4,new_limit);A,B==>c,(4,old_limit),(4,ncc);D,SIK) ("Tap Input").
Otherwise, if the input interface is producing, i.e. the TA holds a co-gate and an old limit, then the co-gate is returned in D and the old limit in old_limit; key A replaces the old co-gate; new_limit replaces the old limit; c is zero; B is ignored; and SIK is DK(0).
If omitted, new_limit is assumed to be 1.
In either case ncc is the number of bytes that the TA has committed (to the old consumer) to send but has not sent yet (i.e. the rest of the current token). (They will be sent to the new consumer promptly.)
Otherwise, if the output interface is consuming, i.e. the TA holds a co-gate, then that co-gate is returned in D, key A replaces it, c is zero, new_limit is garbage, B is ignored, and SOK is DK(0).
If the output interface is producing, i.e. some program holds a co-gate to the TA and a limit, the operation waits until the output interface is not in the "tapping" state, then: the output interface enters the "tapping" state; SOK is a new co-gate; new_limit is the limit that applies to SOK; c is 1; A is ignored; D is DK(0); and the next time the old co-gate is jumped to, the jump and its parameters will be passed on to key B and then the output interface leaves the "tapping" state.
In either case, the TA resets its state, i.e. it interprets the next byte received from the new co-gate to be the beginning of a token. If part of a token had been received, it is ignored, unless it was a data byte token, in which case the data bytes which were received are sent on the circuit. n will be 0, 1, or 2. "state" is the shortest string of bytes that could be sent to the TA to put it back in its previous state, i.e. it describes the nature of the bytes that the old producer has committed to send but has not sent yet. There are only these cases:
.(0)
.(1, M) 0 < M < 128 {M bytes of data remaining)
.(1, X'D3') Set Term. Characteristics
.(2, X'D3', tc) Set Term. Characteristics
.(1, X'B1') Probe Term. Characteristics
While gobbling is on, SOK will be prompt. Messages for the circuit will be discarded beginning at this point in the output stream. However, a character gobbler is never discarded. If gobbling is turned on while SOK is consuming, it returns immediately. Only whole messages are discarded, so SOK continues to keep track of where it is within a token. Gobbling is initially off.
Programming note: In the usual situation there is one domain A generating output for SOK and another domain B which discovers a need to stop the output. B will signal the need to stop to A (via shared memory) and then do a Start Gobbling operation to ensure that A sees the signal promptly. When A does so, it sends a gobbler via SOK and then does a Stop Gobbling operation. Only A uses SOK.
Initially, the interface is shut and the base timeout is short.
TBLK(0,((2,hostno),(2,key));RECEPF ==> c;errlog) "Start"
Errlog is a byte stream producer which will deliver error messages. See the listing of the Tymnet adapter for the format of these messages.
Data from errlog should be consumed promptly.
RECEPF is a key which will be called as follows for each circuit that is built to the base:
CO(0,(4,soklim);SIK,SOK,CCK) (this is a fork)
These calls should be prompt.
Return codes:
1 <= c <= 255: The circuit could not be built, and c is the error code from the supervisor. Known error codes are:
2 username not in MUD
3 MUD unreadable due to disk error
4 Other (including destination host down, destination host cannot be reached through the network, circuits busy, initiating or destination host out of ports, destination host is shut and username does not have shut override, username not valid on destination host, etc.)
5 error related to dialout request
6 timeout
7 access not permitted or (for Lemcom) ISIS unable to complete request
8 Tymnet base has reached limit of circuits it can build. (i.e. out of origination ports)
The normal way for such a circuit to disappear is for the host to reply with a circuit zapper. But we were using long base timeouts and the host wasn't there. When Gnosis restarted it had no knowledge of the circuit fragments. If zappers did arrive in the host after the restart the host presumably ignored them because it believed that there were no circuits for those channels. The base code does not zap those circuit fragments upon host reset because that was once observed to crash the ISIS system {dispatcher}.
The solution for now (until the base code is fixed) is to ask Network operations to reset that base slot. See (p3,isis-slot).
257: There is already a domain trying to build a circuit.
258: The attempt to build a circuit was terminated by a network supervisor reset or interface reset.
This operation is needed for the case when Tymnet thinks there is no circuit (so no zapper can be sent from the other end) but for some reason Gnosis thinks there is.
This operation sets the base timeout to 32 seconds if timeout is 1, 4096 seconds if it is 0.
Return codes are the same as for Build Aux Circuit.
Configuration Rules:
One Tymnet engine can support several slots limited by load and memory requirements.
One Tymnet engine cannot have more than one slot serving the same host number.
The fact that we are running on 3 engines gives us reliability. Using two host numbers is bad because we must arbitrarily segregate our customers. This isn't really much of a problem however.
All of these considerations leave unanswered the question of our costs. We need the answers to the following questions:
How much does an ISIS slot cost plus the Lemcom hardware?
How much does it cost to move a character thru Tymnet?
How much does it cost to keep a circuit for a unit of time including the access port and access phone?
GETCIRCUITC(0,(sl,tymnetid); ==> c;GETCIRCUIT)
"sl" is the length of the string "tymnetid" and must be between 1 and 12, tymnetid is in EBCDIC.
c = 4 Tymnet id all blanks
GETCIRCUITCPW(0,((2,sl),(sl,tymnetid),(2,pwl), (pwl,password),sn); ==> c;GETCIRCUIT)
"sl" is the length of the string "tymnetid" and must be between 1 and 12, tymnetid is in ASCII. (pwl,password) is the ASCII password required by the network supervisor.
Note that this function can be implemented in a Gnosis system whose base lacks "aux circuit license".
An essential difference is that such a getcircuit object must be replaced when a password is changed!
GETCIRCUIT(sysno; ==> c,(4,limit);SIK,SOK,CCK)
The USERNAME is fixed by the System Administrator when the GETCIRCUIT key is obtained from GETCIRCUITC.
SIK,SOK, and CCK are the circuit keys {(tymnet)}. Limit is the largest string accepted by SOK.
Return codes.
c=513 internal error
c=514 no TBLK key in system
GETCIRCUIT(kt+4; ==> 0)