Embedded TCP/IP stack: fnet_error.h Source File

FNET

fnet_error.h
1 /**************************************************************************
2 *
3 * Copyright 2011-2016 by Andrey Butok. FNET Community.
4 * Copyright 2008-2010 by Andrey Butok. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
9 * not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 *
20 ***************************************************************************
21 *
22 * Socket error API definitions.
23 *
24 ***************************************************************************/
25 #ifndef _FNET_ERROR_H_
26 
27 #define _FNET_ERROR_H_
28 
38 /**************************************************************************/
42 typedef enum
43 {
44  FNET_ERR_OK = (0),
51  FNET_ERR_NOMEM = (-3),
55  FNET_ERR_AGAIN = (-4),
67  FNET_ERR_INVAL = (-6),
135  FNET_ERR_ISCONN = (-19),
181 } fnet_error_t;
182 
183 #if defined(__cplusplus)
184 extern "C" {
185 #endif
186 
187 /***************************************************************************/
207 
208 /***************************************************************************/
223 void fnet_error_set( fnet_error_t error );
224 
225 #if defined(__cplusplus)
226 }
227 #endif
228 
231 #endif
Network subsystem is unavailable. The stack is not initialized.
Definition: fnet_error.h:161
The socket has not been bound with fnet_socket_bind(). A socket must be bound to an address before c...
Definition: fnet_error.h:63
The action is in progress. An operation was attempted on a socket that already had an operation in p...
Definition: fnet_error.h:148
Cannot allocate the memory. The error is indicating a lack of required memory resources.
Definition: fnet_error.h:51
fnet_error_t fnet_error_get(void)
Returns the last error that occurred.
No more socket descriptors are available. An application has opened too many sockets. The maximum number of available socket descriptors is defined by the FNET_CFG_SOCKET_MAX.
Definition: fnet_error.h:46
Connection reset by peer. A connection was forcibly closed by the remote host. This normally result...
Definition: fnet_error.h:125
Protocol not supported. This error occurs if an application attempts to call fnet_socket() and the r...
Definition: fnet_error.h:85
Socket is not connected. A request to send or receive data was not allowed because the socket is not...
Definition: fnet_error.h:139
Invalid argument. An invalid argument was supplied.
Definition: fnet_error.h:67
Software caused the connection abort. An established connection was aborted due to a data transmissi...
Definition: fnet_error.h:121
Operation not supported. The attempted operation is not supported for the type of socket referenced...
Definition: fnet_error.h:90
void fnet_error_set(fnet_error_t error)
Sets the error code.
Destination address required. A required address was omitted from an operation on a socket...
Definition: fnet_error.h:70
Cannot assign the requested address. The requested address is not valid in its context. It normally results from an attempt to fnet_socket_bind() to an address that is not valid for the local machine. This may also result from fnet_socket_connect(), when the remote address or port is not valid for a remote machine (for example address or port is 0).
Definition: fnet_error.h:109
Address family not supported by the protocol family. The stack supports only the AF_INET family...
Definition: fnet_error.h:96
Socket is already connected. A fnet_socket_connect() or fnet_socket_listen() request was made on an ...
Definition: fnet_error.h:135
The connection has timed out. A connection attempt failed because the connected party did not proper...
Definition: fnet_error.h:154
Message too long. A message sent on a datagram socket was larger than the internal message buffer...
Definition: fnet_error.h:75
Connection closed by peer. The final (FIN) segment arrived and there is no data in the socket recei...
Definition: fnet_error.h:164
Address already in use. This error occurs, if an application attempts to fnet_socket_bind() or fnet_...
Definition: fnet_error.h:102
There is no error.
Definition: fnet_error.h:44
fnet_error_t
Possible socket error codes, returned by the fnet_error_get(), or used by the SO_ERROR option...
Definition: fnet_error.h:42
The socket has been shut down. A request to send or receive data was not allowed because the socket ...
Definition: fnet_error.h:143
No route to a host. A socket operation was attempted to an unreachable host.
Definition: fnet_error.h:158
Bad protocol option. An unknown, invalid, or unsupported option or level was specified in the fnet_...
Definition: fnet_error.h:80
Try again, a retry at some time later may be successful. This error is returned from operations on s...
Definition: fnet_error.h:55
Bad socket descriptor. An operation was attempted on a socket descriptor that does not refer to a va...
Definition: fnet_error.h:177
IP operation is disabled. It happens when Duplicate Address Detection fails for interface link-loca...
Definition: fnet_error.h:172
The network is unreachable. This error occurs, if socket cannot function at this time...
Definition: fnet_error.h:116

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net