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 B - Result Codes

This appendix lists the result codes that Open Transport (preferred-C) functions return, as shown in Table B-1. For information about XTI result codes, refer to the X/Open Transport Interface specification.


Table B-1  Open Transport result codes

Result codeValue    Meaning
kOTNoError0The function completed execution without error.
kOTBadAddressErr-3150The specified protocol address was in an incorrect format or contained illegal information. For TCP/IP this means that the address does not exist in the specified domain.
kOTBadOptionErr-3151The specified protocol options were in an incorrect format or contained illegal information.
kOTAccessErr-3152You do not have permission to negotiate the specified address or options.
kOTBadReferenceErr-3153The specified provider reference does not refer to a valid provider.
kOTNoAddressErr-3154You failed to supply an address, or the endpoint could not allocate an address.
kOTOutStateErr-3155The endpoint was not in an appropriate state when you called this function.
kOTBadSequenceErr-3156You specified an invalid sequence number or a NULL pointer for the call parameter when rejecting a connection request.
kOTLookErr-3158An asynchronous event has occurred. If the event has occurred for an endpoint, you can use the OTLook function to find out what event it was; your notifier function will also get an asynchronous event. If the event has occurred for a provider other than an endpoint, the notifier function installed for that provider must handle the asynchronous event.
kOTBadDataErr-3159The amount of data you specified was not within the bounds allowed by the endpoint.
kOTBufferOverflowErr-3160The buffer you allocated to store information when this function returns is not sufficiently large to store the incoming data.
kOTFlowErr-3161The endpoint is in asynchronous mode, but the flow-control mechanism prevents the endpoint from accepting or sending any data at this time.
kOTNoDataErr-3162For an endpoint or mapper, this result is returned when you try to read data but the endpoint is in asynchronous, or is in nonblocking mode, and no data is currently available.

For a mapper, this result is returned by the OTLookupName function when no names are found. 

kOTNoDisconnectErr-3163No disconnection indication is available.
kOTNoUDErrErr-3164No unit data error indication currently exists on this endpoint.
kOTBadFlagErr-3165You specified an invalid flag value.
kOTNoReleaseErr-3166No orderly release indication currently exists on this endpoint.
kOTNotSupportedErr-3167This action is not supported by this endpoint.
kOTStateChangeErr-3168The endpoint is undergoing a transient state change. This error is returned when you call a function while an endpoint is in the process of changing states. You should wait for an event indicating the endpoint has finished changing state and call the function again. (Note that the equivalent XTI state-change error code, TSTATECHNG, is not described in the 1992 X/Open XTI specification.) The provider also returns this error if you attempt to call an "incompatible" function while another operation is still ongoing; for example if you call the function OTSndUData while a call to the OTOptionManagement function is still outstanding.
kOTStructureTypeErr-3169You specified an unsupported structure type for the structType parameter of the OTAlloc or OTFree function. This error is also returned when the structType structure you specify is inconsistent with the endpoint type.
kOTBadNameErr-3170You specified an invalid endpoint name. This error is returned by the TCP/IP domain name resolver (DNR) if you specify a bad host name.
kOTBadQLenErr-3171You are using this endpoint to listen for connection requests, but when you bound the endpoint, you specified 0 for the qlen field. If you want to use an endpoint to listen for connection requests, the value of the qlen field must be greater than 0.
kOTAddressBusyErr-3172As a return value for a call to the OTBind function, this error code indicates one of the following conditions: 1) no dynamic addresses are available for protocols or configuration methods that allow dynamic addressing, 2) you are attempting to bind two connectionless endpoints to the same address, or 3) you are attempting to bind two connection-oriented endpoints to the same address and with a qlen field greater than 0.
kOTIndOutErr-3173There are outstanding connection indications on the endpoint, and you are accepting a connection on this endpoint. When accepting a connection on an endpoint that is listening for connection requests, you must have responded to all outstanding requests either by rejecting them with the OTSndDisconnect function or by accepting them with the OTAccept function.
kOTProviderMismatchErr-3174The endpoint that is to accept the connection is not the same kind of endpoint as the endpoint listening for the connection. The listening and accepting endpoints must be the same kind.
kOTResQLenErr-3175When this endpoint was bound, the qlen field was set to a value greater than 0. But to accept a connection on an alternate endpoint that is bound to the same address, such as this one, the endpoint must be bound with a qlen parameter equal to 0.
kOTResAddressErr-3176The address to which this endpoint is bound differs from that of the endpoint that received the connection request; thus, this endpoint cannot accept this connection request.
kOTQFullErr-3177The maximum number of outstanding indications, as specified by the value of the qlen field you used when you bound the endpoint, has been reached for the endpoint.
kOTProtocolErr-3178An unspecified protocol error occurred. This is usually fatal. Normal recovery is to close the provider.
kOTBadSyncErr-3179You attempted a synchronous call at hardware or deferred task level, or you made an Open Transport call at hardware interrupt time. Note that Open Transport cannot always detect this condition, so you cannot rely on getting this error. If undetected, your system could crash.
kOTCanceledErr-3180A provider function never finished executing because the provider was closed or because the function was synchronous and synchronous functions were cancelled.
kOTNotFoundErrkENOENTErr-3201Requested information does not exist.

This error literally means no such file or directory. In XTI (and Open Transport), a function returns this result when you try to open an endpoint or mapper that does not exist in the system, or to operate on any other entity that was not found.

kENIOErr-3204An I/O error occurred.
kENXIOErr-3205No such device or address.
kEBADFErr-3208The provider reference or stream reference supplied to the function was not valid.
kEAGAINErr-3210A provider is in non-blocking mode and cannot perform this operation now; Open Transport would have to block to complete the request. Try again later.
kENOMEMErrkOTOutOfMemoryErr-3211Open Transport cannot allocate enough memory to meet your request.

Open Transport has run out of internal memory. This might happen, for example, if you are doing a lot of asynchronous sends and not acknowledging sends, which means that Open Transport has to copy the data being sent into its own internal buffers.

kEBUSYErr-3215The device you are trying to access is busy and could not complete your request.
kOTDuplicateFoundErr-3216You are attempting to register a port or other entity that already exists.
kEINVALErr-3221You attempted an invalid operation, or you passed an invalid parameter.
kEDEADLKErr-3234In order to complete the requested operation, the endpoint provider would have to block, and the endpoint is in nonblocking mode.
kEADDRINUSEErr-3247The address is in use and is not available for the current function.
kEADDRNOTAVAILErr-3248The address is not available or the requested address is not appropriate for the current function because the function requires a multicast address.
kENETDOWNErr-3249TCP/IP error. The path to a network number is currently unavailable.
kENETUNREACHErr-3250TCP/IP error. The path to a network number does not exist.
kENETRESETErr-3251Unknown.
kECONNABORTEDErr-3252Unknown.
kECONNRESETErr-3253The connection was reset, possibly due to a problem with security and authentication.
kENOBUFSErr-3254The operation failed because no buffer space was available.
kEISCONNErr-3255Reserved.
kENOTCONNErr-3256Reserved.
kESHUTDOWNErr-3257An operation was aborted because the machine is shutting down. This error code is also used by sockets.
kETOOMANYREFSErr-3258Unused error code.
kETIMEDOUTErr-3259The requested operation timed out.
kECONNREFUSEDErr-3260TCP/IP error code. The port is unreachable (as opposed to the host being unreachable).

The positive version of this error code (kECONNREFUSED) is returned by Open Transport as a reason code in a disconnect message, indicating that the other side refused the connection.

kEHOSTDOWNErr-3263TCP/IP error. A host address is currently unavailable.
kEHOSTUNREACHErr-3264TCP/IP error. A host address cannot be reached.
kEPROTOErr-3269A catastrophic error has occurred which probably renders the underlying stream unusable. This error is the same as the kTPROTOErr, but is used where an XTI error code is not appropriate.
kETIMEErr-3270An Ioctlcommand has timed out instead of completing normally.
kENOSRErr-3271Open Transport cannot allocate enough system resources (usually stream messages) to meet your request.
kOTClientNotInittedErr-3279The client has not called the InitOpenTransport function or the InitOpenTransportUtilities function.
kOTPortHasDiedErr-3280Your notifier is sent the event kOTProviderIsClosed and returns this result code if a port that your provider is using is disabled because it was unregistered.
kOTPortWasEjectedErr-3281Your notifier is sent the event kOTProviderIsClosed and returns this result code if a port  
kOTBadConfigurationErr-3282Open Transport is attempting to bring up the TCP/IP stack but can't because it's improperly configured in the TCP/IP control panel.
kOTConfigurationChangedErr    -3283This is an event code that's sent to the client's notifier (the one you register with the OTRegisterAsClient function) when various AppleTalk-related things (like the current zone) change.
kOTUserRequestedErr-3284Your notifier is sent the event kOTProviderIsClosed and returns this result code if a port that your provider is using is disabled because the user switched  
kOTPortLostConnection-3285Your notifier is sent the event kOTProviderIsClosed and returns this result code if a port that your provider is using is disabled because it lost the  


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998