From bilbo@bagsend.aworld.de Thu May 27 10:13:06 1993
Received: by cbmvax.cbm.commodore.com
	(5.57/UUCP-Project/Commodore - Server Version 01/25/93)
	id AA09880; Thu, 27 May 93 05:06:30 EDT
Received: by cbmehq.esco.so.commodore.com; Thu, 27 May 1993 10:20 MET
Received: by cbmger.de.so.commodore.com; Thu, 27 May 1993 02:21 MET
Received: by caty.north.de (V1.16/Amiga)
	id AA01ovq; Thu, 27 May 93 01:42:54 CES
Received: by aworld-2.aworld.de (V1.8/Amiga)
	id CL2C0463EE; 0  8550 00:93:00 CET
Received: by bagsend.aworld.de (V1.16/Amiga)
	id AA0025n; Wed, 26 May 93 19:32:30 CET
Date: Wed, 26 May 93 19:32:30 CET
Message-Id: <9305261832.AA0025m@bagsend.aworld.de>
From: bilbo@bagsend.aworld.de (Michael Balzer)
To: gregm@cbmvax.cbm.commodore.com
Subject: SANA2 ID: PLIP
Content-Type: text
Content-Length: 3305
Status: RO
X-Status: 

#define S2WireType_PLIP                 420

Request for Networking Hardware Type: PLIP (Parallel Line IP)

Company Name: Oliver Wagner & Michael Balzer (private)
If a company is needed: B&B Computersysteme (Balzer & Broeking) (ECG200)

Short Product Description: PLIP is a SANA2 link protocol for two Amigas
connected by their parallel ports.

If applicable, manufacturer/product numbers: -

        Manufacturer Number:

        Product Number:

If the above was not applicable, describe how the product connects to the
Amiga: PLIP is a software solution, all needed hardware is a parallel
cable (description of the cable is in the documentation).

Hardware Network Addresses:

        If applicable, length (in bits) of hardware network
        address: 1

        If applicable, is the hardware address programmable?
           No, set according to unit no.

        If applicable, are the network addresses guaranteed to be entirely
        unique?
           Only two stations (link) (up to now)

Is the interface operation defined in a publicly available
standard? No.

If not, please include a short description of operation.  (This is not
a requirement, but is strongly advised.)

Cable: Connect

 D0-D7/BUSY/POUT   to   D0-D7/BUSY/POUT
 ACK               to   STROBE
 STROBE            to   ACK
 GND               to   GND

PLIP uses sort of a client/server concept.  The server station opens
plip.device unit 0, the client station opens plip.device unit 1.  Data
transfer direction is controlled by the server in the following way:

The server drives the BUSY line, the client the POUT line.  If one of these
handshake lines carries a logical 1 signal, the corresponding station owns
the bus and may write.  If the bus is busy, write requests will be queued
and repeated later (the delay amount depends on the station being client or
server).

When a station gets the bus, it will remember the status of the input
handshake line, write the first byte and then wait for the receiver to
toggle the input handshake line. Each time the receiver toggles the line,
the sender will send one byte. The first byte of a transfer triggers an
interrupt on the receiver side, which causes the receive procedure to read
the packet by toggling the output handshake line and reading the data from
the port.

So the protocol won't eat any cpu cycles except when transferring data,
also the speed of the transfer is under control of receiver to prevent data
loss with slow machines.

After completion of a transfer, the handshake lines will be restored and
both stations go into standby mode again.

A PLIP transfer packet has the following structure:

struct sendframe {
	long sync;
	short size;
	unsigned short crc;
	long pkt;
	unsigned char data[8192];
};

PLIP does a CRC16 check over the data and conforms to the SANA2 standard.
On S2_DEVICEQUERY, it returns AddrFieldSize = 1, MTU = 8192, BPS = 25000
and HardwareType = 420 (currently).

The BPS rate is not accurate, PLIP between an A4000 and an A2000/030 offers
a DOS speed of up to 45 kB/sec with Envoy 37.110.

Oliver Wagner & Michael Balzer
--
Michael Balzer,  Wildermuthstrasse 18,  W-5828 Ennepetal 14, GERMANY
At work: balzer@heike.informatik.uni-dortmund.de             // Pure
At home: bilbo@bagsend.aworld.de  Voice: +49 2333 80908    \X/ Amiga

