Important: The information in this document is obsolete and should not be used for new development.
The Port Reference
Several Open Transport port information functions take as a parameter a pointer to a port reference, which is a 32-bit value that contains a port's device and bus type, its slot number, and information to distinguish among several devices on a single slot. The actual structure of the port reference is private.The port reference is defined by the
OTPortRefdata type.
typedef UInt32 OTPortRef;You can use theOTCreatePortReffunction to create a port reference and obtain a pointer to it. The port reference is also a field in the port structure returned by the port information functions:OTGetIndexedPort,OTFindPort, andOTFindPortByRef. To extract information from the port reference, you need to use the functionsOTGetDeviceTypeFromPortRef,OTGetBusTypeFromPortRef, andOTGetSlotFromPortRef.This section lists the possible values for the device type and bus type.
Possible hardware device types are given in the following enumeration:
- IMPORTANT
 - Do not arbitrarily add new device types. Please contact Developer Support at Apple Computer, Inc. to obtain a new, unique device type.
 ![]()
enum { kOTNoDeviceType = 0, kOTADEVDevice = 1, kOTMDEVDevice = 2, kOTLocalTalkDevice = 3, kOTIRTalkDevice = 4, kOTTokenRingDevice = 5, kOTISDNDevice = 6, kOTATMDevice = 7, kOTSMDSDevice = 8, kOTSerialDevice = 9, kOTEthernetDevice = 10, kOTSLIPDevice = 11, kOTPPPDevice = 12, kOTModemDevice = 13, kOTFastEthernetDevice = 14, kOTFDDIDevice = 15, kOTIrDADevice = 16, kOTATMSNAPDevice = 17, kOTFibreChannelDevice = 18, kOTFireWireDevice = 19, kOTPseudoDevice = 1023, kOTLastDeviceIndex = 1022, kOTLastSlotNumber = 255, kOTLastOtherNumber = 255 };Constant descriptions
Possible bus types are described in"Bus Type Constants".
kOTNoDeviceType- The port's device type is not specified. This value is illegal.
 kOTADEVDevice- The port is specified as an
 'adev'device, which is a pseudodevice used by AppleTalk.kOTMDEVDevice- The port is specified as an
 'mdev'device, which is a pseudodevice used by TCP.kOTLocalTalkDevice- The port is specified as a LocalTalk device.
 kOTIRTalkDevice- The port is specified as an IRTalk device.
 kOTTokenRingDevice- The port is specified as a token ring device.
 kOTISDNDevice- The port is specified as an ISDN device.
 kOTATMDevice- The port is specified as an ATM device.
 kOTSMDSDevice- The port is specified as a SMDS device.
 kOTSerialDevice- The port is specified as a serial device.
 kOTEthernetDevice- The port is specified as an Ethernet device.
 kOTSLIPDevice- The port is specified as a SLIP pseudodevice.
 kOTPPPDevice- The port is specified as a PPP pseudodevice.
 kOTModemDevice- The port is specified as a modem pseudodevice.
 kOTFastEthernetDevice- The port is specified as an 100 MB Ethernet device.
 kOTFDDIDevice- The port is specified as a FDDI device.
 kOTIrDADevice- The port is specified as an IrDA Infrared device.
 kOTATMSNAPDevice- The port is specified as an ATM pseudodevice simulating a SNAP device.
 kOTFibreChannelDevice- The port is specified as a Fibre Channel device.
 kOTFireWireDevice- The port is specified as a Firewire device.
 kOTPseudoDevice- The port is designated as a pseudodevice.
 kOTLastDeviceIndex- The maximum device types that a port can use.
 kOTLastSlotNumber- The highest physical slot number a port can use. See "OTCreatePortRef" for more information.
 kOTLastOtherNumber- The maximum number of ports a single slot can support. See "OTCreatePortRef" for more information.