Macintosh OS Ethernet Driver
Macintosh OS Ethernet Driver
NuBus · PDF
| Filename | Macintosh_OS_Ethernet_Driver_19870518.pdf |
|---|---|
| Size | 0.30 MB |
| Subsection | apple / 670-0205_3Com_Ethernet |
| Downloads | 0 |
Contents
Macintosh OS Ethernet Driver
Design Specification Proposal
Alan B. Oppenheimer
May 18, 1987
The following is a proposal for a Macintosh Ethernet driver. It is envisioned to be
useable for any Ethernet implementation (card, SCSI device, etc.). The interface is
such that it should also be applicable to other networks (e.g. Token Ring) with little or
no changes. This proposal is for a general-purpose Ethernet driver, and does not
address the issue of Apple Talk protocols running on Ethernet hardware. It conforms to
IEEE 802.2 Type 1 service.
Macintosh network developers are familiar with the Apple Talk driver interface; this
interface is patterned directly after that. See the Apple Talk Manager chapter in volume
2 of Inside Macintosh for data structure details.
Opening the Ethernet ddyer: The Ethernet driver is opened through a device manager
Open call, indicating the slot (for a Mac II) in which the Ethernet card is installed. The
driver is initially opened in "Apple Talk" mode. In this mode, packets sent by the driver
are restricted to a maximum of 768 bytes. This is big enough to encapsulate AppleTalk
packets, and allows more of a shared buffer pool to be allocated for packet reception.
The driver can be changed to "general" mode, where it will transmit any valid Ethernet
packet, through a control call defined below.
The name of the Ethernet driver is '.ENEr.
Commands to the Ethernet driver: Commands to the Ethernet driver are specified by
means of Device Manager Control calls, with arguments passed in the queue element
starting at CSParam. The following is a list of commands:
EAttachPH: attach a "protocol handler" to the driver. Arguments are a two-byte protocol
type and a handler address. The handler will be called (see "protocol handlers"
below) when a packet of its type is received. If the protocol handler address is zero, a
"default" protocol handler will be supplied by the driver which will enable the caller to
issue standard read calls for that protocol type (see the ERead call).
Note: to attach (or detach) a handler for 802.3 (which use protocol types O through
$5DC), specify protocol type zero.
EDetachPH: detach (remove) the protocol handler for the given protocol type. All
pending reads are aborted with an error.
EWrite: write out a packet on the Ethernet. The only argument is a WDS (write data
structure) pointer. The WDS is a series of length/pointer pairs, terminated by a zero
length. The data is "gathered" from each of the WDS entries, in the order provided.
The first entry must start with the destination address (6 bytes for Ethernet), and then
contain 6 unused bytes (in the Ethernet case) followed by the two-byte protocol type
field. Data may then follow if desired.
Ethernet Driver - DRAFT
Apple Confidential
Page 1
If the total length of the packet is too big (greater than 1514 bytes if "general", or 768
bytes if "AppleTalk" mode) an error is returned. If the total length of the packet is too
small (less than 60 bytes for Ethe…
Showing first 3,000 characters of 7,348 total. Open the full document →