home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
142.lha
/
DNet
/
doc
/
source.doc
< prev
next >
Wrap
Text File
|
1986-11-21
|
3KB
|
86 lines
SOURCE ORGANIZATION
UNIX/AMIGA DIFFERENCES:
Essentially rewritten between the two, but major modules still do
the same thing. The only major difference in the protocol is that
the intermediate level SCMD_EOF is not implemented on the UNIX side.
CONTROL RECEIVE STAGE DECODE: Decode incomming packets providing
packet level commands (PKCMD), then demux PKCMD_WRITE
packets that are ready in order and execute corresponding
SCMD_???? commands
TRANSMIT STAGE ENCODE: Encode data queued by various
channels into packets, First by multiplexing SCMD_????
commands queued on TxList, then by generating PKCMD_???
packets.
PKCMD packets: WRITE windowed DATA packet
CHECK Did window X make it over there?
(get ACK or NAK response)
ACK ACK a window
NAK NAK a window
RESTART RESTART DNET
ACKRSTART Acknowledge a restart
SCMD packets: SWITCH switch channel # (multiplexer)
for DATA packets
OPEN open a new connection (contains
the channel to use)
CLOSE close a connection (channel)
ACKCMD acknowledge an OPEN. Responses
are (a) channel in use, try a
different channel
(b) channel now open
(c) port does not exist
EOFCMD EOF on channel without closing
it (not supported by UNIX end)
QUIT Cause DNET server to exit when
received
DATA DATA destined for some channel.
for efficiency, this type of
packet can be one of several
formats. The simplest format
is a one byte length and N bytes
of data.
MULTIPLEXED PROTOCOL BASIS:
All SCMD_???? commands are based on a CHANNEL #, which is separate
from the PORT # (used only when openning a new connection). The
channel number is the multiplexer channel for a connection, and
allocated internally by the protocol. A PORT # is a virtual rendezvous
place for new connections. Most SCMD commands except SCMD_DATA have
some sort of channel id. The only possibility of channel allocation
collision occurs in SCMD_OPEN (if both ends allocate the same channel
at the same time), in which case the receiver can send a SCMD_ACKCMD
with a 'retry' error code. Channel allocation is based on a random
number generator.
PRIORITY:
Each channel has an associated priority. The priority determines
the packet size in a relative manner (that is, a channel with
priority -127 is no faster than a channel with +126 when it is the only
thing running). (Note: -128 and 127 cannot be used due to an
optimization I made on the UNIX end).
Please use priorities near to 0 whenever possible.
The physical packet size is reduced when both a high priority and
a low priority channel is active at the same time. Otherwise, there
would be a 30 second delay typing characters from a FTERM when a file
transfer is going on in the background. If you stop typing in the
FTERM you will notice the packet size (as per Rx and Tx l.e.d's on your
modem) slowly increases for the file transfer.
RESTART:
A restart sequence is begun whenever a DNET is started up. This
causes any current connections to be closed. This allows one to
restart a DNET (when the other end is left hanging).