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 With Open Transport / Part 2 - Open Transport Reference
Chapter 26 - Ports Reference / Functions
Getting Information About Ports /


OTGetSlotFromPortRef

Extracts slot information from a port reference.

C INTERFACE
UInt16 OTGetSlotFromPortRef(OTPortRef ref, 
                                         UInt16* other);
C++ INTERFACE
None. C++ applications use the C interface to this function.

PARAMETERS
ref
The port reference from which you wish to extract the slot number.
other
A pointer to a 16-bit integer you provide into which the function places a value that distinguishes between ports when more than one hardware port is connected to a given slot (also called the multi-port identifier). Specify NULL for this parameter if you do not want the function to return this information.
function result
Possible return values are listed in "The Port Reference".
DISCUSSION
The OTGetSlotFromPortRef function extracts slot information from a port reference. You can obtain such a port reference using the OTGetIndexedPort function to access the port registry.

You can use the OTGetDeviceTypeFromPortRef function and the OTGetBusTypeFromPortRef function to get device type and bus type information from the port reference.

SPECIAL CONSIDERATIONS
In Open Transport port references, the slot numbers are physical slot numbers; that is, they are the slot numbers returned by the Slot Manager and not the slots seen in various network configuration applications. Physical slot numbers depend on the type of card installed. For example, NuBus cards number their slots 9-13, which appear in the AppleTalk or TCP control panels as slots 1-5.

SEE ALSO
"Obtaining Port Information".

The OTCreatePortRef function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998