Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking /
Chapter 11 - Ethernet, Token Ring, and Fiber Distributed Data Interface / Ethernet, Token Ring, and FDDI Reference
Data Structures


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 type EParamBlock.

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 the OpenSlot 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.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996