Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers api.h Source File

api.h

Go to the documentation of this file.
00001 /**
00002  * @file
00003  * netconn API (to be used from non-TCPIP threads)
00004  */
00005 
00006 /*
00007  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without modification,
00011  * are permitted provided that the following conditions are met:
00012  *
00013  * 1. Redistributions of source code must retain the above copyright notice,
00014  *    this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright notice,
00016  *    this list of conditions and the following disclaimer in the documentation
00017  *    and/or other materials provided with the distribution.
00018  * 3. The name of the author may not be used to endorse or promote products
00019  *    derived from this software without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00022  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00023  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
00024  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00026  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00029  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00030  * OF SUCH DAMAGE.
00031  *
00032  * This file is part of the lwIP TCP/IP stack.
00033  *
00034  * Author: Adam Dunkels <adam@sics.se>
00035  *
00036  */
00037 #ifndef LWIP_HDR_API_H
00038 #define LWIP_HDR_API_H
00039 
00040 #include "lwip/opt.h"
00041 
00042 #if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
00043 /* Note: Netconn API is always available when sockets are enabled -
00044  * sockets are implemented on top of them */
00045 
00046 #include "lwip/arch.h"
00047 #include "lwip/netbuf.h"
00048 #include "lwip/sys.h"
00049 #include "lwip/ip_addr.h"
00050 #include "lwip/err.h"
00051 
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055 
00056 /* Throughout this file, IP addresses and port numbers are expected to be in
00057  * the same byte order as in the corresponding pcb.
00058  */
00059 
00060 /* Flags for netconn_write (u8_t) */
00061 #define NETCONN_NOFLAG      0x00
00062 #define NETCONN_NOCOPY      0x00 /* Only for source code compatibility */
00063 #define NETCONN_COPY        0x01
00064 #define NETCONN_MORE        0x02
00065 #define NETCONN_DONTBLOCK   0x04
00066 #define NETCONN_NOAUTORCVD  0x08 /* prevent netconn_recv_data_tcp() from updating the tcp window - must be done manually via netconn_tcp_recvd() */
00067 #define NETCONN_NOFIN       0x10 /* upper layer already received data, leave FIN in queue until called again */
00068 
00069 /* Flags for struct netconn.flags (u8_t) */
00070 /** This netconn had an error, don't block on recvmbox/acceptmbox any more */
00071 #define NETCONN_FLAG_MBOXCLOSED               0x01
00072 /** Should this netconn avoid blocking? */
00073 #define NETCONN_FLAG_NON_BLOCKING             0x02
00074 /** Was the last connect action a non-blocking one? */
00075 #define NETCONN_FLAG_IN_NONBLOCKING_CONNECT   0x04
00076 #if LWIP_NETCONN_FULLDUPLEX
00077   /** The mbox of this netconn is being deallocated, don't use it anymore */
00078 #define NETCONN_FLAG_MBOXINVALID              0x08
00079 #endif /* LWIP_NETCONN_FULLDUPLEX */
00080 /** If a nonblocking write has been rejected before, poll_tcp needs to
00081     check if the netconn is writable again */
00082 #define NETCONN_FLAG_CHECK_WRITESPACE         0x10
00083 #if LWIP_IPV6
00084 /** If this flag is set then only IPv6 communication is allowed on the
00085     netconn. As per RFC#3493 this features defaults to OFF allowing
00086     dual-stack usage by default. */
00087 #define NETCONN_FLAG_IPV6_V6ONLY              0x20
00088 #endif /* LWIP_IPV6 */
00089 #if LWIP_NETBUF_RECVINFO
00090 /** Received packet info will be recorded for this netconn */
00091 #define NETCONN_FLAG_PKTINFO                  0x40
00092 #endif /* LWIP_NETBUF_RECVINFO */
00093 /** A FIN has been received but not passed to the application yet */
00094 #define NETCONN_FIN_RX_PENDING                0x80
00095 
00096 /* Helpers to process several netconn_types by the same code */
00097 #define NETCONNTYPE_GROUP(t)         ((t)&0xF0)
00098 #define NETCONNTYPE_DATAGRAM(t)      ((t)&0xE0)
00099 #if LWIP_IPV6
00100 #define NETCONN_TYPE_IPV6            0x08
00101 #define NETCONNTYPE_ISIPV6(t)        (((t)&NETCONN_TYPE_IPV6) != 0)
00102 #define NETCONNTYPE_ISUDPLITE(t)     (((t)&0xF3) == NETCONN_UDPLITE)
00103 #define NETCONNTYPE_ISUDPNOCHKSUM(t) (((t)&0xF3) == NETCONN_UDPNOCHKSUM)
00104 #else /* LWIP_IPV6 */
00105 #define NETCONNTYPE_ISIPV6(t)        (0)
00106 #define NETCONNTYPE_ISUDPLITE(t)     ((t) == NETCONN_UDPLITE)
00107 #define NETCONNTYPE_ISUDPNOCHKSUM(t) ((t) == NETCONN_UDPNOCHKSUM)
00108 #endif /* LWIP_IPV6 */
00109 
00110 /** @ingroup netconn_common
00111  * Protocol family and type of the netconn
00112  */
00113 enum netconn_type {
00114   NETCONN_INVALID     = 0,
00115   /** TCP IPv4 */
00116   NETCONN_TCP         = 0x10,
00117 #if LWIP_IPV6
00118   /** TCP IPv6 */
00119   NETCONN_TCP_IPV6    = NETCONN_TCP | NETCONN_TYPE_IPV6 /* 0x18 */,
00120 #endif /* LWIP_IPV6 */
00121   /** UDP IPv4 */
00122   NETCONN_UDP         = 0x20,
00123   /** UDP IPv4 lite */
00124   NETCONN_UDPLITE     = 0x21,
00125   /** UDP IPv4 no checksum */
00126   NETCONN_UDPNOCHKSUM = 0x22,
00127 
00128 #if LWIP_IPV6
00129   /** UDP IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */
00130   NETCONN_UDP_IPV6         = NETCONN_UDP | NETCONN_TYPE_IPV6 /* 0x28 */,
00131   /** UDP IPv6 lite (dual-stack by default, unless you call @ref netconn_set_ipv6only) */
00132   NETCONN_UDPLITE_IPV6     = NETCONN_UDPLITE | NETCONN_TYPE_IPV6 /* 0x29 */,
00133   /** UDP IPv6 no checksum (dual-stack by default, unless you call @ref netconn_set_ipv6only) */
00134   NETCONN_UDPNOCHKSUM_IPV6 = NETCONN_UDPNOCHKSUM | NETCONN_TYPE_IPV6 /* 0x2a */,
00135 #endif /* LWIP_IPV6 */
00136 
00137   /** Raw connection IPv4 */
00138   NETCONN_RAW         = 0x40
00139 #if LWIP_IPV6
00140   /** Raw connection IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */
00141   , NETCONN_RAW_IPV6    = NETCONN_RAW | NETCONN_TYPE_IPV6 /* 0x48 */
00142 #endif /* LWIP_IPV6 */
00143 };
00144 
00145 /** Current state of the netconn. Non-TCP netconns are always
00146  * in state NETCONN_NONE! */
00147 enum netconn_state {
00148   NETCONN_NONE,
00149   NETCONN_WRITE,
00150   NETCONN_LISTEN,
00151   NETCONN_CONNECT,
00152   NETCONN_CLOSE
00153 };
00154 
00155 /** Used to inform the callback function about changes
00156  * 
00157  * Event explanation:
00158  * 
00159  * In the netconn implementation, there are three ways to block a client:
00160  * 
00161  * - accept mbox (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); in netconn_accept())
00162  * - receive mbox (sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); in netconn_recv_data())
00163  * - send queue is full (sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); in lwip_netconn_do_write())
00164  * 
00165  * The events have to be seen as events signaling the state of these mboxes/semaphores. For non-blocking
00166  * connections, you need to know in advance whether a call to a netconn function call would block or not,
00167  * and these events tell you about that.
00168  * 
00169  * RCVPLUS events say: Safe to perform a potentially blocking call call once more. 
00170  * They are counted in sockets - three RCVPLUS events for accept mbox means you are safe
00171  * to call netconn_accept 3 times without being blocked.
00172  * Same thing for receive mbox.
00173  * 
00174  * RCVMINUS events say: Your call to to a possibly blocking function is "acknowledged".
00175  * Socket implementation decrements the counter.
00176  * 
00177  * For TX, there is no need to count, its merely a flag. SENDPLUS means you may send something.
00178  * SENDPLUS occurs when enough data was delivered to peer so netconn_send() can be called again.
00179  * A SENDMINUS event occurs when the next call to a netconn_send() would be blocking.
00180  */
00181 enum netconn_evt {
00182   NETCONN_EVT_RCVPLUS,
00183   NETCONN_EVT_RCVMINUS,
00184   NETCONN_EVT_SENDPLUS,
00185   NETCONN_EVT_SENDMINUS,
00186   NETCONN_EVT_ERROR
00187 };
00188 
00189 #if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD)
00190 /** Used for netconn_join_leave_group() */
00191 enum netconn_igmp {
00192   NETCONN_JOIN,
00193   NETCONN_LEAVE
00194 };
00195 #endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */
00196 
00197 #if LWIP_DNS
00198 /* Used for netconn_gethostbyname_addrtype(), these should match the DNS_ADDRTYPE defines in dns.h */
00199 #define NETCONN_DNS_DEFAULT   NETCONN_DNS_IPV4_IPV6
00200 #define NETCONN_DNS_IPV4      0
00201 #define NETCONN_DNS_IPV6      1
00202 #define NETCONN_DNS_IPV4_IPV6 2 /* try to resolve IPv4 first, try IPv6 if IPv4 fails only */
00203 #define NETCONN_DNS_IPV6_IPV4 3 /* try to resolve IPv6 first, try IPv4 if IPv6 fails only */
00204 #endif /* LWIP_DNS */
00205 
00206 /* forward-declare some structs to avoid to include their headers */
00207 struct ip_pcb;
00208 struct tcp_pcb;
00209 struct udp_pcb;
00210 struct raw_pcb;
00211 struct netconn;
00212 struct api_msg;
00213 
00214 /** A callback prototype to inform about events for a netconn */
00215 typedef void (* netconn_callback)(struct netconn *, enum netconn_evt, u16_t len);
00216 
00217 /** A netconn descriptor */
00218 struct netconn {
00219   /** type of the netconn (TCP, UDP or RAW) */
00220   enum netconn_type type;
00221   /** current state of the netconn */
00222   enum netconn_state state;
00223   /** the lwIP internal protocol control block */
00224   union {
00225     struct ip_pcb  *ip;
00226     struct tcp_pcb *tcp;
00227     struct udp_pcb *udp;
00228     struct raw_pcb *raw;
00229   } pcb;
00230   /** the last asynchronous unreported error this netconn had */
00231   err_t pending_err;
00232 #if !LWIP_NETCONN_SEM_PER_THREAD
00233   /** sem that is used to synchronously execute functions in the core context */
00234   sys_sem_t op_completed;
00235 #endif
00236   /** mbox where received packets are stored until they are fetched
00237       by the netconn application thread (can grow quite big) */
00238   sys_mbox_t recvmbox;
00239 #if LWIP_TCP
00240   /** mbox where new connections are stored until processed
00241       by the application thread */
00242   sys_mbox_t acceptmbox;
00243 #endif /* LWIP_TCP */
00244 #if LWIP_NETCONN_FULLDUPLEX
00245   /** number of threads waiting on an mbox. This is required to unblock
00246       all threads when closing while threads are waiting. */
00247   int mbox_threads_waiting;
00248 #endif
00249   /** only used for socket layer */
00250 #if LWIP_SOCKET
00251   int socket;
00252 #endif /* LWIP_SOCKET */
00253 #if LWIP_SO_SNDTIMEO
00254   /** timeout to wait for sending data (which means enqueueing data for sending
00255       in internal buffers) in milliseconds */
00256   s32_t send_timeout;
00257 #endif /* LWIP_SO_RCVTIMEO */
00258 #if LWIP_SO_RCVTIMEO
00259   /** timeout in milliseconds to wait for new data to be received
00260       (or connections to arrive for listening netconns) */
00261   u32_t recv_timeout;
00262 #endif /* LWIP_SO_RCVTIMEO */
00263 #if LWIP_SO_RCVBUF
00264   /** maximum amount of bytes queued in recvmbox
00265       not used for TCP: adjust TCP_WND instead! */
00266   int recv_bufsize;
00267   /** number of bytes currently in recvmbox to be received,
00268       tested against recv_bufsize to limit bytes on recvmbox
00269       for UDP and RAW, used for FIONREAD */
00270   int recv_avail;
00271 #endif /* LWIP_SO_RCVBUF */
00272 #if LWIP_SO_LINGER
00273    /** values <0 mean linger is disabled, values > 0 are seconds to linger */
00274   s16_t linger;
00275 #endif /* LWIP_SO_LINGER */
00276   /** flags holding more netconn-internal state, see NETCONN_FLAG_* defines */
00277   u8_t flags;
00278 #if LWIP_TCP
00279   /** TCP: when data passed to netconn_write doesn't fit into the send buffer,
00280       this temporarily stores the message.
00281       Also used during connect and close. */
00282   struct api_msg *current_msg;
00283 #endif /* LWIP_TCP */
00284   /** A callback function that is informed about events for this netconn */
00285   netconn_callback callback;
00286 };
00287 
00288 /** This vector type is passed to @ref netconn_write_vectors_partly to send
00289  * multiple buffers at once.
00290  * ATTENTION: This type has to directly map struct iovec since one is casted
00291  *            into the other!
00292  */
00293 struct netvector {
00294   /** pointer to the application buffer that contains the data to send */
00295   const void *ptr;
00296   /** size of the application data to send */
00297   size_t len;
00298 };
00299 
00300 /** Register an Network connection event */
00301 #define API_EVENT(c,e,l) if (c->callback) {         \
00302                            (*c->callback)(c, e, l); \
00303                          }
00304 
00305 /* Network connection functions: */
00306 
00307 /** @ingroup netconn_common
00308  * Create new netconn connection
00309  * @param t @ref netconn_type */
00310 #define netconn_new(t)                  netconn_new_with_proto_and_callback(t, 0, NULL)
00311 #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c)
00312 struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
00313                                              netconn_callback callback);
00314 err_t   netconn_prepare_delete(struct netconn *conn);
00315 err_t   netconn_delete(struct netconn *conn);
00316 /** Get the type of a netconn (as enum netconn_type). */
00317 #define netconn_type(conn) (conn->type)
00318 
00319 err_t   netconn_getaddr(struct netconn *conn, ip_addr_t *addr,
00320                         u16_t *port, u8_t local);
00321 /** @ingroup netconn_common */
00322 #define netconn_peer(c,i,p) netconn_getaddr(c,i,p,0)
00323 /** @ingroup netconn_common */
00324 #define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1)
00325 
00326 err_t   netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port);
00327 err_t   netconn_bind_if(struct netconn *conn, u8_t if_idx);
00328 err_t   netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port);
00329 err_t   netconn_disconnect (struct netconn *conn);
00330 err_t   netconn_listen_with_backlog(struct netconn *conn, u8_t backlog);
00331 /** @ingroup netconn_tcp */
00332 #define netconn_listen(conn) netconn_listen_with_backlog(conn, TCP_DEFAULT_LISTEN_BACKLOG)
00333 err_t   netconn_accept(struct netconn *conn, struct netconn **new_conn);
00334 err_t   netconn_recv(struct netconn *conn, struct netbuf **new_buf);
00335 err_t   netconn_recv_udp_raw_netbuf(struct netconn *conn, struct netbuf **new_buf);
00336 err_t   netconn_recv_udp_raw_netbuf_flags(struct netconn *conn, struct netbuf **new_buf, u8_t apiflags);
00337 err_t   netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf);
00338 err_t   netconn_recv_tcp_pbuf_flags(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags);
00339 err_t   netconn_tcp_recvd(struct netconn *conn, size_t len);
00340 err_t   netconn_sendto(struct netconn *conn, struct netbuf *buf,
00341                              const ip_addr_t *addr, u16_t port);
00342 err_t   netconn_send(struct netconn *conn, struct netbuf *buf);
00343 err_t   netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size,
00344                              u8_t apiflags, size_t *bytes_written);
00345 err_t   netconn_write_vectors_partly(struct netconn *conn, struct netvector *vectors, u16_t vectorcnt,
00346                                      u8_t apiflags, size_t *bytes_written);
00347 /** @ingroup netconn_tcp */
00348 #define netconn_write(conn, dataptr, size, apiflags) \
00349           netconn_write_partly(conn, dataptr, size, apiflags, NULL)
00350 err_t   netconn_close(struct netconn *conn);
00351 err_t   netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx);
00352 
00353 #if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD)
00354 err_t   netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr,
00355                              const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave);
00356 err_t   netconn_join_leave_group_netif(struct netconn *conn, const ip_addr_t *multiaddr,
00357                              u8_t if_idx, enum netconn_igmp join_or_leave);
00358 #endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */
00359 #if LWIP_DNS
00360 #if LWIP_IPV4 && LWIP_IPV6
00361 err_t   netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype);
00362 #define netconn_gethostbyname(name, addr) netconn_gethostbyname_addrtype(name, addr, NETCONN_DNS_DEFAULT)
00363 #else /* LWIP_IPV4 && LWIP_IPV6 */
00364 err_t   netconn_gethostbyname(const char *name, ip_addr_t *addr);
00365 #define netconn_gethostbyname_addrtype(name, addr, dns_addrtype) netconn_gethostbyname(name, addr)
00366 #endif /* LWIP_IPV4 && LWIP_IPV6 */
00367 #endif /* LWIP_DNS */
00368 
00369 err_t   netconn_err(struct netconn *conn);
00370 #define netconn_recv_bufsize(conn)      ((conn)->recv_bufsize)
00371 
00372 #define netconn_set_flags(conn, set_flags)     do { (conn)->flags = (u8_t)((conn)->flags |  (set_flags)); } while(0)
00373 #define netconn_clear_flags(conn, clr_flags)   do { (conn)->flags = (u8_t)((conn)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0)
00374 #define netconn_is_flag_set(conn, flag)        (((conn)->flags & (flag)) != 0)
00375 
00376 /** Set the blocking status of netconn calls (@todo: write/send is missing) */
00377 #define netconn_set_nonblocking(conn, val)  do { if(val) { \
00378   netconn_set_flags(conn, NETCONN_FLAG_NON_BLOCKING); \
00379 } else { \
00380   netconn_clear_flags(conn, NETCONN_FLAG_NON_BLOCKING); }} while(0)
00381 /** Get the blocking status of netconn calls (@todo: write/send is missing) */
00382 #define netconn_is_nonblocking(conn)        (((conn)->flags & NETCONN_FLAG_NON_BLOCKING) != 0)
00383 
00384 #if LWIP_IPV6
00385 /** @ingroup netconn_common
00386  * TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY)
00387  */
00388 #define netconn_set_ipv6only(conn, val)  do { if(val) { \
00389   netconn_set_flags(conn, NETCONN_FLAG_IPV6_V6ONLY); \
00390 } else { \
00391   netconn_clear_flags(conn, NETCONN_FLAG_IPV6_V6ONLY); }} while(0)
00392 /** @ingroup netconn_common
00393  * TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY)
00394  */
00395 #define netconn_get_ipv6only(conn)        (((conn)->flags & NETCONN_FLAG_IPV6_V6ONLY) != 0)
00396 #endif /* LWIP_IPV6 */
00397 
00398 #if LWIP_SO_SNDTIMEO
00399 /** Set the send timeout in milliseconds */
00400 #define netconn_set_sendtimeout(conn, timeout)      ((conn)->send_timeout = (timeout))
00401 /** Get the send timeout in milliseconds */
00402 #define netconn_get_sendtimeout(conn)               ((conn)->send_timeout)
00403 #endif /* LWIP_SO_SNDTIMEO */
00404 #if LWIP_SO_RCVTIMEO
00405 /** Set the receive timeout in milliseconds */
00406 #define netconn_set_recvtimeout(conn, timeout)      ((conn)->recv_timeout = (timeout))
00407 /** Get the receive timeout in milliseconds */
00408 #define netconn_get_recvtimeout(conn)               ((conn)->recv_timeout)
00409 #endif /* LWIP_SO_RCVTIMEO */
00410 #if LWIP_SO_RCVBUF
00411 /** Set the receive buffer in bytes */
00412 #define netconn_set_recvbufsize(conn, recvbufsize)  ((conn)->recv_bufsize = (recvbufsize))
00413 /** Get the receive buffer in bytes */
00414 #define netconn_get_recvbufsize(conn)               ((conn)->recv_bufsize)
00415 #endif /* LWIP_SO_RCVBUF*/
00416 
00417 #if LWIP_NETCONN_SEM_PER_THREAD
00418 void netconn_thread_init(void);
00419 void netconn_thread_cleanup(void);
00420 #else /* LWIP_NETCONN_SEM_PER_THREAD */
00421 #define netconn_thread_init()
00422 #define netconn_thread_cleanup()
00423 #endif /* LWIP_NETCONN_SEM_PER_THREAD */
00424 
00425 #ifdef __cplusplus
00426 }
00427 #endif
00428 
00429 #endif /* LWIP_NETCONN || LWIP_SOCKET */
00430 
00431 #endif /* LWIP_HDR_API_H */