[comp.protocols.tcp-ip.ibmpc] But how do packet drivers actually work?

kinley@crim.ca (J. Darren Kinley) (04/09/91)

Hello,

I installed NCSA on a machine having a 3c501 ethernet card. Here is
what I put into my config.tel file. I don't remember how I got the
address value, but the software did work many months ago (and 
I expect that it still does).

> # For use by IBM PCs with a 3c501 ethernet card configured with:
> # dma chanel 1; interrupt level 3; and I/O base address 300 Hex.
> hardware=3c501                # network adapter board
> interrupt=3                   # hardware IRQ interrupt for 3C501 board
> address=d000                  # shared memory segment - 4 hex digits
> ioaddr=300                    # base address for I/O registers

Later, we purchased PC/TCP for a machine with a G/Ethernet card -
generic kernel version with the packet driver supplied by Gateway
Communications. At that time, I found out that packet drivers existed
and that they were a good thing. The supplied packet driver was
especially nice because I didn't have to give it any parameters and
somehow everything mysteriously worked!

(I would greatly appreciate if some kind sole could offer a brief
description of how applications send IP packets using packet drivers
and how received packets are handed back to the proper application.)


Now I am *trying* to install NCSA on both machines using packet drivers.


machine with 3c501 card;
  The driver tells me that I need 3 parameters;
  > packet_int_no int_no io_addr
  The int_no and io_addr are obvious, but where did packet_int_no
  come in and what exactly is it used for? (It would seem that in the
  case of the 3c501 card, the address parameter is not required, is
  this correct?) These parameters should be card specific information
  (?). What do I tell the NCSA application? Must I simply tell it to
  use that packet driver interface with 'hardware=packet'?

machine with the G/Ethernet card;
  When installing PC/TCP this driver seemed to configure itself.
  Again, what do I have to tell NCSA in order for it to be able 
  to talk to the packet driver?

nelson@sun.soe.clarkson.edu (Russ Nelson) (04/09/91)

In article <1991Apr8.181920.15868@IRO.UMontreal.CA> kinley@crim.ca (J. Darren Kinley) writes:

   (I would greatly appreciate if some kind soul could offer a brief
   description of how applications send IP packets using packet drivers
   and how received packets are handed back to the proper application.)

It works *mostly* like this:

Applications make up the packet, and pass its address to the packet
driver along with the "send packet" function call.  Received packets
are handed back via an upcall.  The application registers the packet
types it wishes to receive (e.g. IP, ARP, IPX, etc.), along with an
upcall handler.  When the packet is received, the upcall handler is
called with the address of the packet.

   machine with 3c501 card;
     The driver tells me that I need 3 parameters;
     > packet_int_no int_no io_addr
     The int_no and io_addr are obvious, but where did packet_int_no
     come in and what exactly is it used for?

That's the software interrupt that applications generate to access the
packet driver.  It should be between 60 hex and 80 hex, according to the
1.09 spec.

     What do I tell the NCSA application? Must I simply tell it to
     use that packet driver interface with 'hardware=packet'?

Yes.  It will search through the interrupts for the signature of the
packet driver.

--
--russ <nelson@clutx.clarkson.edu> I'm proud to be a humble Quaker.
It's better to get mugged than to live a life of fear -- Freeman Dyson
I joined the League for Programming Freedom, and I hope you'll join too.