[comp.protocols.tcp-ip.ibmpc] Standard Networking Interface - How We did it

dennis@rlgvax.UUCP (Dennis.Bednar) (11/13/87)

In article <8711082334.aa00326@Louie.UDEL.EDU>, dzoey@TERMINUS.UMD.EDU writes:
> 
> I am curious as to what other "standard" networking interfaces look like.
> How does Sys5 handle the network with their streams concept?  What other
> networking interfaces are around?  

Here at CCI, when Rick Adams was working here 3 years ago, we had
the problem of supporting 4.2BSD TCP/IP for the VAX, and the UNET code
from 3com for a CCI power 5/20 running System 3.  The interface
to the network software was different, and so Rick came up with a "common
library interface" that allowed applications to be written one way
regardless of whether they ran under 4.2 TCP/IP or UNET TCP/IP:

	tcpinit()	on 4.2 it did some initialization to do the
			auto-forking upon completion of the passive tcpopen
			later (ie the child process receives the open
			fd to to the network file transfer, while the
			parent process goes back to waiting for a
			new incoming connection).  If I remember
			correctly, on UNET, it did nothing.
	tcpopen()	modelled to match the UNET style of call.
			You pass the host name you want to connect to,
			the remote TCP port number (which identifies
			the service, such as FTP, Telnet, etc.),
			a local TCP port number (for an active
			connection this was 0 which chose an unused
			number, for a passive connection, this identfied
			the service), a remote TCP port number (similar
			to the local TCP port number), and a constant
			which said either TO_ACTIVE or TO_PASSIVE.
			Tcpopen returned -1 error, or the raw file
			descriptor to do the i/o.
	read/write	same on both machines, same as UNIX.
	tcpclose()	both were basically a close().

There was never a need for any application to do anything fancy
like the URGENT you mentioned.

Later, we ported the library package to work with the same interface
to the Excelan ethernet card I mentioned in an earlier article, with
no problems (other than No Software Interface documentation - we
winged it by running nm on their libsocket.a, and noting how
similar the public entry points were similar to some of the
Berkeley routines [rhosts comes to mind]).
-- 
FullName:	Dennis Bednar
UUCP:		{uunet|sundc}!rlgvax!dennis
USMail:		CCI; 11490 Commerce Park Dr.; Reston VA 22091
Telephone:	+1 703 648 3300