| Framework | CoreServices/CoreServices.h |
| Declared in | OpenTransport.h OpenTransportProtocol.h OpenTransportProviders.h queue.h types.h |
Open Transport is the Mac OS 8 and 9 API for accessing TCP/IP networks, such as the Internet, at the transport level. For Mac OS X, Apple provides Open Transport as a compatibility library to ease migration of legacy applications. As such, Mac OS X does not support the entire Open Transport API.
In new Mac OS X applications you should not use Open Transport but should instead use BSD Sockets or, when possible, higher-level Core Services and Core Foundation APIs such as CFNetwork, CFURL, CFSocket, and CFStream. You can also use Cocoa networking classes such as NSURL, NSURLHandle, and NSNetService.
In Mac OS X, Open Transport provides limited support for endpoints and port access, and no support for the XTI or UNIX STREAMS interfaces. If you want your application to run in Mac OS 8 and 9 and in Mac OS X, use Open Transport for your Mac OS 8 and 9 version and Apple’s newer APIs for your Mac OS X version.
For more information about Open Transport, see:
http://developer.apple.com/macos/opentransport/
Mac OS X supports only these Open Transport providers:
TCP, UDP, and Raw IP Endpoints
TCP/IP Services Providers and TCP/IP Mapper Providers (for the Domain Name Resolver protocol)
DDP endpoints, AppleTalk Services Providers, and AppleTalk Mappers (for the Name Binding Protocol)
OT/PPP endpoints
Mac OS X does not support ADSP, ATP, ASP, PAP, or serial endpoints.
You may have to revise your code if it uses Open Transport in one of the following ways:
Your application uses a function that directly gains access to a network port. Ports are read-only in Mac OS X. Code that communicates directly with network interfaces must use the IOKit API.
Your application uses the transaction-based endpoint feature of Open Transport. This feature is not supported in Mac OS X. Removal of this capability should affect only users of AppleTalk protocols such as ASP.
Your application uses Open Transport’s XTI interfaces or UNIX STREAMS interfaces. Mac OS X will not support these interfaces. You can obtain similar functionality using supported high-level functions.
In Mac OS X, one cannot assume that Open Transport deferred tasks and notifiers procedures run at deferred task level. They may be preempted by the main event loop or another Mac OS X thread. You should always use atomic operations to access data shared between deferred tasks and notifiers and main system tasks.
Mac OS X does not support functions for:
accessing Open Transport hash lists
accessing the Open Transport port name or icon
directly manipulating CFM or ASLM libraries
Client context parameters have been added to a number of OT functions. (An OT client is an application or a shared library.) Each client of Open Transport now has its own client context so that OT can track resources it allocates on behalf of the client. OT resources are objects like endpoints, timer tasks, and blocks of memory. To find out more about Open Transport resources management, see “Understanding Open Transport Asset Tracking” at:
http://developer.apple.com/technotes/tn/tn1173.html
Mac OS X introduces a new type, OTClientContextPtr, that represents the OT client context. This new type is passed as an extra parameter to functions that allocate OT resources. Before Mac OS X, the OT client context was determined by the Open Transport static libraries that you linked to your application. Now the OT client context is determined explicitly. The same Carbon binary can run on Mac OS 8/9 and Mac OS X, and you do not have to link your application to the static libraries.
You can use InitOpenTransportinContext to replace InitOpenTransport. It functions identically except that it also takes a client context pointer and a flags parameter to indicate whether you are initializing OT for an application or a shared library. When your application or shared library is done using Open Transport you should call CloseOpenTransportInContext to dispose of the Open Transport resources allocated for the client.
The following functions now take a client context:
As a convenience, applications may pass a null pointer to these routines and Open Transport will use the context that was passed to InitOpenTransport. However, shared libraries must always pass a valid OTClientContextPtr.
If you want to keep your application source code compatible with pre-Mac OS X systems, you may define the C preprocessor constant OTCARBONAPPLICATION to 1 to use the old routine names without the “InContext” suffix.
Mac OS X applications must pass UPPs instead of procedure pointers for Open Transport callback routines. You can use these new functions to create UPPs:
OTNotifyUPP replaces OTNotifyProcPtr
OTProcessUPP replaces OTNotifyProcPtr
OTListSearchUPP replaces OTListSearchProcPtr
You can use these functions to allocate and free UPPs:
These functions have been modified to take an OTNotifyUPP UPP instead of a procedure pointer:
These functions have been modified to take an OTProcessUPP UPP instead of a procedure pointer:
These functions have been modified to take an OTListSearchUPP UPP instead of a procedure pointer:
CloseOpenTransportInContext Deprecated in Mac OS X v10.4
InitOpenTransportInContext Deprecated in Mac OS X v10.4
OTCloneConfiguration Deprecated in Mac OS X v10.4
OTCreateConfiguration Deprecated in Mac OS X v10.4
OTDestroyConfiguration Deprecated in Mac OS X v10.4
OTCloseProvider Deprecated in Mac OS X v10.4
OTAckSends Deprecated in Mac OS X v10.4
OTCancelSynchronousCalls Deprecated in Mac OS X v10.4
OTDontAckSends Deprecated in Mac OS X v10.4
OTIsAckingSends Deprecated in Mac OS X v10.4
OTIsSynchronous Deprecated in Mac OS X v10.4
OTSetAsynchronous Deprecated in Mac OS X v10.4
OTSetBlocking Deprecated in Mac OS X v10.4
OTSetNonBlocking Deprecated in Mac OS X v10.4
OTSetSynchronous Deprecated in Mac OS X v10.4
OTEnterNotifier Deprecated in Mac OS X v10.4
OTInstallNotifier Deprecated in Mac OS X v10.4
OTLeaveNotifier Deprecated in Mac OS X v10.4
OTRemoveNotifier Deprecated in Mac OS X v10.4
OTUseSyncIdleEvents Deprecated in Mac OS X v10.4
OTIoctl Deprecated in Mac OS X v10.4
OTAsyncOpenEndpointInContext Deprecated in Mac OS X v10.4
OTOpenEndpointInContext Deprecated in Mac OS X v10.4
OTGetEndpointInfo Deprecated in Mac OS X v10.4
OTGetEndpointState Deprecated in Mac OS X v10.4
OTGetProtAddress Deprecated in Mac OS X v10.4
OTLook Deprecated in Mac OS X v10.4
OTResolveAddress Deprecated in Mac OS X v10.4
OTFree Deprecated in Mac OS X v10.4
OTCountDataBytes Deprecated in Mac OS X v10.4
OTRcvUData Deprecated in Mac OS X v10.4
OTRcvUDErr Deprecated in Mac OS X v10.4
OTSndUData Deprecated in Mac OS X v10.4
OTAccept Deprecated in Mac OS X v10.4
OTConnect Deprecated in Mac OS X v10.4
OTListen Deprecated in Mac OS X v10.4
OTRcvConnect Deprecated in Mac OS X v10.4
OTRcvDisconnect Deprecated in Mac OS X v10.4
OTRcvOrderlyDisconnect Deprecated in Mac OS X v10.4
OTSndDisconnect Deprecated in Mac OS X v10.4
OTSndOrderlyDisconnect Deprecated in Mac OS X v10.4
OTCanMakeSyncCall Deprecated in Mac OS X v10.4
OTCancelTimerTask Deprecated in Mac OS X v10.4
OTCreateTimerTaskInContext Deprecated in Mac OS X v10.4
OTDestroyTimerTask Deprecated in Mac OS X v10.4
OTScheduleTimerTask Deprecated in Mac OS X v10.4
OTCreateDeferredTaskInContext Deprecated in Mac OS X v10.4
OTDestroyDeferredTask Deprecated in Mac OS X v10.4
OTScheduleDeferredTask Deprecated in Mac OS X v10.4
OTAsyncOpenMapperInContext Deprecated in Mac OS X v10.4
OTOpenMapperInContext Deprecated in Mac OS X v10.4
OTDeleteName Deprecated in Mac OS X v10.4
OTDeleteNameByID Deprecated in Mac OS X v10.4
OTRegisterName Deprecated in Mac OS X v10.4
OTLookupName Deprecated in Mac OS X v10.4
OTOptionManagement Deprecated in Mac OS X v10.4
OTFindOption Deprecated in Mac OS X v10.4
OTNextOption Deprecated in Mac OS X v10.4
OTFindPort Deprecated in Mac OS X v10.4
OTFindPortByRef Deprecated in Mac OS X v10.4
OTGetBusTypeFromPortRef Deprecated in Mac OS X v10.4
OTGetDeviceTypeFromPortRef Deprecated in Mac OS X v10.4
OTGetIndexedPort Deprecated in Mac OS X v10.4
OTGetSlotFromPortRef Deprecated in Mac OS X v10.4
OTCreatePortRef Deprecated in Mac OS X v10.4
OTRegisterAsClientInContext Deprecated in Mac OS X v10.4
OTUnregisterAsClientInContext Deprecated in Mac OS X v10.4
OTAllocMemInContext Deprecated in Mac OS X v10.4
OTFreeMem Deprecated in Mac OS X v10.4
OTMemcmp Deprecated in Mac OS X v10.4
OTMemcpy Deprecated in Mac OS X v10.4
OTMemmove Deprecated in Mac OS X v10.4
OTMemset Deprecated in Mac OS X v10.4
OTMemzero Deprecated in Mac OS X v10.4
OTStrCat Deprecated in Mac OS X v10.4
OTStrCopy Deprecated in Mac OS X v10.4
OTStrEqual Deprecated in Mac OS X v10.4
OTStrLength Deprecated in Mac OS X v10.4
OTElapsedMicroseconds Deprecated in Mac OS X v10.4
OTElapsedMilliseconds Deprecated in Mac OS X v10.4
OTGetClockTimeInSecs Deprecated in Mac OS X v10.4
OTGetTimeStamp Deprecated in Mac OS X v10.4
OTSubtractTimeStamps Deprecated in Mac OS X v10.4
OTTimeStampInMicroseconds Deprecated in Mac OS X v10.4
OTTimeStampInMilliseconds Deprecated in Mac OS X v10.4
OTLIFODequeue Deprecated in Mac OS X v10.4
OTLIFOEnqueue Deprecated in Mac OS X v10.4
OTLIFOStealList Deprecated in Mac OS X v10.4
OTReverseList Deprecated in Mac OS X v10.4
OTAddFirst Deprecated in Mac OS X v10.4
OTAddLast Deprecated in Mac OS X v10.4
OTFindAndRemoveLink Deprecated in Mac OS X v10.4
OTFindLink Deprecated in Mac OS X v10.4
OTGetFirst Deprecated in Mac OS X v10.4
OTGetIndexedLink Deprecated in Mac OS X v10.4
OTGetLast Deprecated in Mac OS X v10.4
OTIsInList Deprecated in Mac OS X v10.4
OTRemoveFirst Deprecated in Mac OS X v10.4
OTRemoveLast Deprecated in Mac OS X v10.4
OTRemoveLink Deprecated in Mac OS X v10.4
OTAtomicAdd16 Deprecated in Mac OS X v10.4
OTAtomicAdd32 Deprecated in Mac OS X v10.4
OTAtomicAdd8 Deprecated in Mac OS X v10.4
OTAtomicClearBit Deprecated in Mac OS X v10.4
OTAtomicSetBit Deprecated in Mac OS X v10.4
OTAtomicTestBit Deprecated in Mac OS X v10.4
OTCompareAndSwap16 Deprecated in Mac OS X v10.4
OTCompareAndSwap32 Deprecated in Mac OS X v10.4
OTCompareAndSwap8 Deprecated in Mac OS X v10.4
OTCompareAndSwapPtr Deprecated in Mac OS X v10.4
OTBufferDataSize Deprecated in Mac OS X v10.4
OTReadBuffer Deprecated in Mac OS X v10.4
OTReleaseBuffer Deprecated in Mac OS X v10.4
OTInetAddressToName Deprecated in Mac OS X v10.4
OTInetStringToAddress Deprecated in Mac OS X v10.4
OTAsyncOpenInternetServicesInContext Deprecated in Mac OS X v10.4
OTOpenInternetServicesInContext Deprecated in Mac OS X v10.4
OTInetMailExchange Deprecated in Mac OS X v10.4
OTInetSysInfo Deprecated in Mac OS X v10.4
OTInetQuery Deprecated in Mac OS X v10.4
OTInetGetInterfaceInfo Deprecated in Mac OS X v10.4
OTInetHostToString Deprecated in Mac OS X v10.4
OTInetStringToHost Deprecated in Mac OS X v10.4
OTInitDNSAddress Deprecated in Mac OS X v10.4
OTInitInetAddress Deprecated in Mac OS X v10.4
OTInetGetSecondaryAddresses Deprecated in Mac OS X v10.4
OTCompareDDPAddresses Deprecated in Mac OS X v10.4
OTExtractNBPName Deprecated in Mac OS X v10.4
OTExtractNBPType Deprecated in Mac OS X v10.4
OTExtractNBPZone Deprecated in Mac OS X v10.4
OTGetNBPEntityLengthAsAddress Deprecated in Mac OS X v10.4
OTInitDDPAddress Deprecated in Mac OS X v10.4
OTInitDDPNBPAddress Deprecated in Mac OS X v10.4
OTInitNBPAddress Deprecated in Mac OS X v10.4
OTInitNBPEntity Deprecated in Mac OS X v10.4
OTSetAddressFromNBPEntity Deprecated in Mac OS X v10.4
OTSetAddressFromNBPString Deprecated in Mac OS X v10.4
OTSetNBPEntityFromAddress Deprecated in Mac OS X v10.4
OTSetNBPName Deprecated in Mac OS X v10.4
OTSetNBPType Deprecated in Mac OS X v10.4
OTSetNBPZone Deprecated in Mac OS X v10.4
OTAsyncOpenAppleTalkServicesInContext Deprecated in Mac OS X v10.4
OTOpenAppleTalkServicesInContext Deprecated in Mac OS X v10.4
OTATalkGetLocalZones Deprecated in Mac OS X v10.4
OTATalkGetMyZone Deprecated in Mac OS X v10.4
OTATalkGetZoneList Deprecated in Mac OS X v10.4
OTATalkGetInfo Deprecated in Mac OS X v10.4
DisposeOTListSearchUPP Deprecated in Mac OS X v10.4
DisposeOTNotifyUPP Deprecated in Mac OS X v10.4
DisposeOTProcessUPP Deprecated in Mac OS X v10.4
InvokeOTListSearchUPP Deprecated in Mac OS X v10.4
InvokeOTNotifyUPP Deprecated in Mac OS X v10.4
InvokeOTProcessUPP Deprecated in Mac OS X v10.4
NewOTListSearchUPP Deprecated in Mac OS X v10.4
NewOTNotifyUPP Deprecated in Mac OS X v10.4
NewOTProcessUPP Deprecated in Mac OS X v10.4
OTAllocInContext Deprecated in Mac OS X v10.4
OTClearBit Deprecated in Mac OS X v10.4
OTIsBlocking Deprecated in Mac OS X v10.4
OTSetBit Deprecated in Mac OS X v10.4
OTSetBusTypeInPortRef Deprecated in Mac OS X v10.4
OTSetDeviceTypeInPortRef Deprecated in Mac OS X v10.4
OTSetFirstClearBit Deprecated in Mac OS X v10.4
OTTestBit Deprecated in Mac OS X v10.4
admin_t
bufcall_t
bufcallp_t
closeOld_t
closep_t
esbbcallProc
FreeFuncType
old_closep_t
old_openp_t
openOld_t
openp_t
OTAllocMemProcPtr
OTCanConfigureProcPtr
OTCFConfigureProcPtr
OTCFCreateStreamProcPtr
OTCFHandleSystemEventProcPtr
OTCreateConfiguratorProcPtr
OTGateProcPtr
OTGetPortIconProcPtr
OTGetPortNameProcPtr
OTHashProcPtr
OTHashSearchProcPtr
OTSetupConfiguratorProcPtr