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
Routines / Obtaining Information About the Ethernet Driver and Switching Its Mode


EGetInfo

The EGetInfo function returns information about the .ENET driver.
FUNCTION EGetInfo (thePBptr: EParamBlkPtr; 
                  async: Boolean): OSErr;
thePBptr
A pointer to a parameter block of type EParamBlock.
async
A Boolean value that specifies whether the function should be
executed asynchronously or synchronously. Specify TRUE for asynchronous execution.
-->ioCompletionProcPtrA pointer to completion routine.
<--ioResultOSErrThe result code.
-->ioRefNumIntegerThe driver reference number.
-->csCodeIntegerAlways ENetGetInfo for this function.
-->ePointerPtrA pointer to a buffer.
-->eBuffSizeIntegerThe size of the buffer.
<--eDataSizeIntegerThe number of bytes returned.

Field Description
ePointer
A pointer to a buffer that is at least 18 bytes in size. The
EGetInfo function returns the information about the
.ENET driver in this buffer.
eBuffSize
The size of the buffer pointed to by ePointer.
eDataSize
The number of bytes of information that EGetInfo returns in
the buffer pointed to by ePointer.
DESCRIPTION
The EGetInfo function returns information about the .ENET driver. Beginning with version 58 of AppleTalk, the EGetInfo function returns additional information for SONIC-based network interface controllers (NICs). For these cards, EGetInfo can return up to 78 bytes of information. The eDataSize field returns the number of bytes of information that EGetInfo has placed in the data buffer that you provide. You can use the value returned in this field to determine whether or not the Ethernet card uses a SONIC chip. For all cards that are not SONIC based, this field will contain a value of 18.

If you do not know whether the Ethernet card that you are using has a SONIC chip, you should provide a data buffer that is at least 78 bytes in length. If you are certain that the Ethernet card that you are using is not SONIC based, you must provide a data buffer that is at least 18 bytes. Put a pointer to the buffer in the ePointer parameter and the size of the buffer in the eBuffSize parameter.

For Ethernet cards that are not SONIC based, the EGetInfo function places the following information in the data buffer:
BytesInformation
1-6Ethernet address of the node on which the driver is installed
7-10Number of times the receive queue has overflowed
11-14Number of data transmission operations that have timed out
15-18Number of packets received that contain an incorrect address

An incorrect Ethernet address is one that is neither the broadcast address, a multicast address for which this node is registered, nor the node's data-link address. A node could receive an incorrect Ethernet address due to a hardware or software error.

For SONIC-based Ethernet cards, the last 60 bytes in the buffer return information from the SONIC chip network statistic counters. The EGetInfo function places the following information in the data buffer:
BytesInformation
1-6Ethernet address of the node on which the driver is installed
7-10No information returned (zero-filled)
11-14No information returned (zero-filled)
15-18No information returned (zero-filled)
19-22Frames transmitted without error
23-26Single collision frames
27-30Multiple collision frames
31-34Collision frames
35-38Frames with deferred transmission
39-42Late collision
43-46Excessive collisions
47-50Excessive deferrals
51-54Internal MAC transmit error
55-58Frames received without error
59-62Multicast frames received without error
63-66Broadcast frames received without error
67-70Frame check sequence errors
71-74Alignment errors
75-78Frames lost due to internal MAC receive errors

TOKEN RING AND FDDI CONSIDERATIONS
This function does not apply to token ring and FDDI.

ASSEMBLY-LANGUAGE INFORMATION
To execute the EGetInfo function from assembly language, call the _Control trap macro with a value of ENetGetInfo in the csCode field of the parameter block.
To execute the _Control trap asynchronously, include the value ,ASYNC in the
operand field.

RESULT CODES
noErr0No error

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996