标签:des style http os io for ar art
The ERRNO values below are set when API calls fail. Use xn_getlasterror to retrieve the error code after an API call fails. Functionxn_geterror_string) can be used to retrieve the string name of a particular error code.
All errno values are defined in header file Rtipapi.h.
Endpoint address not available. This error occurs when a match for the requested address is not found in the routing table. Entries are added to the routing table by xn_set_ip and xn_rt_add.
Another socket is already bound to the address specified in bind. Make sure closesocket or xn_abort was called on the other socket bound to the same address. Note that closesocket can take a few minutes to release the socket. You can use socket option SO_REUSEADDR (seesetsockopt) to avoid this error.
Family not supported. This error occurs when the parameter family is not AF_INET for calls to socket.
ARP table full. This error is reported by send when the ARP cache is full. If this error occurs, increase CFG_ARPCLEN.
Invalid baud rate. This error occurs when an invalid baud rate is passed to xn_attach.
Invalid COM port number. This error occurs when an invalid COM port is passed to xn_attach. COM port numbers start at 1 for COM1.
Invalid device type. This error occurs when a bad device type, minor number is passed to xn_interface_open or xn_attach. There must be an entry in the Device Table which matches the device type, minor number passed to xn_interface_open or xn_attach.
Invalid interface number. This error occurs when an invalid interface number is passed to an API routine.
Invalid mask. This error is detected if an invalid mask (all FFs) is passed to xn_interface_open for an Ethernet interface.
Invalid ping response. This error occurs during xn_ping if an invalid response to a ping request is received. An invalid response is detected if the sequence number or the source IP address in the response is incorrect.
Connection refused. This error can occur during an attempt to connect a TCP socket. It is reported when a reset or an unexpected SYNC message is received.
Destination address is required. This error is detected when an address to connect to is invalid, i.e. the parameter to connect struct sockaddr * is NULL or the IP address or port number in struct sockaddr * is 0.
Destination unreachable (ICMP). This error occurs when an ICMP destination unreachable packet for the socket is received.
Invalid parameter (pointer is NULL, etc.).
Interface closed. An operation was attempted on a closed interface.
Interface table full. This error is detected by xn_attach or xn_interface_open when there is no free entry in the interface table. If this error occurs, increase CFG_NIFACES.
An attempt to open an interface failed. For Ethernet interfaces, the most frequent cause of this error is an incorrect I/O address, incorrect memory address or an incorrect interrupt number.
Socket is non-blocking but connect would block. A connect operation was done on a non-blocking socket. This is not actually an error. Useselect to wait for the connection to become established.
Invalid function call parameter.
Socket is already connected. This error is detected when a connect or listen call is made for a socket which is already connected or listening.
Multicast table full. An attempt to add an entry to the multicast table was made, but the table was full. If this error occurs, increaseCFG_MCLISTSIZE.
Multicast address not found. An attempt to delete an entry from the multicast table was made, but the entry was not in the table.
Out of ports. This error will occur if allocation of a port structure fails during a call to socket. RTIP-32 supports 16 TCP and 6 UDP ports. Check that the application calls xn_abort or closesocket after a socket is no longer needed. For TCP, make sure all the data in the input window has been read before the socket is closed.
Network is down. This error is reported if a send times out or the network is unable to transmit.
Network unreachable (keep alive failed). This error occurs when keep alive closes a TCP socket due to the remote host not responding to keep alive packets.
Out of DCUs (packet buffers). This error occurs when a DCU could not be allocated. This error could be caused by not enough DCUs being allocated (see CFG_NUM_PACKETS0 through CFG_NUM_PACKETS5), packets not being freed, or a task such as the IP task, is not getting a turn to run.
Option parameter is invalid. This error occurs when the option parameter to getsockopt or setsockopt is invalid.
Socket is not connected. This error occurs when an operation such as send or recv was performed on a socket which was in an invalid state for the attempted operation.
RTIP-32 not initialized. This error occurs when xn_rtip_init has not been called prior to calling an API routine.
Invalid socket descriptor. An invalid socket descriptor was passed to an API function. The socket descriptor returned by calls to socket oraccept needs to be passed to bind/connect/send, etc.
Not enough devices. There are not enough data structures allocated for a device, i.e. the minor number specified is larger than the number of devices supported.
Socket type or specified operation not supported for this function. This error is reported if the requested operation is not supported, such as the socket type is not TCP or UDP.
send failed due to output list being full. This error is reported by any API call which transmits a packet when the output list is full. The output list size is limited by calling xn_interface_opt using IO_MAX_OUTPUT_QUE.
Could not determine device. This error is reported by xn_interface_open when the type of Ethernet device cannot be determined.
A non-reentrant function was reentered. This error is detected if xn_bootp or xn_rarp is reentered.
Routing Table entry not found. This error is reported by xn_rt_del when the requested entry to delete is not in the routing table.
Routing table full. This error is reported by xn_set_ip or xn_rt_add when an entry cannot be added to the routing table because it is full. If more entries are needed, increase CFG_RTSIZE.
Initialize failed. This error is reported by xn_rtip_init if initialization of resources such as signals or semaphores, or spawning a task failed.
Illegal operation due to socket shutdown. An illegal operation was attempted on a socket which has had the operation disabled by a call toshutdown.
Timeout. An operation such as connect, recv orsend timed out. For TCP, this error could occur during a send operation if the remote host is not responding with acknowledgments. This could also occur if the remote host is not responding to an ARP request.
Type not supported. This error is detected by socket when the type of socket trying to allocate is not SOCK_STREAM (TCP) or SOCK_DGRAM (UDP).
send would ARP, but ARP is disabled. This error is detected when a send needs to determine an Ethernet address but ARP is disabled.
The socket is non-blocking, but the called function would block. This error is detected when a requested operation is not ready to be done, but the socket is set to a non-blocking mode. select can be used to wait with timeout for the operation to become ready.
A global table if full. The error can be generated when the device table, interface table, or arp cache table need to be extended.
xn_arp_remote was called, but no ARP request has been sent out as an ARP request is already pending.
xn_bind_xxx() not called for device which is being opened.
The global host table is full. An attempt by xn_add_host_table_entry was made to add an entry to the host table, but the table was full. The table has room for 6 hosts.
The host table entry was not found. An attempt to delete an entry in the host table failed since the entry was not in the host table.
The DNS server list is full. An attempt by xn_set_server_list to add a server to the server list failed because the table is full. The size of the DNS server table is 5.
A DNS server returned one of the following errors:
Unable to interpret inquiry.
Server refused the request due to policy reasons.
DNS name is too long. The host name returned by the server is longer 100 characters.
DNS call to socket function failed. The DNS server returned the error code "unsuccessful" due to a problem with the name server in response to a request.
Data not available. The DNS server returned error "requested name does not exist".
Socket call within DNS failed. A call to a socket routine failed, probably because no response was received from the server.
No DNS server in server table. The function xn_set_server_list needs to be called to set up a list of servers to send DNS requests to.
No ring received in specified time. This error occurs when no incoming call is detected in the given timeout.
Sending a character over a serial link failed.
Unexpected response from modem.
Chap secret table is full. The table used to hold secrets for CHAP has 5 slots.
PPP is not open for IP traffic. An attempt to send data over the PPP interface was made, but the IPCP is not enabled, i.e. the state of IPCP is not OPENED. xn_lcp_open needs to be called prior to calling xn_lcp_open if IP packets will be sent over the connection.
PPP line not up. An attempt to send data over a PPP interface was made, but the PPP connection was not up. Either xn_lcp_open was called after xn_lcp_open or xn_lcp_open did not succeed.
PPP link header missing. The buffer containing the PPP packet was invalid. This internal error should never occur.
PPP bad IP packet. This internal error should never occur.
PPP LCP open timed out. xn_lcp_open timed out before opening the connection. The amount of time to wait is controlled by a parameter toxn_lcp_open.
PPP Close timed out. The PPP open operation xn_lcp_open failed since the previous PPP close operation failed. Call xn_ppp_down to reset the state information before retrying xn_lcp_open.
Trap manager already in table. An attempt to add a trap manager to the trap manager table was made, but the specified manager is already in the table.
Trap manager table full. An attempt to add a trap manager to the trap manager table was made, but the table is full.
Trap manager not found in table. An attempt to delete a trap manager from the trap manager table was made, but the manager is not in the table.
SNMP could not send the complete error response. Sending the response to an SNMP request failed.
SNMP could not send trap since the parameter buffer was not large enough.
DHCP server not responding.
Bad response from DHCP server.
No DHCPOFFERS from DHCP server met the user‘s criteria.
Acknowledgment from DHCP server not received.
Nak not received from DHCP server.
Option not found in DHCP server response.
Size of DHCP option exceeds allocated buffer.
socket error code,布布扣,bubuko.com
标签:des style http os io for ar art
原文地址:http://my.oschina.net/miffa/blog/303868