[comp.unix.questions] Getting UUCP to work over 'RAW' TCP-IP

mje@olsa99.UUCP (Mark J Elkins) (08/27/90)

I GOT IT WORKING!!!

Firstly - thanks to Bill Fuller (fuller@kadsma.kodak.com) and Jeromy
Druker (jsd@proxima.UUCP) ..  who understood the problem and were able
to make some suggestions.

Others replied - either presuming I wanted 'UUCP over Streams' or even
more - wanting to know how to do it..

My _new_ Systems entry....

xp5 Any TCP Any 23 in:--in: secret word: secret

My 'xp5' is an SCO 386 machine with SCO's TCP-IP - so I do not have a
'uucpd' to run.  The '23' is the ethernet (telnet) port No.  (where
the phone number normally goes - sorta logical hey?).  The source does
an 'atoi' on this field - which is why the original entry of 'xp5'
kept comming up with port 5!  If this field is blank (ie a '-') or the
name has no number in it ('atoi' returns Zero, Ouch!), then the source
does a 'getservbyname("uucp","tcp")' which sets the port number to
whatever is in your '/etc/services' file.  eg....

uucp		540/tcp		uucpd		# experimental

The information in Devices is almost totally ignored - ie..  as long
as the first, second and last fields are 'TCP' - it seems to work...

BUT...  although the code in 'callers.c' seemed OK..  I then got the
error 'interface(TCP) failed'.  This is because someone has removed
all the references to 'TCP' in 'interface.c'.  I then added...

#ifdef TCP
			/* TCP bits - put in by MJE */
		{ "TCP", read, write, ioctl, usetup, uteardown },
#endif /* TCP */

between the entries for DIAL201 and TLI... so that the TCP builtin would
use the default read/write routines... and now everything seems to work...

chdir(/usr/spool/uucp/xp5)
conn(xp5)
Device Type TCP wanted
Internal caller type TCP
tcpdial host xp5, port 23
family: 2
port: 23
addr: c8010105
set interface TCP
processdev: calling setdevcfg(uucico, TCP)
getto ret 5
chat: TCGETA failed, errno 114
expect: (in:)
{^A{^C^M^J^M^JSystem V.2.3.2 UNIX (xp5)^M^J^M^@^M^J^M^@login:got it
sendthem (secret^M)
expect: (word:)
 secret^M^JPassword:got it
sendthem (secret^M)
imsg >^M^J^PShere=xp5^@Login Successful: System=xp5
omsg "Solsa99 -Q0 -x9"
imsg >^PROK^@msg-ROK
 Rmtname xp5, Role MASTER,  Ifn - 5, Loginuser - root
rmesg - 'P' imsg >^PPg^@got Pg

The only 'BUG' is that certain 'ioctl's fail... eg the line...
chat: TCGETA failed, errno 114

I'm using the usual 'g' proto - because SCO doesn't know about
anything else (till I re-compile uucico for it!)


Some questions remain....

1 - Why was I told to have a Device entry of 'TCP TCP 64 uucp TCP' ?

2 - What does 'uucpd' do?  (when you can use port 23 and 'telnetd' -
    which gives login/passwd protection...)

3 - What happened to the TCP references in 'interface.c'?

-- 
  .  .     ___. .__      Olivetti Systems & Networks, Unix Support - Africa
 /| /|       / /__       UUCP: {uunet,olgb1,olnl1}!olsa99!mje (Mark Elkins)
/ |/ |ARK \_/ /__ LKINS  mje@olsa99.UUCP (Postmaster) Tel: +27 11 339 9093