[comp.protocols.tcp-ip.ibmpc] interfacing to packet drivers

ccdw@quagga.ru.ac.za (Dave Wilson) (12/03/90)

I've been doing some work on interfacing to the WD8003 packet driver, using
the information in the version 1.09 packet driver spec.  I have been able to
get most of the calls to the packet driver to work, with the exception of  
'send_pkt'.  The pd spec is not clear on how much information must be given
to the pd - do I need to supply the complete Ethernet frame, including
preamble, Ethernet addresses, and CRC?  If so, can anyone tell me what the 
preamble value should be?  The available documentation conflicts on this
point.  I would also be grateful for information on any other problems that
may trip me up.  Thanks for any and all assistance.

-- 
Dave Wilson                   |  Internet: ccdw.quagga@f4.n494.z5.fidonet.org
Systems Programmer, Rhodes U. | UniNet-ZA: ccdw@quagga
Voice: (0461)22023 x284       |      UUCP: ..{m2xenix,ucthpx}!quagga!ccdw

jbvb@FTP.COM ("James B. Van Bokkelen") (12/06/90)

    ... The pd spec is not clear on how much information must be given
    to the pd - do I need to supply the complete Ethernet frame, including
    preamble, Ethernet addresses, and CRC?

V1.09 of the spec says "The application must supply the entire packet,
including local network headers.".  It doesn't attempt to explain all
the details for each kind of media (since their approaches to headers
vary quite a bit).  V1.10 (not published yet) has appendices which
outline the characteristics of each media Class (and nobody has yet told me
the characteristics of Classes 8, 9, 10, 12 and 15, for which I believe
drivers exist).  Here's the text on Class 1 from 1.10:

  Class 1 is demultiplexed by the 'ethertype', a 16-bit value
  (MSB first) transmitted as the thirteenth and fourteenth bytes of a
  frame.  @i[typelen] is normally 2.  The maximum @i[length] allowed by
  @i[send_pkt()] is 1514, being 1500 bytes of data preceded by the 14-byte MAC
  header (source address, destination address, ethertype).  The minimum
  "look-ahead buffer" length allowed is 60 bytes.

I think that long ago, in the stone (3Mb) age, there may have been Ethernet
interfaces that made the program generate the preamble/postamble.  I know
that the practice of making the poor programmer do the CRC survived longer,
but you can't buy anything like that these days unless you go to a computer
salvage place...

James B. VanBokkelen		26 Princess St., Wakefield, MA  01880
FTP Software Inc.		voice: (617) 246-0900  fax: (617) 246-0901

romkey@ASYLUM.SF.CA.US (John Romkey) (12/06/90)

No. Just provide the ethernet packet starting at the first byte of the
MAC header (the first byte of the destination address) and ending with
the last byte of the ethernet packet's data. It would be absurd for
the application to have to provide preamble and CRC, but it's
necessary to provide ethernet addresses, otherwise how do you control
where the packet is sent?

Two things I don't remember: you may have to be sure that the packet
is at least the length of the minimum ethernet packet size (60 bytes
or so), and you may have to make sure your source ethernet address is
set because not all ethernet chips/boards set it for you. The spec
doesn't say anything about this.
		- john romkey			Epilogue Technology
USENET/UUCP/Internet:  romkey@asylum.sf.ca.us	FAX: 415 594-1141

fks@FTP.COM (Frances Selkirk) (12/06/90)

You can ignore the preamble and CRC. These are a function of the hardware
layer. You should be dealing with source address, destination address, type
and data, only.



Frances Kirk Selkirk		 info@ftp.com	           (617) 246-0900
FTP Software, Inc.		 26 Princess Street, Wakefield, MA  01880

nelson@sun.soe.clarkson.edu (Russ Nelson) (12/06/90)

In article <1990Dec3.083313.7039@quagga.ru.ac.za> ccdw@quagga.ru.ac.za (Dave Wilson) writes:

   I have been able to get most of the calls to the packet driver to
   work, with the exception of 'send_pkt'.  The pd spec is not clear
   on how much information must be given to the pd - do I need to
   supply the complete Ethernet frame, including preamble, Ethernet
   addresses, and CRC?

You don't need the preamble, nor the CRC.  Start right off with the
Ethernet addresses, the type code word, etc.  So, if you wanted to
send a completely empty packet, you would set the count to 14 (2*6
bytes address + 2 bytes type code).

--
--russ (nelson@clutx [.bitnet | .clarkson.edu])  FAX 315-268-7600
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.