|
Mac OS 9
|
Open Transport client interface file. This contains all the client APIs. More...
Go to the source code of this file.
Data Structures | |
| struct | OTAddress |
| struct | OTScriptInfo |
| struct | TOptionHeader |
| struct | TOption |
| struct | t_kpalive |
| struct | t_linger |
| struct | TEndpointInfo |
| struct | OTPortRecord |
| struct | TNetbuf |
| struct | strbuf |
| struct | OTData |
| struct | OTBuffer |
| struct | OTBufferInfo |
| struct | TBind |
| struct | TDiscon |
| struct | TCall |
| struct | TUnitData |
| struct | TUDErr |
| struct | TOptMgmt |
| struct | TRequest |
| struct | TReply |
| struct | TUnitRequest |
| struct | TUnitReply |
| struct | TRegisterRequest |
| struct | TRegisterReply |
| struct | TLookupRequest |
| struct | TLookupReply |
| struct | TLookupBuffer |
| struct | OTLink |
| struct | OTLIFO |
| struct | OTList |
Macros | |
| #define | OTKERNEL 0 |
| #define | OTUNIXERRORS 0 |
| #define | OTDEBUG 0 |
| #define | OTCARBONAPPLICATION 0 |
| #define | _MDECL |
| #define | kOTLibraryVersion "1.1" |
| #define | kOTLibraryPrefix "OTLib$" |
| #define | kOTModulePrefix "OTModl$" |
| #define | kOTClientPrefix "OTClnt$" |
| #define | kOTKernelPrefix "OTKrnl$" |
| #define | OTOffsetOf(structure, field) ((ByteCount) & ((structure *)0)->field) |
| #define | kOTFatalErr "FB " |
| #define | kOTNonfatalErr "NB " |
| #define | kOTExtFatalErr "FX " |
| #define | kOTExtNonfatalErr "NX " |
| #define | kOTUserFatalErr "UF " |
| #define | kOTUserErr "UE " |
| #define | kOTUserNonfatalErr "UE " |
| #define | kOTInfoErr "IE " |
| #define | kOTInfoBreak "IN " |
| #define | OTDebugBreak(str) |
| #define | OTDebugTest(val, str) |
| #define | OTAssert(name, cond) |
| #define | OTDebugBreak2(str) |
| #define | OTDebugTest2(val, str) |
| #define | XTI2OSStatus(x) (-3149 - (x)) |
| #define | E2OSStatus(x) (-3199 - (x)) |
| #define | OSStatus2XTI(x) ((OTXTIErr)(-3149 - (x))) |
| #define | OSStatus2E(x) ((OTUnixErr)(-3199 - (x))) |
| #define | IsXTIError(x) ((x) < -3149 && (x) >= (-3149 - TLASTXTIERROR)) |
| #define | IsEError(x) ((x) < -3199 && (x) >= (-3199 - ELASTERRNO)) |
| #define | kOTInvalidRef 0L |
| #define | kOTInvalidProviderRef ((ProviderRef)0L) |
| #define | kOTInvalidEndpointRef ((EndpointRef)0L) |
| #define | kOTInvalidMapperRef ((MapperRef)0L) |
| #define | IsOTPrivateEvent(x) (((x) & 0x70000000L) == kPRIVATEEVENT) |
| #define | IsOTCompleteEvent(x) (((x) & 0x7f000000L) == kCOMPLETEEVENT) |
| #define | IsOTProtocolEvent(x) (((x) & 0x7f000000L) == kPROTOCOLEVENT) |
| #define | IsOTStreamEvent(x) (((x) & 0x7f000000L) == kSTREAMEVENT) |
| #define | IsOTSignalEvent(x) (((x) & 0x7f000000L) == kSIGNALEVENT) |
| #define | GetOTEventCode(x) (x) |
| #define | NewOTNotifyUPP(userRoutine) (userRoutine) |
| #define | DisposeOTNotifyUPP(userUPP) |
| #define | InvokeOTNotifyUPP(contextPtr, code, result, cookie, userUPP) (*userUPP)(contextPtr, code, result, cookie) |
| #define | MIOC_CMD(t, v) ((((t) & 0xFF) << 8) | ((v) & 0xFF)) |
| #define | kOTNoMemoryConfigurationPtr ((OTConfigurationRef)0L) |
| #define | kOTInvalidConfigurationPtr ((OTConfigurationRef)-1L) |
| #define | T_ALIGN(len) (((UInt32)(len) + (sizeof(SInt32) - 1)) & ~(sizeof(SInt32) - 1)) |
| #define | OPT_NEXTHDR(theBuffer, theBufLen, prevOption) |
| #define | OTCreateNuBusPortRef(devType, slot, other) OTCreatePortRef(kOTNuBus, devType, slot, other) |
| #define | OTCreatePCIPortRef(devType, slot, other) OTCreatePortRef(kOTPCIBus, devType, slot, other) |
| #define | OTCreatePCCardPortRef(devType, slot, other) OTCreatePortRef(kOTPCCardBus, devType, slot, other) |
| #define | OTInitBufferInfo(infoPtr, theBuffer) |
| #define | OTNextLookupBuffer(buf) |
| #define | NewOTProcessUPP(userRoutine) (userRoutine) |
| #define | DisposeOTProcessUPP(userUPP) |
| #define | InvokeOTProcessUPP(arg, userUPP) (*userUPP)(arg) |
| #define | OTIsNonBlocking(ref) (!OTIsBlocking(ref)) |
| #define | OTIsAsynchronous(ref) (!OTIsSynchronous(ref)) |
| #define | OTGetLinkObject(link, struc, field) ((struc *)((char *)(link)-OTOffsetOf(struc, field))) |
| #define | NewOTListSearchUPP(userRoutine) (userRoutine) |
| #define | DisposeOTListSearchUPP(userUPP) |
| #define | InvokeOTListSearchUPP(ref, linkToCheck, userUPP) (*userUPP)(ref, linkToCheck) |
| #define | OTClearLock(lockPtr) *(lockPtr) = 0 |
| #define | OTAcquireLock(lockPtr) (OTAtomicSetBit(lockPtr, 0) == 0) |
Typedefs | |
| typedef UInt8 | OTUInt8Param |
| typedef UInt16 | OTUInt16Param |
| typedef SInt16 | OTSInt16Param |
| typedef SInt8 | OTSInt8Param |
| typedef Boolean | OTBooleanParam |
| typedef unsigned int | OTByteCount |
| typedef unsigned int | OTItemCount |
| typedef int | OTInt32 |
| typedef unsigned int | OTUInt32 |
| typedef UInt32 | OTTimeout |
| typedef SInt32 | OTSequence |
| typedef SInt32 | OTNameID |
| typedef SInt32 | OTReason |
| typedef UInt32 | OTQLen |
| typedef UInt8 * | OTClientName |
| typedef SInt32 | OTCommand |
| typedef struct OpaqueOTClient * | OTClient |
| typedef UInt32 | OTOpenFlags |
| typedef UInt16 | OTUnixErr |
| typedef UInt16 | OTXTIErr |
| typedef SInt32 | OTResult |
| typedef UInt16 | OTAddressType |
| typedef struct OTAddress | OTAddress |
| typedef UInt32 | OTStructType |
| typedef UInt32 | OTFieldsType |
| typedef UInt32 | OTFlags |
| typedef UInt32 | OTBand |
| typedef void * | ProviderRef |
| typedef void * | EndpointRef |
| typedef void * | MapperRef |
| typedef UInt32 | OTEventCode |
| typedef OTEventCode | code |
| typedef OTEventCode OTResult | result |
| typedef OTEventCode OTResult void * | cookie |
| typedef UInt32 | OTXTILevel |
| typedef UInt32 | OTXTIName |
| typedef struct OTScriptInfo | OTScriptInfo |
| typedef UInt32 | OTXTIStates |
| typedef struct OTConfiguration * | OTConfigurationRef |
| typedef struct TOptionHeader | TOptionHeader |
| typedef struct TOption | TOption |
| typedef struct t_kpalive | t_kpalive |
| typedef struct t_linger | t_linger |
| typedef UInt32 | OTServiceType |
| typedef SInt32 | OTDataSize |
| typedef struct TEndpointInfo | TEndpointInfo |
| typedef UInt32 | OTPortRef |
| typedef OTPortRef * | OTPortRefPtr |
| typedef UInt8 | OTBusType |
| typedef UInt16 | OTDeviceType |
| typedef UInt16 | OTSlotNumber |
| typedef struct OTPortRecord | OTPortRecord |
| typedef struct TNetbuf | TNetbuf |
| typedef struct strbuf | strbuf |
| typedef struct OTData | OTData |
| typedef struct OTBuffer | OTBuffer |
| typedef struct OTBufferInfo | OTBufferInfo |
| typedef struct TBind | TBind |
| typedef struct TDiscon | TDiscon |
| typedef struct TCall | TCall |
| typedef struct TUnitData | TUnitData |
| typedef struct TUDErr | TUDErr |
| typedef struct TOptMgmt | TOptMgmt |
| typedef struct TRequest | TRequest |
| typedef struct TReply | TReply |
| typedef struct TUnitRequest | TUnitRequest |
| typedef struct TUnitReply | TUnitReply |
| typedef struct TRegisterRequest | TRegisterRequest |
| typedef struct TRegisterReply | TRegisterReply |
| typedef struct TLookupRequest | TLookupRequest |
| typedef struct TLookupReply | TLookupReply |
| typedef struct TLookupBuffer | TLookupBuffer |
| typedef struct OpaqueOTClientContextPtr * | OTClientContextPtr |
| typedef UInt32 | OTInitializationFlags |
| typedef long | OTDeferredTaskRef |
| typedef long | OTSystemTaskRef |
| typedef UnsignedWide | OTTimeStamp |
| typedef struct OTLink | OTLink |
| typedef struct OTLIFO | OTLIFO |
| typedef OTLink * | linkToCheck |
| typedef struct OTList | OTList |
| typedef UInt8 | OTLock |
Functions | |
| void | OTDebugStr (const char *str) |
| typedef | CALLBACK_API (void, OTNotifyProcPtr)(void *contextPtr |
| typedef | TVECTOR_UPP_TYPE (OTNotifyProcPtr) OTNotifyUPP |
| OTNotifyUPP | NewOTNotifyUPP (OTNotifyProcPtr userRoutine) |
| void | DisposeOTNotifyUPP (OTNotifyUPP userUPP) |
| void | InvokeOTNotifyUPP (void *contextPtr, OTEventCode code, OTResult result, void *cookie, OTNotifyUPP userUPP) |
| OTPortRef | OTCreatePortRef (OTBusType busType, OTDeviceType devType, OTSlotNumber slot, UInt16 other) |
| OTDeviceType | OTGetDeviceTypeFromPortRef (OTPortRef ref) |
| UInt16 | OTGetBusTypeFromPortRef (OTPortRef ref) |
| OTSlotNumber | OTGetSlotFromPortRef (OTPortRef ref, UInt16 *other) |
| OTPortRef | OTSetDeviceTypeInPortRef (OTPortRef ref, OTDeviceType devType) |
| OTPortRef | OTSetBusTypeInPortRef (OTPortRef ref, OTBusType busType) |
| Boolean | OTGetIndexedPort (OTPortRecord *portRecord, OTItemCount index) |
| Boolean | OTFindPort (OTPortRecord *portRecord, const char *portName) |
| Boolean | OTFindPortByRef (OTPortRecord *portRecord, OTPortRef ref) |
| OSStatus | OTRegisterPort (OTPortRecord *portRecord, void *ref) |
| OSStatus | OTUnregisterPort (const char *portName, void **ref) |
| OSStatus | OTChangePortState (OTPortRef portRef, OTEventCode theChange, OTResult why) |
| OSStatus | InitOpenTransportInContext (OTInitializationFlags flags, OTClientContextPtr *outClientContext) |
| void | CloseOpenTransportInContext (OTClientContextPtr clientContext) |
| OSStatus | InitOpenTransport (void) |
| OSStatus | InitOpenTransportUtilities (void) |
| void | CloseOpenTransport (void) |
| OSStatus | OTRegisterAsClient (OTClientName name, OTNotifyUPP proc) |
| OSStatus | OTUnregisterAsClient (void) |
| OSStatus | OTRegisterAsClientInContext (OTClientName name, OTNotifyUPP proc, OTClientContextPtr clientContext) |
| OSStatus | OTUnregisterAsClientInContext (OTClientContextPtr clientContext) |
| void | OTEnterInterrupt (void) |
| void | OTLeaveInterrupt (void) |
| Boolean | OTIsAtInterruptLevel (void) |
| Boolean | OTCanLoadLibraries (void) |
| typedef | CALLBACK_API (void, OTProcessProcPtr)(void *arg) |
| typedef | TVECTOR_UPP_TYPE (OTProcessProcPtr) OTProcessUPP |
| OTProcessUPP | NewOTProcessUPP (OTProcessProcPtr userRoutine) |
| void | DisposeOTProcessUPP (OTProcessUPP userUPP) |
| void | InvokeOTProcessUPP (void *arg, OTProcessUPP userUPP) |
| long | OTCreateDeferredTaskInContext (OTProcessUPP upp, void *arg, OTClientContextPtr clientContext) |
| OTDeferredTaskRef | OTCreateDeferredTask (OTProcessUPP proc, void *arg) |
| Boolean | OTScheduleDeferredTask (OTDeferredTaskRef dtCookie) |
| Boolean | OTScheduleInterruptTask (OTDeferredTaskRef dtCookie) |
| OSStatus | OTDestroyDeferredTask (OTDeferredTaskRef dtCookie) |
| OTSystemTaskRef | OTCreateSystemTask (OTProcessUPP proc, void *arg) |
| OSStatus | OTDestroySystemTask (OTSystemTaskRef stCookie) |
| Boolean | OTScheduleSystemTask (OTSystemTaskRef stCookie) |
| Boolean | OTCancelSystemTask (OTSystemTaskRef stCookie) |
| Boolean | OTCanMakeSyncCall (void) |
| OSStatus | OTAsyncOpenProvider (OTConfigurationRef cfig, OTOpenFlags flags, OTNotifyUPP proc, void *contextPtr) |
| ProviderRef | OTOpenProvider (OTConfigurationRef cfig, OTOpenFlags flags, OSStatus *errPtr) |
| OSStatus | OTCloseProvider (ProviderRef ref) |
| ProviderRef | OTTransferProviderOwnership (ProviderRef ref, OTClient prevOwner, OSStatus *errPtr) |
| OTClient | OTWhoAmI (void) |
| OTPortRef | OTGetProviderPortRef (ProviderRef ref) |
| SInt32 | OTIoctl (ProviderRef ref, UInt32 cmd, void *data) |
| OTResult | OTGetMessage (ProviderRef ref, strbuf *ctlbuf, strbuf *databuf, OTFlags *flagsPtr) |
| OTResult | OTGetPriorityMessage (ProviderRef ref, strbuf *ctlbuf, strbuf *databuf, OTBand *bandPtr, OTFlags *flagsPtr) |
| OSStatus | OTPutMessage (ProviderRef ref, const strbuf *ctlbuf, const strbuf *databuf, OTFlags flags) |
| OSStatus | OTPutPriorityMessage (ProviderRef ref, const strbuf *ctlbuf, const strbuf *databuf, OTBand band, OTFlags flags) |
| OSStatus | OTSetAsynchronous (ProviderRef ref) |
| OSStatus | OTSetSynchronous (ProviderRef ref) |
| Boolean | OTIsSynchronous (ProviderRef ref) |
| OSStatus | OTSetBlocking (ProviderRef ref) |
| OSStatus | OTSetNonBlocking (ProviderRef ref) |
| Boolean | OTIsBlocking (ProviderRef ref) |
| OSStatus | OTInstallNotifier (ProviderRef ref, OTNotifyUPP proc, void *contextPtr) |
| OSStatus | OTUseSyncIdleEvents (ProviderRef ref, Boolean useEvents) |
| void | OTRemoveNotifier (ProviderRef ref) |
| void | OTLeaveNotifier (ProviderRef ref) |
| Boolean | OTEnterNotifier (ProviderRef ref) |
| OSStatus | OTAckSends (ProviderRef ref) |
| OSStatus | OTDontAckSends (ProviderRef ref) |
| Boolean | OTIsAckingSends (ProviderRef ref) |
| OSStatus | OTCancelSynchronousCalls (ProviderRef ref, OSStatus err) |
| EndpointRef | OTOpenEndpointInContext (OTConfigurationRef config, OTOpenFlags oflag, TEndpointInfo *info, OSStatus *err, OTClientContextPtr clientContext) |
| OSStatus | OTAsyncOpenEndpointInContext (OTConfigurationRef config, OTOpenFlags oflag, TEndpointInfo *info, OTNotifyUPP upp, void *contextPtr, OTClientContextPtr clientContext) |
| EndpointRef | OTOpenEndpoint (OTConfigurationRef cfig, OTOpenFlags oflag, TEndpointInfo *info, OSStatus *err) |
| OSStatus | OTAsyncOpenEndpoint (OTConfigurationRef cfig, OTOpenFlags oflag, TEndpointInfo *info, OTNotifyUPP proc, void *contextPtr) |
| OSStatus | OTGetEndpointInfo (EndpointRef ref, TEndpointInfo *info) |
| OTResult | OTGetEndpointState (EndpointRef ref) |
| OTResult | OTLook (EndpointRef ref) |
| OTResult | OTSync (EndpointRef ref) |
| OTResult | OTCountDataBytes (EndpointRef ref, OTByteCount *countPtr) |
| OSStatus | OTGetProtAddress (EndpointRef ref, TBind *boundAddr, TBind *peerAddr) |
| OSStatus | OTResolveAddress (EndpointRef ref, TBind *reqAddr, TBind *retAddr, OTTimeout timeOut) |
| void * | OTAllocInContext (EndpointRef ref, OTStructType structType, UInt32 fields, OSStatus *err, OTClientContextPtr clientContext) |
| void * | OTAlloc (EndpointRef ref, OTStructType structType, OTFieldsType fields, OSStatus *err) |
| OTResult | OTFree (void *ptr, OTStructType structType) |
| OSStatus | OTOptionManagement (EndpointRef ref, TOptMgmt *req, TOptMgmt *ret) |
| OSStatus | OTCreateOptions (const char *endPtName, char **strPtr, TNetbuf *buf) |
| OSStatus | OTCreateOptionString (const char *endPtName, TOption **opt, void *bufEnd, char *str, OTByteCount stringSize) |
| OSStatus | OTNextOption (UInt8 *buffer, UInt32 buflen, TOption **prevOptPtr) |
| TOption * | OTFindOption (UInt8 *buffer, UInt32 buflen, OTXTILevel level, OTXTIName name) |
| OSStatus | OTBind (EndpointRef ref, TBind *reqAddr, TBind *retAddr) |
| OSStatus | OTUnbind (EndpointRef ref) |
| OSStatus | OTConnect (EndpointRef ref, TCall *sndCall, TCall *rcvCall) |
| OSStatus | OTRcvConnect (EndpointRef ref, TCall *call) |
| OSStatus | OTListen (EndpointRef ref, TCall *call) |
| OSStatus | OTAccept (EndpointRef listener, EndpointRef worker, TCall *call) |
| OSStatus | OTSndDisconnect (EndpointRef ref, TCall *call) |
| OSStatus | OTSndOrderlyDisconnect (EndpointRef ref) |
| OSStatus | OTRcvDisconnect (EndpointRef ref, TDiscon *discon) |
| OSStatus | OTRcvOrderlyDisconnect (EndpointRef ref) |
| OTResult | OTRcv (EndpointRef ref, void *buf, OTByteCount nbytes, OTFlags *flags) |
| OTResult | OTSnd (EndpointRef ref, void *buf, OTByteCount nbytes, OTFlags flags) |
| OSStatus | OTSndUData (EndpointRef ref, TUnitData *udata) |
| OSStatus | OTRcvUData (EndpointRef ref, TUnitData *udata, OTFlags *flags) |
| OSStatus | OTRcvUDErr (EndpointRef ref, TUDErr *uderr) |
| OSStatus | OTSndRequest (EndpointRef ref, TRequest *req, OTFlags reqFlags) |
| OSStatus | OTRcvReply (EndpointRef ref, TReply *reply, OTFlags *replyFlags) |
| OSStatus | OTSndReply (EndpointRef ref, TReply *reply, OTFlags replyFlags) |
| OSStatus | OTRcvRequest (EndpointRef ref, TRequest *req, OTFlags *reqFlags) |
| OSStatus | OTCancelRequest (EndpointRef ref, OTSequence sequence) |
| OSStatus | OTCancelReply (EndpointRef ref, OTSequence sequence) |
| OSStatus | OTSndURequest (EndpointRef ref, TUnitRequest *req, OTFlags reqFlags) |
| OSStatus | OTRcvUReply (EndpointRef ref, TUnitReply *reply, OTFlags *replyFlags) |
| OSStatus | OTSndUReply (EndpointRef ref, TUnitReply *reply, OTFlags replyFlags) |
| OSStatus | OTRcvURequest (EndpointRef ref, TUnitRequest *req, OTFlags *reqFlags) |
| OSStatus | OTCancelURequest (EndpointRef ref, OTSequence seq) |
| OSStatus | OTCancelUReply (EndpointRef ref, OTSequence seq) |
| OSStatus | OTAsyncOpenMapperInContext (OTConfigurationRef config, OTOpenFlags oflag, OTNotifyUPP upp, void *contextPtr, OTClientContextPtr clientContext) |
| MapperRef | OTOpenMapperInContext (OTConfigurationRef config, OTOpenFlags oflag, OSStatus *err, OTClientContextPtr clientContext) |
| OSStatus | OTAsyncOpenMapper (OTConfigurationRef cfig, OTOpenFlags oflag, OTNotifyUPP proc, void *contextPtr) |
| MapperRef | OTOpenMapper (OTConfigurationRef cfig, OTOpenFlags oflag, OSStatus *err) |
| OSStatus | OTRegisterName (MapperRef ref, TRegisterRequest *req, TRegisterReply *reply) |
| OSStatus | OTDeleteName (MapperRef ref, TNetbuf *name) |
| OSStatus | OTDeleteNameByID (MapperRef ref, OTNameID nameID) |
| OSStatus | OTLookupName (MapperRef ref, TLookupRequest *req, TLookupReply *reply) |
| OTConfigurationRef | OTCreateConfiguration (const char *path) |
| OTConfigurationRef | OTCloneConfiguration (OTConfigurationRef cfig) |
| void | OTDestroyConfiguration (OTConfigurationRef cfig) |
| void * | OTAllocMemInContext (OTByteCount size, OTClientContextPtr clientContext) |
| void * | OTAllocMem (OTByteCount size) |
| void | OTFreeMem (void *mem) |
| void | OTDelay (UInt32 seconds) |
| void | OTIdle (void) |
| void | OTMemcpy (void *dest, const void *src, OTByteCount nBytes) |
| Boolean | OTMemcmp (const void *mem1, const void *mem2, OTByteCount nBytes) |
| void | OTMemmove (void *dest, const void *src, OTByteCount nBytes) |
| void | OTMemzero (void *dest, OTByteCount nBytes) |
| void | OTMemset (void *dest, OTUInt8Param toSet, OTByteCount nBytes) |
| OTByteCount | OTStrLength (const char *str) |
| void | OTStrCopy (char *dest, const char *src) |
| void | OTStrCat (char *dest, const char *src) |
| Boolean | OTStrEqual (const char *src1, const char *src2) |
| void | OTGetTimeStamp (OTTimeStamp *currentTime) |
| OTTimeStamp * | OTSubtractTimeStamps (OTTimeStamp *result, OTTimeStamp *startTime, OTTimeStamp *endEnd) |
| UInt32 | OTTimeStampInMilliseconds (OTTimeStamp *delta) |
| UInt32 | OTTimeStampInMicroseconds (OTTimeStamp *delta) |
| UInt32 | OTElapsedMilliseconds (OTTimeStamp *startTime) |
| UInt32 | OTElapsedMicroseconds (OTTimeStamp *startTime) |
| UInt32 | OTGetClockTimeInSecs (void) |
| void | OTLIFOEnqueue (OTLIFO *list, OTLink *link) |
| OTLink * | OTLIFODequeue (OTLIFO *list) |
| OTLink * | OTLIFOStealList (OTLIFO *list) |
| OTLink * | OTReverseList (OTLink *list) |
| typedef | CALLBACK_API_C (Boolean, OTListSearchProcPtr)(const void *ref |
| typedef | TVECTOR_UPP_TYPE (OTListSearchProcPtr) OTListSearchUPP |
| OTListSearchUPP | NewOTListSearchUPP (OTListSearchProcPtr userRoutine) |
| void | DisposeOTListSearchUPP (OTListSearchUPP userUPP) |
| Boolean | InvokeOTListSearchUPP (const void *ref, OTLink *linkToCheck, OTListSearchUPP userUPP) |
| void | OTAddFirst (OTList *list, OTLink *link) |
| void | OTAddLast (OTList *list, OTLink *link) |
| OTLink * | OTRemoveFirst (OTList *list) |
| OTLink * | OTRemoveLast (OTList *list) |
| OTLink * | OTGetFirst (OTList *list) |
| OTLink * | OTGetLast (OTList *list) |
| Boolean | OTIsInList (OTList *list, OTLink *link) |
| OTLink * | OTFindLink (OTList *list, OTListSearchUPP proc, const void *ref) |
| Boolean | OTRemoveLink (OTList *list, OTLink *link) |
| OTLink * | OTFindAndRemoveLink (OTList *list, OTListSearchUPP proc, const void *ref) |
| OTLink * | OTGetIndexedLink (OTList *list, OTItemCount index) |
| void | OTEnqueue (void **listHead, void *object, OTByteCount linkOffset) |
| void * | OTDequeue (void **listHead, OTByteCount linkOffset) |
| Boolean | OTAtomicSetBit (UInt8 *bytePtr, OTByteCount bitNumber) |
| Boolean | OTAtomicClearBit (UInt8 *bytePtr, OTByteCount bitNumber) |
| Boolean | OTAtomicTestBit (UInt8 *bytePtr, OTByteCount bitNumber) |
| Boolean | OTCompareAndSwapPtr (void *oldValue, void *newValue, void **dest) |
| Boolean | OTCompareAndSwap32 (UInt32 oldValue, UInt32 newValue, UInt32 *dest) |
| Boolean | OTCompareAndSwap16 (UInt32 oldValue, UInt32 newValue, UInt16 *dest) |
| Boolean | OTCompareAndSwap8 (UInt32 oldValue, UInt32 newValue, UInt8 *dest) |
| SInt32 | OTAtomicAdd32 (SInt32 toAdd, SInt32 *dest) |
| SInt16 | OTAtomicAdd16 (SInt32 toAdd, SInt16 *dest) |
| SInt8 | OTAtomicAdd8 (SInt32 toAdd, SInt8 *dest) |
Open Transport client interface file. This contains all the client APIs.
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
| #define _MDECL |
Setup _MDECL to be _cdecl when compiling C++ code with compilers that support it, or nothing otherwise.
All OT ioctl numbers are formed using the MIOC_CMD macro, which divides the ioctl space by protocol space (the first parameter) and ioctl number within that protocol space (the second parameter). This macro is only available to C users but it's relatively easy to synthesise its results in other languages.
| #define OPT_NEXTHDR | ( | theBuffer, | |
| theBufLen, | |||
| prevOption | |||
| ) |
This macro will return the next option in the buffer, given the previous option in the buffer, returning NULL if there are no more. You start off by setting prevOption = (TOption*)theBuffer (Use OTNextOption for a more thorough check - it ensures the end of the option is in the buffer as well.)
| #define OTCreateNuBusPortRef | ( | devType, | |
| slot, | |||
| other | |||
| ) | OTCreatePortRef(kOTNuBus, devType, slot, other) |
Convenience macros for generating specific types of OTPortRefs.
| #define OTDEBUG 0 |
OTDEBUG is used to control the behaviour of the OT debugging macros. If you set it to non-zero, the macros will generate code that drops you into the debugger. If you set it to 0, or leave it undefined, the macros are compiled out. Setting up this compiler variable is a little tricky because previous versions of the OT interfaces used a different variable, qDebug. We replaced qDebug with OTDEBUG because qDebug does not fit into the OT namespace. But I didn't want to break a lot of currently building code. The following tricky compiler variable footwork avoids this. There are four outcomes when this code is compiled, depending on whether qDebug and OTDEBUG are defined beforehand. The following table shows the outcome in each case. qDebug OTDEBUG Outcome Explanation
defined defined OTDEBUG wins Mixed legacy and new code, we believe the new code. defined undefined qDebug wins Legacy code. undefined defined OTDEBUG wins New code. undefined undefined no debugging No debugging.
| #define OTGetLinkObject | ( | link, | |
| struc, | |||
| field | |||
| ) | ((struc *)((char *)(link)-OTOffsetOf(struc, field))) |
You can use this macro to map from an OTLink field to the structure in which it's embedded.
| #define OTInitBufferInfo | ( | infoPtr, | |
| theBuffer | |||
| ) |
| #define OTKERNEL 0 |
The following table shows how to map from the old (pre-Universal Interfaces) header file name to the equivalent Universal Interfaces header file name. Old Header New Header
cred.h OpenTransportProtocol.h dlpi.h OpenTransportProtocol.h miioccom.h OpenTransportProtocol.h mistream.h OpenTransportProtocol.h/OpenTransportKernel.h modnames.h OpenTransportProtocol.h OpenTptAppleTalk.h OpenTransportProviders.h OpenTptClient.h OpenTransportProtocol.h OpenTptCommon.h OpenTransportProtocol.h OpenTptConfig.h OpenTransportProtocol.h OpenTptDevLinks.h OpenTransportProviders.h OpenTptInternet.h OpenTransportProviders.h OpenTptISDN.h OpenTransportProviders.h OpenTptLinks.h OpenTransportProviders.h OpenTptModule.h OpenTransportKernel.h OpenTptPCISupport.h OpenTransportKernel.h OpenTptSerial.h OpenTransportProviders.h OpenTptXTI.h OpenTransportUNIX.r OpenTransport.h OpenTransport.h OpenTransport.r OpenTransport.r OTConfig.r OpenTransportProtocol.r OTDebug.h OpenTransport.h OTSharedLibs.h OpenTransportProviders.h strlog.h OpenTransportProtocol.h/OpenTransportKernel.h stropts.h OpenTransportProtocol.h/OpenTransportUNIX.h strstat.h OpenTransportProtocol.h tihdr.h OpenTransportProtocol.h OTKERNEL is used to indicate whether the code is being built for the kernel environment. It defaults to 0. If you include "OpenTransportKernel.h" before including this file, it will be 1 and you will only be able to see stuff available to kernel code.
| #define OTNextLookupBuffer | ( | buf | ) |
OTNextLookupBuffer allows you to step through a packed array of TLookupBuffers.
OT now defines its own version of the standard C "offsetof" macro so as to avoid including <stddef.h>.
| #define OTUNIXERRORS 0 |
OTUNIXERRORS determines whether this file defines a bunch of common UNIX error codes, like EPERM. Typically, client code does not want to do this because of the possibility of a clash with other code modules, like the standard C libraries, that also defines these routines. However, client code can turn it on to get these definitions. This might be done by protocol stack infrastructure, or some other low-level code. "OpenTransportKernel.i" sets this flag before include "OpenTransport.h" because kernel modules typically need these error codes. Note that kernel modules shouldn't be including standard C libraries, so this is rarely a problem. In general, the clash between OT and standard C definitions of these error codes is rarely a problem becasue both OT and the C libraries define them to have the same value. But I'm sure this check is useful to some people.
| #define T_ALIGN | ( | len | ) | (((UInt32)(len) + (sizeof(SInt32) - 1)) & ~(sizeof(SInt32) - 1)) |
This macro will align return the value of "len", rounded up to the next 4-byte boundary.
These map the Open Transport/XTI errors (the Txxxx error codes), and the StdCLib Exxxx error codes into unique spaces in the Mac OS OSStatus space.
| typedef UInt32 OTBand |
OTBand *****
A band is a STREAMS concepts which defines the priority of data on a stream. Although this type is defined as a 32 bit number for efficiency's sake, bands actually only range from 0 to 255. Typically band 0 is used for normal data and band 1 for expedited data.
| typedef struct OTConfiguration* OTConfigurationRef |
OTConfiguration *****
This is a "black box" structure used to define the configuration of a provider or endpoint. This file defines a very limited set of operations on a configuration. "OpenTransportClient.h" extends this with extra operations used by protocol stacks but not typically needed by clients.
| typedef long OTDeferredTaskRef |
OT deferred tasks are often more convenience that standard Mac OS although they have no significant advantages beyond convenience.
| typedef UInt16 OTDeviceType |
A couple of special values for the device type element of an OTPortRef. See "OpenTransportDevices.h" for the standard values.
| typedef UInt32 OTEventCode |
OT event codes values for Open Transport. These are the event codes that are sent to notification routine (notifiers).
| typedef UInt32 OTFlags |
This type is used to describe bitwise flags in OT data structures and parameters. Think of it as the OT analogue to the OptionBits type in "MacTypes.h".
| typedef UInt32 OTInitializationFlags |
For Carbon the InitOpenTransport interface has changed so it takes a flags parameter and returns a client context pointer. The flag passed to indicates whether OT should be initialized for application use or for some other target (for example, plugins that run in an application context but not the application itself.) Applications that are not interested in the value of the client context pointer may pass NULL as outClientContext – they will pass NULL to other routines that take a OTClientContextPtr.
| typedef UInt32 OTOpenFlags |
Flags Used When Opening Providers *****
Important OT does not currently support any of these flags. You should always pass 0 to a parameter of type OTOpenFlags. If you need to modify the mode of operation of a provider, use OTSetBlocking, OTSetSynchronous, etc.
| typedef UInt32 OTPortRef |
"OpenTransport.h" no longer defines "struct t_info". We recommend that you use TEndpointInfo instead. If this is impossible, use the definition of "struct t_info" in "OpenTransportXTI.h".
| typedef SInt32 OTReason |
A protocol-specific reason code for failure. Usually a Unix-style positive error code.
| typedef SInt32 OTResult |
Mac OS Error Codes *****
Most OT client routines return an OSStatus error code, a 32 bit type defined in "MacTypes.h". The OT-unique error code values are defined below. Many of these are generated by remapping XTI error codes (Txxxx) and UNIX error codes (Exxxx) to a reserved range in the OSStatus space. Some routines return an OTResult type, indicating that the routine might fail with a negative error, succeed with noErr, or possible return a positive value indicating some status.
| typedef UInt32 OTServiceType |
TEndpointInfo *****
This structure is returned from the GetEndpointInfo call and contains information about an endpoint. But first, some special flags and types.
| typedef long OTSystemTaskRef |
OT system tasks allow you to schedule a procedure to be called at system task time. Potentially useful, but it relies on someone calling SystemTask (or WaitNextEvent, which calls SystemTask). Not available to kernel code because relying on system task time to make progress is likely to result in deadlocks.
| typedef UnsignedWide OTTimeStamp |
OTGetTimeStamp returns time in "tick" numbers, stored in 64 bits. This timestamp can be used as a base number for calculating elapsed time. OTSubtractTimeStamps returns a pointer to the "result" parameter.
OTGetClockTimeInSecs returns time since Open Transport was initialized in seconds.
| typedef UInt8 OTUInt8Param |
Normalise 68K Calling C Conventions *****
Define special types that handle the difference in parameter passing between different Mac OS C compilers when generating 68K code. OT exports C calling conventions routines, and various C compilers use various different conventions. Differences in the placement of the result are covered above, where we output pragma pointers_in_D0. The other big difference is how the compilers pass integer parameters less than 32 bits. The MPW compiler always extends these to 32 bits; other compilers simply push a value of the appropriate size. We overcome this difference by defining special OTFooParam types, which are only used when passing sub 32 bit values to routines. They are always defined to a 32 bit size, which makes all the compilers do the same thing. One weird consequence of this is that in more strict type checking languages (eg Pascal) OTBooleanParam is not compatible with Boolean. Sorry.
| typedef UInt16 OTXTIErr |
These definitions are only compiled if you're building kernel code or you explicit request them by setting OTUNIXERRORS. See the description of these compiler variables, given above.
| typedef UInt32 OTXTIStates |
XTI States *****
These are the potential values returned by OTGetEndpointState and OTSync which represent the XTI state of an endpoint.
| typedef void* ProviderRef |
This deserves some explanation. If you're compiling for C++, the C++ definitions of TEndpoint and TMapper at the end of this file are invoked, which lets the compiler know that they are both subclasses of TProvider. This way the compiler will do the right subclass type checking, ie you will be able to pass an EndpointRef to a parameter of type ProviderRef, but not vice versa. On the other hand, if your compiling for straighth C, everything is defined as void. This is somewhat dangerous, but it prevents you have to cast an EndpointRef to a ProviderRef every time you call a function that works on all forms of providers.
| anonymous enum |
BSD defines O_ASYNC, O_NDELAY and O_NONBLOCK in fcntl.h Use kO_ASYNC, kO_NDELAY and kO_NONBLOCK in the unlikely event you need the OT value in Carbon
| anonymous enum |
OTAddress type defines the standard header for all OT address formats. It consists of one 16 bit integer, which defines the address format used, followed by an arbitrary number of bytes which are protocol-specific. Conceptually, all OT address formats are subtypes of this type, extended with fields that are specific to the protocol. For example, OTInetAddress starts with the OTAddressType field and then continues to include a host IP address and a port number.
| anonymous enum |
OTAlloc Constants *****
Note: In general, Apple recommends that you avoid the OTAlloc call because using it extensively causes your program to allocate and deallocate many memory blocks, with each extra memory allocation costing time. OTStructType defines the structure type to be allocated using the OTAlloc call.
| anonymous enum |
These values are used in the "fields" parameter of the OTAlloc call to define which fields of the structure should be allocated.
| anonymous enum |
These flags are used when sending and receiving data. The constants defined are masks.
| anonymous enum |
Events are divided into numerous categories:
(0x2700xxxx) Events sent to registered OT clients. All event codes not described here are reserved by Apple. If you receive an event code you do not understand, ignore it!
| anonymous enum |
Signal Values *****
Signals that are generated by a raw stream. When writing a notifier for a raw stream, add these values to kSIGNALEVENT to determine what event you are receiving.
| anonymous enum |
General XTI Definitions *****
These definitions are typically used during option management.
| anonymous enum |
Special-case values for in the tsdu, etsdu, connect, and discon fields of TEndpointInfo.
| anonymous enum |
Masks for the fPortFlags field of OTPortRecord If no bits are set, the port is currently inactive.
| anonymous enum |
If the endpoint supports "raw mode" (the T_CAN_SUPPORT_MDATA bit will be set in the TEndpointInfo::flags field), then you specify the raw mode packet by putting the kOTNetbufIsRawMode value in the udata.addr.len field when calling OTSndUData and also set the udata.opt.len, udata.opt.buf, and udata.addr.buf fields to 0.
| typedef CALLBACK_API | ( | void | , |
| OTNotifyProcPtr | |||
| ) |
Notifier Type Definition *****
Open Transport notifiers must conform to the OTNotifyProcPtr prototype. Even though a OTNotifyUPP is a OTNotifyProcPtr on pre-Carbon system, use NewOTNotifyUPP() and friends to make your source code portable to OS X and Carbon.
| typedef CALLBACK_API | ( | void | , |
| OTProcessProcPtr | |||
| ) |
All OT task callbacks use the same prototype, shown below. This is only a UPP for CFM-68K clients.
| typedef CALLBACK_API_C | ( | Boolean | , |
| OTListSearchProcPtr | |||
| ) | const |
An OTList is a non-interrupt-safe list, but has more features than the OTLIFO list. It is a standard singly-linked list. The following is the prototype for a list element comparison function, which returns true if the element described by linkToCheck matches the client criteria (typically held in ref). This is only a UPP for CFM-68K clients.
| void CloseOpenTransport | ( | void | ) |
| void CloseOpenTransportInContext | ( | OTClientContextPtr | clientContext | ) |
Under Carbon, CloseOpenTransport takes a client context pointer. Applications may pass NULL after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a valid client context. CloseOpenTransportInContext()
| void DisposeOTListSearchUPP | ( | OTListSearchUPP | userUPP | ) |
| void DisposeOTNotifyUPP | ( | OTNotifyUPP | userUPP | ) |
| void DisposeOTProcessUPP | ( | OTProcessUPP | userUPP | ) |
| OSStatus InitOpenTransport | ( | void | ) |
| OSStatus InitOpenTransportInContext | ( | OTInitializationFlags | flags, |
| OTClientContextPtr * | outClientContext | ||
| ) |
| OSStatus InitOpenTransportUtilities | ( | void | ) |
| void InvokeOTNotifyUPP | ( | void * | contextPtr, |
| OTEventCode | code, | ||
| OTResult | result, | ||
| void * | cookie, | ||
| OTNotifyUPP | userUPP | ||
| ) |
| void InvokeOTProcessUPP | ( | void * | arg, |
| OTProcessUPP | userUPP | ||
| ) |
| OTListSearchUPP NewOTListSearchUPP | ( | OTListSearchProcPtr | userRoutine | ) |
| OTNotifyUPP NewOTNotifyUPP | ( | OTNotifyProcPtr | userRoutine | ) |
| OTProcessUPP NewOTProcessUPP | ( | OTProcessProcPtr | userRoutine | ) |
| OSStatus OTAccept | ( | EndpointRef | listener, |
| EndpointRef | worker, | ||
| TCall * | call | ||
| ) |
| OSStatus OTAckSends | ( | ProviderRef | ref | ) |
| void* OTAlloc | ( | EndpointRef | ref, |
| OTStructType | structType, | ||
| OTFieldsType | fields, | ||
| OSStatus * | err | ||
| ) |
| void* OTAllocInContext | ( | EndpointRef | ref, |
| OTStructType | structType, | ||
| UInt32 | fields, | ||
| OSStatus * | err, | ||
| OTClientContextPtr | clientContext | ||
| ) |
Note: In general, Apple recommends that you avoid the OTAlloc call because using it extensively causes your program to allocate and deallocate many memory blocks, with each extra memory allocation costing time. Under Carbon, OTAlloc takes a client context pointer. Applications may pass NULL after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a valid client context. OTAllocInContext()
| void* OTAllocMem | ( | OTByteCount | size | ) |
| void* OTAllocMemInContext | ( | OTByteCount | size, |
| OTClientContextPtr | clientContext | ||
| ) |
This file defines a very limited set of operations on a configuration. "OpenTransportClient.h" extends this with extra operations used by protocol stacks but not typically needed by clients. Under Carbon, OTAllocMem takes a client context pointer. Applications may pass NULL after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a valid client context. OTAllocMemInContext()
| OSStatus OTAsyncOpenEndpoint | ( | OTConfigurationRef | cfig, |
| OTOpenFlags | oflag, | ||
| TEndpointInfo * | info, | ||
| OTNotifyUPP | proc, | ||
| void * | contextPtr | ||
| ) |
| OSStatus OTAsyncOpenEndpointInContext | ( | OTConfigurationRef | config, |
| OTOpenFlags | oflag, | ||
| TEndpointInfo * | info, | ||
| OTNotifyUPP | upp, | ||
| void * | contextPtr, | ||
| OTClientContextPtr | clientContext | ||
| ) |
OTAsyncOpenEndpointInContext()
| OSStatus OTAsyncOpenMapper | ( | OTConfigurationRef | cfig, |
| OTOpenFlags | oflag, | ||
| OTNotifyUPP | proc, | ||
| void * | contextPtr | ||
| ) |
| OSStatus OTAsyncOpenMapperInContext | ( | OTConfigurationRef | config, |
| OTOpenFlags | oflag, | ||
| OTNotifyUPP | upp, | ||
| void * | contextPtr, | ||
| OTClientContextPtr | clientContext | ||
| ) |
Under Carbon, the OpenMapper routines take a client context pointer. Applications may pass NULL after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a valid client context. OTAsyncOpenMapperInContext()
| OSStatus OTAsyncOpenProvider | ( | OTConfigurationRef | cfig, |
| OTOpenFlags | flags, | ||
| OTNotifyUPP | proc, | ||
| void * | contextPtr | ||
| ) |
| SInt16 OTAtomicAdd16 | ( | SInt32 | toAdd, |
| SInt16 * | dest | ||
| ) |
move.l d0,a1 *| move.l (a0),d1 *| move.l d1,d0 *| add.l a1,d0 *| cas.l d1,d0,(a0) *| bne.s @1 *| OTAtomicAdd16()
| SInt32 OTAtomicAdd32 | ( | SInt32 | toAdd, |
| SInt32 * | dest | ||
| ) |
cas.b d0,d1,(a0) *| seq d0 *| moveq #1,d1; and.l d1,d0 *| OTAtomicAdd32()
| SInt8 OTAtomicAdd8 | ( | SInt32 | toAdd, |
| SInt8 * | dest | ||
| ) |
| Boolean OTAtomicClearBit | ( | UInt8 * | bytePtr, |
| OTByteCount | bitNumber | ||
| ) |
bset.b d0,(a0) sne d0 moveq #1,d1 and.l d1,d0 OTAtomicClearBit()
| Boolean OTAtomicSetBit | ( | UInt8 * | bytePtr, |
| OTByteCount | bitNumber | ||
| ) |
Note: The Bit operations return the previous value of the bit (0 or non-zero). The memory pointed to must be a single byte and only bits 0 through 7 are valid. Bit 0 corresponds to a mask of 0x01, and Bit 7 to a mask of 0x80. WARNING! void* and UInt32 locations MUST be on 4-byte boundaries. UInt16 locations must not cross a 4-byte boundary. OTAtomicSetBit()
| Boolean OTAtomicTestBit | ( | UInt8 * | bytePtr, |
| OTByteCount | bitNumber | ||
| ) |
bclr.b d0,(a0) sne d0 moveq #1,d1 and.l d1,d0 OTAtomicTestBit()
| OSStatus OTCancelReply | ( | EndpointRef | ref, |
| OTSequence | sequence | ||
| ) |
| OSStatus OTCancelRequest | ( | EndpointRef | ref, |
| OTSequence | sequence | ||
| ) |
| OSStatus OTCancelSynchronousCalls | ( | ProviderRef | ref, |
| OSStatus | err | ||
| ) |
| Boolean OTCancelSystemTask | ( | OTSystemTaskRef | stCookie | ) |
| OSStatus OTCancelUReply | ( | EndpointRef | ref, |
| OTSequence | seq | ||
| ) |
| OSStatus OTCancelURequest | ( | EndpointRef | ref, |
| OTSequence | seq | ||
| ) |
| Boolean OTCanLoadLibraries | ( | void | ) |
| Boolean OTCanMakeSyncCall | ( | void | ) |
| OSStatus OTChangePortState | ( | OTPortRef | portRef, |
| OTEventCode | theChange, | ||
| OTResult | why | ||
| ) |
Unregister the port with the given name (If you re-register the port, it may get a different name - use OTChangePortState if that is not desireable). Since a single OTPortRef can be registered with several names, the API needs to use the portName rather than the OTPortRef to disambiguate. OTChangePortState()
| OTConfigurationRef OTCloneConfiguration | ( | OTConfigurationRef | cfig | ) |
| OSStatus OTCloseProvider | ( | ProviderRef | ref | ) |
| Boolean OTCompareAndSwap16 | ( | UInt32 | oldValue, |
| UInt32 | newValue, | ||
| UInt16 * | dest | ||
| ) |
cas.l d0,d1,(a0) *| seq d0 *| moveq #1,d1; and.l d1,d0 *| OTCompareAndSwap16()
| Boolean OTCompareAndSwap32 | ( | UInt32 | oldValue, |
| UInt32 | newValue, | ||
| UInt32 * | dest | ||
| ) |
cas.l d0,d1,(a0) *| seq d0 *| moveq #1,d1; and.l d1,d0 *| OTCompareAndSwap32()
| Boolean OTCompareAndSwap8 | ( | UInt32 | oldValue, |
| UInt32 | newValue, | ||
| UInt8 * | dest | ||
| ) |
cas.w d0,d1,(a0) *| seq d0 *| moveq #1,d1; and.l d1,d0 *| OTCompareAndSwap8()
| Boolean OTCompareAndSwapPtr | ( | void * | oldValue, |
| void * | newValue, | ||
| void ** | dest | ||
| ) |
btst.b d0,(a0) sne d0 *| moveq #1,d1 and.l d1,d0 *| OTCompareAndSwapPtr()
| OTResult OTCountDataBytes | ( | EndpointRef | ref, |
| OTByteCount * | countPtr | ||
| ) |
| OTConfigurationRef OTCreateConfiguration | ( | const char * | path | ) |
| OTDeferredTaskRef OTCreateDeferredTask | ( | OTProcessUPP | proc, |
| void * | arg | ||
| ) |
| long OTCreateDeferredTaskInContext | ( | OTProcessUPP | upp, |
| void * | arg, | ||
| OTClientContextPtr | clientContext | ||
| ) |
Under Carbon, OTCreateDeferredTask takes a client context pointer. Applications may pass NULL after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a valid client context. OTCreateDeferredTaskInContext()
| OSStatus OTCreateOptions | ( | const char * | endPtName, |
| char ** | strPtr, | ||
| TNetbuf * | buf | ||
| ) |
| OSStatus OTCreateOptionString | ( | const char * | endPtName, |
| TOption ** | opt, | ||
| void * | bufEnd, | ||
| char * | str, | ||
| OTByteCount | stringSize | ||
| ) |
| OTPortRef OTCreatePortRef | ( | OTBusType | busType, |
| OTDeviceType | devType, | ||
| OTSlotNumber | slot, | ||
| UInt16 | other | ||
| ) |
| OTSystemTaskRef OTCreateSystemTask | ( | OTProcessUPP | proc, |
| void * | arg | ||
| ) |
| void OTDebugStr | ( | const char * | str | ) |
| void OTDelay | ( | UInt32 | seconds | ) |
Neither of these routines should be necessary to the correct operation of an OT program. If you're calling them, think again. OTDelay()
| OSStatus OTDeleteName | ( | MapperRef | ref, |
| TNetbuf * | name | ||
| ) |
| OSStatus OTDeleteNameByID | ( | MapperRef | ref, |
| OTNameID | nameID | ||
| ) |
| void* OTDequeue | ( | void ** | listHead, |
| OTByteCount | linkOffset | ||
| ) |
This function returns the head object of the list, and places the pointer at "object" + linkOffset into the listHead OTDequeue()
| void OTDestroyConfiguration | ( | OTConfigurationRef | cfig | ) |
| OSStatus OTDestroyDeferredTask | ( | OTDeferredTaskRef | dtCookie | ) |
| OSStatus OTDestroySystemTask | ( | OTSystemTaskRef | stCookie | ) |
| OSStatus OTDontAckSends | ( | ProviderRef | ref | ) |
| UInt32 OTElapsedMicroseconds | ( | OTTimeStamp * | startTime | ) |
| UInt32 OTElapsedMilliseconds | ( | OTTimeStamp * | startTime | ) |
| void OTEnqueue | ( | void ** | listHead, |
| void * | object, | ||
| OTByteCount | linkOffset | ||
| ) |
These routines are atomic, mighty weird, and generally not worth the complexity. If you need atomic list operations, use OTLIFO instead. This function puts "object" on the listHead, and places the previous value at listHead into the pointer at "object" plus linkOffset. OTEnqueue()
| void OTEnterInterrupt | ( | void | ) |
OTEnterInterrupt/OTLeaveInterrupt are normally used within the kernel to tell Open Transport we're at hardware interrupt time. Clients can also them to do the same. OTEnterInterrupt()
| Boolean OTEnterNotifier | ( | ProviderRef | ref | ) |
Find a link in the list which matches the search criteria established by the search proc and the refPtr. This is done by calling the search proc, passing it the refPtr and each link in the list, until the search proc returns true. NULL is returned if the search proc never returned true. OTFindLink()
| TOption* OTFindOption | ( | UInt8 * | buffer, |
| UInt32 | buflen, | ||
| OTXTILevel | level, | ||
| OTXTIName | name | ||
| ) |
| Boolean OTFindPort | ( | OTPortRecord * | portRecord, |
| const char * | portName | ||
| ) |
| Boolean OTFindPortByRef | ( | OTPortRecord * | portRecord, |
| OTPortRef | ref | ||
| ) |
| OTResult OTFree | ( | void * | ptr, |
| OTStructType | structType | ||
| ) |
| void OTFreeMem | ( | void * | mem | ) |
| UInt16 OTGetBusTypeFromPortRef | ( | OTPortRef | ref | ) |
| UInt32 OTGetClockTimeInSecs | ( | void | ) |
| OTDeviceType OTGetDeviceTypeFromPortRef | ( | OTPortRef | ref | ) |
| OSStatus OTGetEndpointInfo | ( | EndpointRef | ref, |
| TEndpointInfo * | info | ||
| ) |
| OTResult OTGetEndpointState | ( | EndpointRef | ref | ) |
| Boolean OTGetIndexedPort | ( | OTPortRecord * | portRecord, |
| OTItemCount | index | ||
| ) |
Routines for finding, registering and unregistering ports. IMPORTANT: These routines have two versions, one for the client and one for the kernel. Make sure you use and link with the right ones. OTGetIndexedPort()
| OTResult OTGetMessage | ( | ProviderRef | ref, |
| strbuf * | ctlbuf, | ||
| strbuf * | databuf, | ||
| OTFlags * | flagsPtr | ||
| ) |
| OTResult OTGetPriorityMessage | ( | ProviderRef | ref, |
| strbuf * | ctlbuf, | ||
| strbuf * | databuf, | ||
| OTBand * | bandPtr, | ||
| OTFlags * | flagsPtr | ||
| ) |
| OTPortRef OTGetProviderPortRef | ( | ProviderRef | ref | ) |
| OTSlotNumber OTGetSlotFromPortRef | ( | OTPortRef | ref, |
| UInt16 * | other | ||
| ) |
| void OTGetTimeStamp | ( | OTTimeStamp * | currentTime | ) |
| void OTIdle | ( | void | ) |
| OSStatus OTInstallNotifier | ( | ProviderRef | ref, |
| OTNotifyUPP | proc, | ||
| void * | contextPtr | ||
| ) |
| SInt32 OTIoctl | ( | ProviderRef | ref, |
| UInt32 | cmd, | ||
| void * | data | ||
| ) |
| Boolean OTIsAckingSends | ( | ProviderRef | ref | ) |
| Boolean OTIsAtInterruptLevel | ( | void | ) |
| Boolean OTIsBlocking | ( | ProviderRef | ref | ) |
| Boolean OTIsSynchronous | ( | ProviderRef | ref | ) |
| void OTLeaveInterrupt | ( | void | ) |
| void OTLeaveNotifier | ( | ProviderRef | ref | ) |
This function atomically dequeues the first element on the list. OTLIFODequeue()
This function atomically enqueues the link onto the front of the list. OTLIFOEnqueue()
This function atomically empties the list and returns a pointer to the first element on the list. OTLIFOStealList()
| OSStatus OTListen | ( | EndpointRef | ref, |
| TCall * | call | ||
| ) |
| OTResult OTLook | ( | EndpointRef | ref | ) |
| OSStatus OTLookupName | ( | MapperRef | ref, |
| TLookupRequest * | req, | ||
| TLookupReply * | reply | ||
| ) |
| Boolean OTMemcmp | ( | const void * | mem1, |
| const void * | mem2, | ||
| OTByteCount | nBytes | ||
| ) |
| void OTMemcpy | ( | void * | dest, |
| const void * | src, | ||
| OTByteCount | nBytes | ||
| ) |
Open Transport Utility Routines *****
All of these routines are available to both client and kernel. These are preferable, especially in the kernel case, to the standard C equivalents because they don't require you to link with StdCLib. OTMemcpy()
| void OTMemmove | ( | void * | dest, |
| const void * | src, | ||
| OTByteCount | nBytes | ||
| ) |
| void OTMemset | ( | void * | dest, |
| OTUInt8Param | toSet, | ||
| OTByteCount | nBytes | ||
| ) |
| void OTMemzero | ( | void * | dest, |
| OTByteCount | nBytes | ||
| ) |
| OSStatus OTNextOption | ( | UInt8 * | buffer, |
| UInt32 | buflen, | ||
| TOption ** | prevOptPtr | ||
| ) |
| EndpointRef OTOpenEndpoint | ( | OTConfigurationRef | cfig, |
| OTOpenFlags | oflag, | ||
| TEndpointInfo * | info, | ||
| OSStatus * | err | ||
| ) |
| EndpointRef OTOpenEndpointInContext | ( | OTConfigurationRef | config, |
| OTOpenFlags | oflag, | ||
| TEndpointInfo * | info, | ||
| OSStatus * | err, | ||
| OTClientContextPtr | clientContext | ||
| ) |
Under Carbon, the OpenEndpoint routines take a client context pointer. Applications may pass NULL after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a valid client context. OTOpenEndpointInContext()
| MapperRef OTOpenMapper | ( | OTConfigurationRef | cfig, |
| OTOpenFlags | oflag, | ||
| OSStatus * | err | ||
| ) |
| MapperRef OTOpenMapperInContext | ( | OTConfigurationRef | config, |
| OTOpenFlags | oflag, | ||
| OSStatus * | err, | ||
| OTClientContextPtr | clientContext | ||
| ) |
| ProviderRef OTOpenProvider | ( | OTConfigurationRef | cfig, |
| OTOpenFlags | flags, | ||
| OSStatus * | errPtr | ||
| ) |
| OSStatus OTPutMessage | ( | ProviderRef | ref, |
| const strbuf * | ctlbuf, | ||
| const strbuf * | databuf, | ||
| OTFlags | flags | ||
| ) |
| OSStatus OTPutPriorityMessage | ( | ProviderRef | ref, |
| const strbuf * | ctlbuf, | ||
| const strbuf * | databuf, | ||
| OTBand | band, | ||
| OTFlags | flags | ||
| ) |
| OSStatus OTRcvConnect | ( | EndpointRef | ref, |
| TCall * | call | ||
| ) |
| OSStatus OTRcvDisconnect | ( | EndpointRef | ref, |
| TDiscon * | discon | ||
| ) |
| OSStatus OTRcvOrderlyDisconnect | ( | EndpointRef | ref | ) |
| OSStatus OTRcvUDErr | ( | EndpointRef | ref, |
| TUDErr * | uderr | ||
| ) |
| OSStatus OTRcvUReply | ( | EndpointRef | ref, |
| TUnitReply * | reply, | ||
| OTFlags * | replyFlags | ||
| ) |
| OSStatus OTRcvURequest | ( | EndpointRef | ref, |
| TUnitRequest * | req, | ||
| OTFlags * | reqFlags | ||
| ) |
| OSStatus OTRegisterAsClient | ( | OTClientName | name, |
| OTNotifyUPP | proc | ||
| ) |
| OSStatus OTRegisterAsClientInContext | ( | OTClientName | name, |
| OTNotifyUPP | proc, | ||
| OTClientContextPtr | clientContext | ||
| ) |
| OSStatus OTRegisterName | ( | MapperRef | ref, |
| TRegisterRequest * | req, | ||
| TRegisterReply * | reply | ||
| ) |
| OSStatus OTRegisterPort | ( | OTPortRecord * | portRecord, |
| void * | ref | ||
| ) |
| void OTRemoveNotifier | ( | ProviderRef | ref | ) |
This function reverses a list that was stolen by OTLIFOStealList. It is NOT atomic. It returns the new starting list. OTReverseList()
| Boolean OTScheduleDeferredTask | ( | OTDeferredTaskRef | dtCookie | ) |
| Boolean OTScheduleInterruptTask | ( | OTDeferredTaskRef | dtCookie | ) |
| Boolean OTScheduleSystemTask | ( | OTSystemTaskRef | stCookie | ) |
| OSStatus OTSetAsynchronous | ( | ProviderRef | ref | ) |
| OSStatus OTSetBlocking | ( | ProviderRef | ref | ) |
| OTPortRef OTSetDeviceTypeInPortRef | ( | OTPortRef | ref, |
| OTDeviceType | devType | ||
| ) |
| OSStatus OTSetNonBlocking | ( | ProviderRef | ref | ) |
| OSStatus OTSetSynchronous | ( | ProviderRef | ref | ) |
| OSStatus OTSndDisconnect | ( | EndpointRef | ref, |
| TCall * | call | ||
| ) |
| OSStatus OTSndOrderlyDisconnect | ( | EndpointRef | ref | ) |
| OSStatus OTSndUData | ( | EndpointRef | ref, |
| TUnitData * | udata | ||
| ) |
| OSStatus OTSndUReply | ( | EndpointRef | ref, |
| TUnitReply * | reply, | ||
| OTFlags | replyFlags | ||
| ) |
| OSStatus OTSndURequest | ( | EndpointRef | ref, |
| TUnitRequest * | req, | ||
| OTFlags | reqFlags | ||
| ) |
| void OTStrCat | ( | char * | dest, |
| const char * | src | ||
| ) |
| void OTStrCopy | ( | char * | dest, |
| const char * | src | ||
| ) |
| Boolean OTStrEqual | ( | const char * | src1, |
| const char * | src2 | ||
| ) |
| OTByteCount OTStrLength | ( | const char * | str | ) |
| OTTimeStamp* OTSubtractTimeStamps | ( | OTTimeStamp * | result, |
| OTTimeStamp * | startTime, | ||
| OTTimeStamp * | endEnd | ||
| ) |
| OTResult OTSync | ( | EndpointRef | ref | ) |
| UInt32 OTTimeStampInMicroseconds | ( | OTTimeStamp * | delta | ) |
| UInt32 OTTimeStampInMilliseconds | ( | OTTimeStamp * | delta | ) |
| ProviderRef OTTransferProviderOwnership | ( | ProviderRef | ref, |
| OTClient | prevOwner, | ||
| OSStatus * | errPtr | ||
| ) |
| OSStatus OTUnbind | ( | EndpointRef | ref | ) |
| OSStatus OTUnregisterAsClient | ( | void | ) |
This registers yourself as a client for any miscellaneous Open Transport notifications that come along. CloseOpenTransport will automatically do an OTUnregisterAsClient, if you have not already done so. OTUnregisterAsClient()
| OSStatus OTUnregisterAsClientInContext | ( | OTClientContextPtr | clientContext | ) |
OTUnregisterAsClientInContext()
| OSStatus OTUnregisterPort | ( | const char * | portName, |
| void ** | ref | ||
| ) |
Register a port. The name the port was registered under is returned in the fPortName field. OTUnregisterPort()
| OSStatus OTUseSyncIdleEvents | ( | ProviderRef | ref, |
| Boolean | useEvents | ||
| ) |
| OTClient OTWhoAmI | ( | void | ) |