Important: The information in this document is obsolete and should not be used for new development.
The Parameter Block for Ethernet, Token Ring, and FDDI Driver Functions
All of the driver functions--EAttachPH,EDetachPH
, EWrite,ERead
, ERdCancel,EGetInfo
, ESetGeneral, EAddMulti,EDelMulti
--require a pointer to an ENET parameter block of typeEParamBlock
.This section defines the fields that are common to all of the driver functions that use the ENET parameter block. The ENET parameter block contains reserved fields that are used internally by the .ENET driver; these fields are not described. The fields that are used
for specific functions only are defined in the descriptions of the functions to which
they apply.
TYPE EParamBlock = PACKED RECORD qLink: QElemPtr; {reserved} qType: Integer; {reserved} ioTrap: Integer; {reserved} ioCmdAddr: Ptr; {reserved} ioCompletion: ProcPtr; {completion routine} ioResult: OSErr; {result code} ioNamePtr: StringPtr; {reserved} ioVRefNum: Integer; {reserved} ioRefNum: Integer; {driver reference number} csCode: Integer; {primary command code} CASE Integer OF ENetWrite, ENetAttachPH, ENetDetachPH, ENetRead, ENetRdCancel,ENetGetInfo,ENetSetGeneral: (eProtType: Integer; {Ethernet protocol type} ePointer: Ptr; {pointer; use depends on function} eBuffSize: Integer; {buffer size} eDataSize: Integer); {number of bytes read} ENetAddMulti,ENetDelMulti: (eMultiAddr: ARRAY[0..5] OF Char;) {multicast address} END;
Field Description
ioCompletion
- A pointer to a completion routine that you can provide. When you execute a function asynchronously, the system calls your completion routine when it completes execution of the function. Specify
NIL
for this field if you do not wish to provide a completion routine.ioResult
- The result of the function. If you call the function asynchronously, the function sets this field to 1 as soon as it begins execution,
and it changes the field to the actual result code when it
completes execution.ioRefNum
- The driver reference number that the
OpenDriver
function or theOpenSlot
function returns.csCode
- A routine selector for the function to be executed. Each function has a unique routine selector. The MPW interface automatically sets this value for you.