Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Networking > Carbon >

Not Recommended Documentclose button

Important: The information in this document is Not Recommended and should not be used for new development.

Current information on this Reference Library topic can be found here:

68K Open Transport Code on Power Macintoshes


Q: I'm writing some test code using OTStreamOpen. When I compile this code for PowerPC and run it on a Power Macintosh, it works just fine. When I compile this code for 68K and run it on a 68K, it also works fine. When I compile it for 68K and run it on a PPC, my application quits immediately. What's going on?

A: Open Transport has special Mixed Mode glue that allows 68K clients to run successfully on Power Macintosh computers. This glue is only available for a subset of the Open Transport API routines. This has caused some confusion, which the OT 1.1.1 SDK attempts to correct by placing the routines in distinct header files.

The only routines that are callable by 68K clients running emulated on PPC machines are those defined in "OpenTransport.h", "OpenTptAppleTalk.h" and "OpenTptInternet.h". All routines defined in all other header files (specifically those in "OpenTptClient.h" and "OpenTptCommon.h") are available only to PPC-native clients on PPC machines, or 68K clients on 68K machines.

In addition, non-application code (such as OT modules, drivers, port scanner and configurators) will only run under the native architecture. For example, it's not possible to compile an OT driver as 68K code and have it run on a PPC.

In general, we recommend that you build all your Open Transport application code fat, both to run as quickly as possible and to guarantee future compatibility (see Technical Q&A NW 40).

[Mar 14 1997]