[comp.sys.amiga] DNet on Sys V?

dan@ivucsb.UUCP (Dan Howell) (03/07/89)

How is the DNet port to Sys V coming along?  Apparently I can't use UW
or DNet with Sys V yet so I can't wait!

BTW, what is the DNet 2.0 Beta version?  Might that be a Sys V compatible
one?
-- 
-- Dan Howell  <ivucsb!dan@anise.acc.com>
--             <...!(pyramid|ucbvax)!ucsbcsl!nessus!ivucsb!dan>
-- * I think this is it!  My address should be relatively permanent now. *

mwills@x102a.harris-atd.com (wills ms 01309) (03/11/89)

Not to get your hopes up, but...

I finally got DNET up on our SYS V (+ Berkley extensions) system.  We
have several Harris HCX-9's running HCX/UX 3.0 with support for
Berkley IPC (inter-process communication, aka sockets).

After delving into the code and exchanging several email notes with
Matt, I found that mine is a problem in my SYS V C-Compiler,
manifested in the RS_CCHK (packet error checking) code on the UNIX
side.

The RS_CCHK problem is as follows: In the dnet/unix/dnet/control.c
do_rnet() function, the code (ubyte)(((SYNC<<1)^dctl)) evaluates to a
9 bit quantity which (obviously) fails on conparison with the 8-bit
check byte sent along in the incoming packet.  (I get a leading "1" on
each computation. e.g. 0x1fb instead of 0x0fb) The result is that I
got RS_CCHK failures on all incoming packets!  I changed the occurance
of the above to (ubyte)(((SYNC<<1)^dctl) & 0xff) and it started
working!  Apparently the ubyte type cast should truncate to 8 bits,
but the bit-wise "and" above accomplishes the same effect.

Grep reveils many more places where this operation is used and I've
only changed one.  The protocol did "hang" at one point.  I had about
3 fterms, and a loadav running and I tried a "putfiles".  Then all
windows hung (ceased activity) and I had to reset dnet.  This may be
attributable to instances requiring this fix.  While this is not
really a problem with the code, Matt has consented to change all
instances of the above appropriately.  (Thanks, Matt!!! |-)

Suppression of handshaking is accomplished with RAW mode (see tty(4))
on the UNIX side, but the Amiga preferences must have handshaking
turned off (XOFF/DTR/NONE -> NONE under WB 1.2) if DC1 and DC3
(XON/XOFF) should not be swallowed.  Also you should probably also
select 8 data bits, 1 stop bit, no parity.


--

					- Scott Wills
					mwills@x102a.harris-atd.com
					uunet!x102a!mwills