Important: The information in this document is obsolete and should not be used for new development.
The Port Structure
Open Transport uses a port structure to describe a port's characteristics, such as its port name, its child ports, whether it is active or disabled, whether it is private or shareable, and the kind of framing it can use.The port structure is defined by the
OTPortRecord
data type.
struct OTPortRecord { OTPortRef fRef; UInt32 fPortFlags; UInt32 fInfoFlags; UInt32 fCapabilities; size_t fNumChildPorts; OTPortRef* fChildPorts; char fPortName[kMaxProviderNameSize]; char fModuleName[kMaxModuleNameSize]; char fSlotID[kMaxSlotIDSize]; char fResourceInfo[kMaxResourceInfoSize]; char fReserved[164]; }; typedef struct OTPortRecord OTPortRecord;
Field Description
fRef
- The port reference; a 32-bit value encoding the port's device type, bus type, slot number, and multiport identifier. For more details, see.
fPortFlags
- Flags describing the port's status. If no bits are set, the port is currently inactive--that is, it is not in use at this time.
fInfoFlags
- Flags providing additional information about the port.
fCapabilities
- Flags indicating the type of framing capability that a port has. If the port can handle only one type of framing, this field is 0. This field is dependent on the ports device type. For example, Ethernet framing uses the following values:
fNumChildPorts
- The number of child ports associated with this port.
fChildPorts
- An array of the port references for the child ports associated with this port. When you get a Port Record, this pointer typically points into the SReserved field at the end of the record.
fPortName
- A unique name for this port. The port name is a zero-terminated string that can have a maximum length as indicated by the constant
kMaxProviderNameSize
.fModuleName
- The name of the actual STREAMS module that implements the driver for this port. Open Transport uses this name internally; applications rarely need to use this name.
fSlotID
- An 8-byte identifier for a port's slot that contains a 7-byte character string plus a zero for termination. This identifier is typically available only for PCI cards.
fResourceInfo
- A zero-terminated string that describes a shared library that can handle configuration information for the device. This field contains an identifier that allows Open Transport to access auxiliary information about the driver (Open Transport creates shared library IDs from this string to be able to find these extra shared libraries). This string should either be unique to the driver or should be set to a
NULL
string.fReserved
- Reserved.