[comp.dcom.lans] Need help writing 3COM 3C501 driver for PC-AT

ray@bcsaic.UUCP (Ray Allis) (01/07/88)

	Help!  I am trying to figure out how to write software for the
	3COM 3C501 ethernet interface card for IBM PC's.  Does anyone have
	any technical information on how this is done, and/or does anyone
	have the source for a driver that can be used as a model?  I am
	interested in how to properly use the DMA capabilities of the board
	it appears that is a fast but poorly documented feature.


-- 
Ray Allis
Boeing Computer Services, Boeing Aerospace Company Support Division
CSNET: ray@boeing.com
UUCP:  uw-june!bcsaic!ray

asjoshi@phoenix.Princeton.EDU (Amit S. Joshi) (01/08/88)

In article <3393@bcsaic.UUCP> you write:
>
>	Help!  I am trying to figure out how to write software for the
>	3COM 3C501 ethernet interface card for IBM PC's.  Does anyone have
>	any technical information on how this is done, and/or does anyone
>	have the source for a driver that can be used as a model?  I am
>	interested in how to properly use the DMA capabilities of the board
>	it appears that is a fast but poorly documented feature.
>
>
>-- 
>Ray Allis
>Boeing Computer Services, Boeing Aerospace Company Support Division
>CSNET: ray@boeing.com
>UUCP:  uw-june!bcsaic!ray

Hi,

There are a number of fairly complete implementations of TCP/IP for IBM
PC's (XT, AT also). Each of them have been written using various compilers
and various amounts of assembly code. I'll try and list a short list of them
here and try and give a note on them.

KA9Q : This is Phil Karn's implementation. It was originally written for
	Ham packet radio using Aztec C and 8088 assembly. It is one of the
	most complete TCP/IP implementations but only implements FTP and
	telnet. It has been ported to various architectures and various 
	compilers. The ones that I am aware of are: SYS V Unix, MSCv4.0,
	and Turbo C. I had ported it to Turbo C and my port has no assembly
	language at all. The MSCv4.0 requires MASMv3.0. Unless you want 
	prepackaged and precompiled standalone programs this is the 
	package I would reccomend - You get the entire source code free
	and there are enough hackers working on improving it. It is also
	very well written and easy to read and modify (it also has source
	code documentation !!). Implements servers and multiple connections.
	Closest thing to sockets and is completely interrupt driven.
	Contact: The original versions are available by anonymous FTP from
	louie.udel.edu (10.0.0.96 or 192.5.39.3). I can mail the Turbo C
	version. Drop me a request (see signature for address).

NASA: The people at NASA have written a Telnet package. I have not used it
	(I could not get thier compiled prograns to work). Also comes with
	source code for MSCv4.0, Lattice Cv2.1. It can also handle some other
	cards.(I don't have and extensive list here). It is supposed to
	have some of the best terminal emulation facilities: VT100, Ansi,
	Tektronix (4014?). Also can take graphic output and plot it using 
	an HP 7475 compatible plotter. Code seems readable. Plenty of 
	assembly code. 
	Contact: Order with a $20 fee from
	152 Computing Applications Building, 
	605 E. Springfield Ave.
	Champaign, Illinois 61820
	There is an anonymous FTP address but I seem to have misplaced it.

CMU/MIT: One of the original TCP/IP packages. MOST (not KA9Q and NASA) are
	TCP/IP packages (many commercial) are based on this set. Originally
	written at MIT on a VAX using a cross compiler. Was ported to MSCv4.0
	at CMU and some changes were made. One of the best set of standalone
	programs. Has a liberal amount of assembly code. I found it very hard
	to read and follow - I originally tried to port this to Turbo C but 
	gave up. It however has the best organization into libraries. I would
	choose this for standalone programs (iprint, telnet, tftp, ping). Lacks
	FTP.
	Contact: Drew Perkins at CMU. I think it can be got by anonymous FTP
	from : lancaster.andrew.cmu.edu (128.2.13.21).

All the above packages are for free. The following packages are commercial

FTP Software: Has a complete BSD compatible socket library, good set of
	standalone programs, programming libraries. Seemed (from the 
	literature) to be very thorough and complete. I would have bought
	this but for the fact that they do not support Turbo C and I don't
	have MSCv4.0 (or any version for that matter). Also Note I was told
	that they might support Turbo C for a long time before they came out
	and told me they wouldn't. Based on the CMU/MIT package (in fact at
	least one of the founders is from the original MIT team).
	Last I knew the price was >$400 for the standalone programs and
	>$1000 for the libraries. I don't think source code was available.
	Contact: try posting a message on comp.ibm.protocols.tcp.ip (?)
	I've seen posting there about the company. BYTE also has ads about
	the product. The company is located at Kendall Park, Boston.

I've heard that Wollogong (spelling?) has got libraries. I don't know about 
them.

Hope this helps. Each of the free pacakges comes with a 3COM driver but the
actual approach is quite different in each of the cases. I would recommend 
the KA9Q package as an excellent place to start. Most don't use DMA as they
claim to have found from experience that it is slower, but some contain the
code to use a DMA channel if you want to.






-- 
Amit Joshi	BITNET	|	Q3696@PUCC.BITNET
		USENET	| {seismo, rutgers}\!princeton\!phoenix\!asjoshi
"There's a pleasure in being mad... which none but madmen know!" - St.Dryden

guy@gorodish.Sun.COM (Guy Harris) (01/14/88)

> There are a number of fairly complete implementations of TCP/IP for IBM
> PC's (XT, AT also).

The glossy for the Sun PC-NFS Release 2.0 claims that it supports TCP and UDP,
which is probably true as NFS uses Sun RPC on top of UDP and TELNET, FTP,
"rsh", and "rcp" (which come with PC-NFS) use TCP.  It also claims that it
supports ICMP - I don't know what level of support is provided - ARP and RARP
(RARP client, one would presume).  I seem to remember a claim from somebody
here that it provides interfaces to TCP and UDP that users can use for
applications; they probably look like 4BSD socket calls, if they exist.  It
definitely provides an RPC/XDR implementation that applications can use.

The glossy also claims that it prvides FTP, a printer interface (which probably
permits a PC to spool to the 4.[23]BSD print spooler), and "rsh" and "rcp" in
some form.

According to the glossy, PC-NFS 2.0 includes drivers for the 3C501 as well as
the Ungermann-Bass NIC and the Micom-Interlan NI5010.

The glossy indicates that "Portions of the software in PC-NFS were derived from
Locus Computing Corporation's PC-Interface and MIT's PC-IP products"; I think
the redirector was what came from PC-Interface, and I presume that some or all
of the Internet protocol implementation came from PC-IP.

I don't know how much it costs.  I also don't know what C compiler was used or
what C compilers it interfaces with; I doubt that source is generally
available, so if somebody wants hints on how to talk to one of the PC Ethernet
cards it's probably the wrong place to look.
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com

cramer@optilink.UUCP (Clayton Cramer) (01/15/88)

> > There are a number of fairly complete implementations of TCP/IP for IBM
> > PC's (XT, AT also).
> 
> The glossy for the Sun PC-NFS Release 2.0 claims that it supports TCP and UDP,
> which is probably true as NFS uses Sun RPC on top of UDP and TELNET, FTP,
> "rsh", and "rcp" (which come with PC-NFS) use TCP.  It also claims that it
> supports ICMP - I don't know what level of support is provided - ARP and RARP
> (RARP client, one would presume).  I seem to remember a claim from somebody
> here that it provides interfaces to TCP and UDP that users can use for
> applications; they probably look like 4BSD socket calls, if they exist.  It
> definitely provides an RPC/XDR implementation that applications can use.
> 
> The glossy also claims that it prvides FTP, a printer interface (which probably
> permits a PC to spool to the 4.[23]BSD print spooler), and "rsh" and "rcp" in
> some form.
> 
> According to the glossy, PC-NFS 2.0 includes drivers for the 3C501 as well as
> the Ungermann-Bass NIC and the Micom-Interlan NI5010.
> 
> 	Guy Harris
> 	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy

We are using PC-NFS Release 2.0 here, and all the glossies are substantially
correct.  We've had a few problems, though to be fair, Sun Tech Support has
worked very hard to help us resolve the problems.  (Also, to be fair, we have
a truly unique arrangement -- two Ethernet legs off a Sun, then a gateway
from Ethernet to Appletalk).

One bug we've found with PC-NFS that is *truly subtle* is that we used the
DOS APPEND command in our AUTOEXEC.BAT files.  When we printed to the
network printer interface from Microsoft Word, then exited, our PCs would
lock up, requiring power off.

I suspect the bug is that PC-NFS is picking up a pointer to the PATH 
environment variable, and that APPEND moves the location of PATH after
APPEND has been executed.

Over all, PC-NFS has been pretty solid.

Clayton E. Cramer