Legacy Documentclose button

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

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Appendix A - Open Transport and XTI


Result Codes

When an XTI-style function fails, it returns -1 to indicate an error has occurred, and the error is stored in the global variable t_errno. If the value of the error is TSYSERR, then the actual error can be found in the global variable errno. The XTI error numbers are small positive integers with defined constants for each; for example, TBADADDR or TFLOW.

When an Open Transport preferred-C function fails, the error code is returned as the result of the function. Open Transport does not use global variables to store error results and, to remain consistent with the Macintosh Toolbox, it specifies all errors as negative numbers. Open Transport result codes have names like kOTBadAddressErr and kOTFlowErr. There is a corresponding Open Transport result code for every XTI result code, as shown in Table A-6. For an explanation of Open Transport result codes, See Appendix B .


Table A-6  XTI-to-Open Transport result code cross-reference

XTI result code    Open Transport result code
TACCESkOTAccessErr
TADDRBUSYkOTAddressBusyErr
TBADADDRkOTBadAddressErr
TBADDATAkOTBadDataErr
TBADFkOTBadReferenceErr
TBADFLAGkOTBadFlagErr
TBADNAMEkOTBadNameErr
TBADOPTkOTBadOptionErr
TBADQLENkOTBadQLenErr
TBADSEQkOTBadSequenceErr
TBADSYNCkOTBadSyncErr
TBUFOVFLWkOTBufferOverflowErr
TCANCELEDkOTCanceledErr
TFLOWkOTFlowErr
TINDOUTkOTIndOutErr
TLOOKkOTLookErr
TNOADDRkOTNoAddressErr
TNODATAkOTNoDataErr
TNODISkOTNoDisconnectErr
TNORELkOTNoReleaseErr
TNOSTRUCTYPEkOTStructureTypeErr
TNOTSUPPORTkOTNotSupportedErr
TNOUDERRkOTNoUDErrErr
TOUTSTATEkOTOutStateErr
TPROTOkOTProtocolErr
TPROVMISMATCHkOTProviderMismatchErr
TQFULLkOTQFullErr
TRESADDRkOTResAddressErr
TRESQLENkOTResQLenErr
TSTATECHNGkOTStateChangeErr
TSUCCESSkOTNoErr
TSYSERRkOTSysErrorErr


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998