Trial code integration web page update with analogue data and ntp support

Dependencies:   NTPClient_NetServices mbed

Committer:
pmr1
Date:
Fri Aug 06 17:57:45 2010 +0000
Revision:
0:8cc2035bebfc

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pmr1 0:8cc2035bebfc 1 /*
pmr1 0:8cc2035bebfc 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
pmr1 0:8cc2035bebfc 3 * All rights reserved.
pmr1 0:8cc2035bebfc 4 *
pmr1 0:8cc2035bebfc 5 * Redistribution and use in source and binary forms, with or without modification,
pmr1 0:8cc2035bebfc 6 * are permitted provided that the following conditions are met:
pmr1 0:8cc2035bebfc 7 *
pmr1 0:8cc2035bebfc 8 * 1. Redistributions of source code must retain the above copyright notice,
pmr1 0:8cc2035bebfc 9 * this list of conditions and the following disclaimer.
pmr1 0:8cc2035bebfc 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
pmr1 0:8cc2035bebfc 11 * this list of conditions and the following disclaimer in the documentation
pmr1 0:8cc2035bebfc 12 * and/or other materials provided with the distribution.
pmr1 0:8cc2035bebfc 13 * 3. The name of the author may not be used to endorse or promote products
pmr1 0:8cc2035bebfc 14 * derived from this software without specific prior written permission.
pmr1 0:8cc2035bebfc 15 *
pmr1 0:8cc2035bebfc 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
pmr1 0:8cc2035bebfc 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
pmr1 0:8cc2035bebfc 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
pmr1 0:8cc2035bebfc 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
pmr1 0:8cc2035bebfc 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
pmr1 0:8cc2035bebfc 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
pmr1 0:8cc2035bebfc 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
pmr1 0:8cc2035bebfc 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
pmr1 0:8cc2035bebfc 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
pmr1 0:8cc2035bebfc 25 * OF SUCH DAMAGE.
pmr1 0:8cc2035bebfc 26 *
pmr1 0:8cc2035bebfc 27 * This file is part of the lwIP TCP/IP stack.
pmr1 0:8cc2035bebfc 28 *
pmr1 0:8cc2035bebfc 29 * Author: Adam Dunkels <adam@sics.se>
pmr1 0:8cc2035bebfc 30 *
pmr1 0:8cc2035bebfc 31 */
pmr1 0:8cc2035bebfc 32 #ifndef __LWIP_API_H__
pmr1 0:8cc2035bebfc 33 #define __LWIP_API_H__
pmr1 0:8cc2035bebfc 34
pmr1 0:8cc2035bebfc 35 #include "lwip/opt.h"
pmr1 0:8cc2035bebfc 36
pmr1 0:8cc2035bebfc 37 #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
pmr1 0:8cc2035bebfc 38
pmr1 0:8cc2035bebfc 39 #include <stddef.h> /* for size_t */
pmr1 0:8cc2035bebfc 40
pmr1 0:8cc2035bebfc 41 #include "lwip/netbuf.h"
pmr1 0:8cc2035bebfc 42 #include "lwip/sys.h"
pmr1 0:8cc2035bebfc 43 #include "lwip/ip_addr.h"
pmr1 0:8cc2035bebfc 44 #include "lwip/err.h"
pmr1 0:8cc2035bebfc 45
pmr1 0:8cc2035bebfc 46 #ifdef __cplusplus
pmr1 0:8cc2035bebfc 47 extern "C" {
pmr1 0:8cc2035bebfc 48 #endif
pmr1 0:8cc2035bebfc 49
pmr1 0:8cc2035bebfc 50 /* Throughout this file, IP addresses and port numbers are expected to be in
pmr1 0:8cc2035bebfc 51 * the same byte order as in the corresponding pcb.
pmr1 0:8cc2035bebfc 52 */
pmr1 0:8cc2035bebfc 53
pmr1 0:8cc2035bebfc 54 /* Flags for netconn_write (u8_t) */
pmr1 0:8cc2035bebfc 55 #define NETCONN_NOFLAG 0x00
pmr1 0:8cc2035bebfc 56 #define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */
pmr1 0:8cc2035bebfc 57 #define NETCONN_COPY 0x01
pmr1 0:8cc2035bebfc 58 #define NETCONN_MORE 0x02
pmr1 0:8cc2035bebfc 59 #define NETCONN_DONTBLOCK 0x04
pmr1 0:8cc2035bebfc 60
pmr1 0:8cc2035bebfc 61 /* Flags for struct netconn.flags (u8_t) */
pmr1 0:8cc2035bebfc 62 /** TCP: when data passed to netconn_write doesn't fit into the send buffer,
pmr1 0:8cc2035bebfc 63 this temporarily stores whether to wake up the original application task
pmr1 0:8cc2035bebfc 64 if data couldn't be sent in the first try. */
pmr1 0:8cc2035bebfc 65 #define NETCONN_FLAG_WRITE_DELAYED 0x01
pmr1 0:8cc2035bebfc 66 /** Should this netconn avoid blocking? */
pmr1 0:8cc2035bebfc 67 #define NETCONN_FLAG_NON_BLOCKING 0x02
pmr1 0:8cc2035bebfc 68 /** Was the last connect action a non-blocking one? */
pmr1 0:8cc2035bebfc 69 #define NETCONN_FLAG_IN_NONBLOCKING_CONNECT 0x04
pmr1 0:8cc2035bebfc 70 /** If this is set, a TCP netconn must call netconn_recved() to update
pmr1 0:8cc2035bebfc 71 the TCP receive window (done automatically if not set). */
pmr1 0:8cc2035bebfc 72 #define NETCONN_FLAG_NO_AUTO_RECVED 0x08
pmr1 0:8cc2035bebfc 73 /** If a nonblocking write has been rejected before, poll_tcp needs to
pmr1 0:8cc2035bebfc 74 check if the netconn is writable again */
pmr1 0:8cc2035bebfc 75 #define NETCONN_FLAG_CHECK_WRITESPACE 0x10
pmr1 0:8cc2035bebfc 76
pmr1 0:8cc2035bebfc 77
pmr1 0:8cc2035bebfc 78 /* Helpers to process several netconn_types by the same code */
pmr1 0:8cc2035bebfc 79 #define NETCONNTYPE_GROUP(t) (t&0xF0)
pmr1 0:8cc2035bebfc 80 #define NETCONNTYPE_DATAGRAM(t) (t&0xE0)
pmr1 0:8cc2035bebfc 81
pmr1 0:8cc2035bebfc 82 /** Protocol family and type of the netconn */
pmr1 0:8cc2035bebfc 83 enum netconn_type {
pmr1 0:8cc2035bebfc 84 NETCONN_INVALID = 0,
pmr1 0:8cc2035bebfc 85 /* NETCONN_TCP Group */
pmr1 0:8cc2035bebfc 86 NETCONN_TCP = 0x10,
pmr1 0:8cc2035bebfc 87 /* NETCONN_UDP Group */
pmr1 0:8cc2035bebfc 88 NETCONN_UDP = 0x20,
pmr1 0:8cc2035bebfc 89 NETCONN_UDPLITE = 0x21,
pmr1 0:8cc2035bebfc 90 NETCONN_UDPNOCHKSUM= 0x22,
pmr1 0:8cc2035bebfc 91 /* NETCONN_RAW Group */
pmr1 0:8cc2035bebfc 92 NETCONN_RAW = 0x40
pmr1 0:8cc2035bebfc 93 };
pmr1 0:8cc2035bebfc 94
pmr1 0:8cc2035bebfc 95 /** Current state of the netconn. Non-TCP netconns are always
pmr1 0:8cc2035bebfc 96 * in state NETCONN_NONE! */
pmr1 0:8cc2035bebfc 97 enum netconn_state {
pmr1 0:8cc2035bebfc 98 NETCONN_NONE,
pmr1 0:8cc2035bebfc 99 NETCONN_WRITE,
pmr1 0:8cc2035bebfc 100 NETCONN_LISTEN,
pmr1 0:8cc2035bebfc 101 NETCONN_CONNECT,
pmr1 0:8cc2035bebfc 102 NETCONN_CLOSE
pmr1 0:8cc2035bebfc 103 };
pmr1 0:8cc2035bebfc 104
pmr1 0:8cc2035bebfc 105 /** Use to inform the callback function about changes */
pmr1 0:8cc2035bebfc 106 enum netconn_evt {
pmr1 0:8cc2035bebfc 107 NETCONN_EVT_RCVPLUS,
pmr1 0:8cc2035bebfc 108 NETCONN_EVT_RCVMINUS,
pmr1 0:8cc2035bebfc 109 NETCONN_EVT_SENDPLUS,
pmr1 0:8cc2035bebfc 110 NETCONN_EVT_SENDMINUS,
pmr1 0:8cc2035bebfc 111 NETCONN_EVT_ERROR
pmr1 0:8cc2035bebfc 112 };
pmr1 0:8cc2035bebfc 113
pmr1 0:8cc2035bebfc 114 #if LWIP_IGMP
pmr1 0:8cc2035bebfc 115 /** Used for netconn_join_leave_group() */
pmr1 0:8cc2035bebfc 116 enum netconn_igmp {
pmr1 0:8cc2035bebfc 117 NETCONN_JOIN,
pmr1 0:8cc2035bebfc 118 NETCONN_LEAVE
pmr1 0:8cc2035bebfc 119 };
pmr1 0:8cc2035bebfc 120 #endif /* LWIP_IGMP */
pmr1 0:8cc2035bebfc 121
pmr1 0:8cc2035bebfc 122 /* forward-declare some structs to avoid to include their headers */
pmr1 0:8cc2035bebfc 123 struct ip_pcb;
pmr1 0:8cc2035bebfc 124 struct tcp_pcb;
pmr1 0:8cc2035bebfc 125 struct udp_pcb;
pmr1 0:8cc2035bebfc 126 struct raw_pcb;
pmr1 0:8cc2035bebfc 127 struct netconn;
pmr1 0:8cc2035bebfc 128 struct api_msg_msg;
pmr1 0:8cc2035bebfc 129
pmr1 0:8cc2035bebfc 130 /** A callback prototype to inform about events for a netconn */
pmr1 0:8cc2035bebfc 131 typedef void (* netconn_callback)(struct netconn *, enum netconn_evt, u16_t len);
pmr1 0:8cc2035bebfc 132
pmr1 0:8cc2035bebfc 133 /** A netconn descriptor */
pmr1 0:8cc2035bebfc 134 struct netconn {
pmr1 0:8cc2035bebfc 135 /** type of the netconn (TCP, UDP or RAW) */
pmr1 0:8cc2035bebfc 136 enum netconn_type type;
pmr1 0:8cc2035bebfc 137 /** current state of the netconn */
pmr1 0:8cc2035bebfc 138 enum netconn_state state;
pmr1 0:8cc2035bebfc 139 /** the lwIP internal protocol control block */
pmr1 0:8cc2035bebfc 140 union {
pmr1 0:8cc2035bebfc 141 struct ip_pcb *ip;
pmr1 0:8cc2035bebfc 142 struct tcp_pcb *tcp;
pmr1 0:8cc2035bebfc 143 struct udp_pcb *udp;
pmr1 0:8cc2035bebfc 144 struct raw_pcb *raw;
pmr1 0:8cc2035bebfc 145 } pcb;
pmr1 0:8cc2035bebfc 146 /** the last error this netconn had */
pmr1 0:8cc2035bebfc 147 err_t last_err;
pmr1 0:8cc2035bebfc 148 /** sem that is used to synchroneously execute functions in the core context */
pmr1 0:8cc2035bebfc 149 sys_sem_t op_completed;
pmr1 0:8cc2035bebfc 150 /** mbox where received packets are stored until they are fetched
pmr1 0:8cc2035bebfc 151 by the netconn application thread (can grow quite big) */
pmr1 0:8cc2035bebfc 152 sys_mbox_t recvmbox;
pmr1 0:8cc2035bebfc 153 /** mbox where new connections are stored until processed
pmr1 0:8cc2035bebfc 154 by the application thread */
pmr1 0:8cc2035bebfc 155 sys_mbox_t acceptmbox;
pmr1 0:8cc2035bebfc 156 /** only used for socket layer */
pmr1 0:8cc2035bebfc 157 #if LWIP_SOCKET
pmr1 0:8cc2035bebfc 158 int socket;
pmr1 0:8cc2035bebfc 159 #endif /* LWIP_SOCKET */
pmr1 0:8cc2035bebfc 160 #if LWIP_SO_RCVTIMEO
pmr1 0:8cc2035bebfc 161 /** timeout to wait for new data to be received
pmr1 0:8cc2035bebfc 162 (or connections to arrive for listening netconns) */
pmr1 0:8cc2035bebfc 163 int recv_timeout;
pmr1 0:8cc2035bebfc 164 #endif /* LWIP_SO_RCVTIMEO */
pmr1 0:8cc2035bebfc 165 #if LWIP_SO_RCVBUF
pmr1 0:8cc2035bebfc 166 /** maximum amount of bytes queued in recvmbox
pmr1 0:8cc2035bebfc 167 not used for TCP: adjust TCP_WND instead! */
pmr1 0:8cc2035bebfc 168 int recv_bufsize;
pmr1 0:8cc2035bebfc 169 #endif /* LWIP_SO_RCVBUF */
pmr1 0:8cc2035bebfc 170 /** number of bytes currently in recvmbox to be received,
pmr1 0:8cc2035bebfc 171 tested against recv_bufsize to limit bytes on recvmbox
pmr1 0:8cc2035bebfc 172 for UDP and RAW
pmr1 0:8cc2035bebfc 173 @todo: should only be necessary with LWIP_SO_RCVBUF==1 */
pmr1 0:8cc2035bebfc 174 s16_t recv_avail;
pmr1 0:8cc2035bebfc 175 /** flags holding more netconn-internal state, see NETCONN_FLAG_* defines */
pmr1 0:8cc2035bebfc 176 u8_t flags;
pmr1 0:8cc2035bebfc 177 #if LWIP_TCP
pmr1 0:8cc2035bebfc 178 /** TCP: when data passed to netconn_write doesn't fit into the send buffer,
pmr1 0:8cc2035bebfc 179 this temporarily stores how much is already sent. */
pmr1 0:8cc2035bebfc 180 size_t write_offset;
pmr1 0:8cc2035bebfc 181 /** TCP: when data passed to netconn_write doesn't fit into the send buffer,
pmr1 0:8cc2035bebfc 182 this temporarily stores the message.
pmr1 0:8cc2035bebfc 183 Also used during connect and close. */
pmr1 0:8cc2035bebfc 184 struct api_msg_msg *current_msg;
pmr1 0:8cc2035bebfc 185 #endif /* LWIP_TCP */
pmr1 0:8cc2035bebfc 186 /** A callback function that is informed about events for this netconn */
pmr1 0:8cc2035bebfc 187 netconn_callback callback;
pmr1 0:8cc2035bebfc 188 };
pmr1 0:8cc2035bebfc 189
pmr1 0:8cc2035bebfc 190 /** Register an Network connection event */
pmr1 0:8cc2035bebfc 191 #define API_EVENT(c,e,l) if (c->callback) { \
pmr1 0:8cc2035bebfc 192 (*c->callback)(c, e, l); \
pmr1 0:8cc2035bebfc 193 }
pmr1 0:8cc2035bebfc 194
pmr1 0:8cc2035bebfc 195 /** Set conn->last_err to err but don't overwrite fatal errors */
pmr1 0:8cc2035bebfc 196 #define NETCONN_SET_SAFE_ERR(conn, err) do { \
pmr1 0:8cc2035bebfc 197 SYS_ARCH_DECL_PROTECT(lev); \
pmr1 0:8cc2035bebfc 198 SYS_ARCH_PROTECT(lev); \
pmr1 0:8cc2035bebfc 199 if (!ERR_IS_FATAL((conn)->last_err)) { \
pmr1 0:8cc2035bebfc 200 (conn)->last_err = err; \
pmr1 0:8cc2035bebfc 201 } \
pmr1 0:8cc2035bebfc 202 SYS_ARCH_UNPROTECT(lev); \
pmr1 0:8cc2035bebfc 203 } while(0);
pmr1 0:8cc2035bebfc 204
pmr1 0:8cc2035bebfc 205 /* Network connection functions: */
pmr1 0:8cc2035bebfc 206 #define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL)
pmr1 0:8cc2035bebfc 207 #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c)
pmr1 0:8cc2035bebfc 208 struct
pmr1 0:8cc2035bebfc 209 netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
pmr1 0:8cc2035bebfc 210 netconn_callback callback);
pmr1 0:8cc2035bebfc 211 err_t netconn_delete(struct netconn *conn);
pmr1 0:8cc2035bebfc 212 /** Get the type of a netconn (as enum netconn_type). */
pmr1 0:8cc2035bebfc 213 #define netconn_type(conn) (conn->type)
pmr1 0:8cc2035bebfc 214
pmr1 0:8cc2035bebfc 215 err_t netconn_getaddr(struct netconn *conn, ip_addr_t *addr,
pmr1 0:8cc2035bebfc 216 u16_t *port, u8_t local);
pmr1 0:8cc2035bebfc 217 #define netconn_peer(c,i,p) netconn_getaddr(c,i,p,0)
pmr1 0:8cc2035bebfc 218 #define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1)
pmr1 0:8cc2035bebfc 219
pmr1 0:8cc2035bebfc 220 err_t netconn_bind(struct netconn *conn, ip_addr_t *addr, u16_t port);
pmr1 0:8cc2035bebfc 221 err_t netconn_connect(struct netconn *conn, ip_addr_t *addr, u16_t port);
pmr1 0:8cc2035bebfc 222 err_t netconn_disconnect (struct netconn *conn);
pmr1 0:8cc2035bebfc 223 err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog);
pmr1 0:8cc2035bebfc 224 #define netconn_listen(conn) netconn_listen_with_backlog(conn, TCP_DEFAULT_LISTEN_BACKLOG)
pmr1 0:8cc2035bebfc 225 err_t netconn_accept(struct netconn *conn, struct netconn **new_conn);
pmr1 0:8cc2035bebfc 226 err_t netconn_recv(struct netconn *conn, struct netbuf **new_buf);
pmr1 0:8cc2035bebfc 227 err_t netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf);
pmr1 0:8cc2035bebfc 228 void netconn_recved(struct netconn *conn, u32_t length);
pmr1 0:8cc2035bebfc 229 err_t netconn_sendto(struct netconn *conn, struct netbuf *buf,
pmr1 0:8cc2035bebfc 230 ip_addr_t *addr, u16_t port);
pmr1 0:8cc2035bebfc 231 err_t netconn_send(struct netconn *conn, struct netbuf *buf);
pmr1 0:8cc2035bebfc 232 err_t netconn_write(struct netconn *conn, const void *dataptr, size_t size,
pmr1 0:8cc2035bebfc 233 u8_t apiflags);
pmr1 0:8cc2035bebfc 234 err_t netconn_close(struct netconn *conn);
pmr1 0:8cc2035bebfc 235
pmr1 0:8cc2035bebfc 236 #if LWIP_IGMP
pmr1 0:8cc2035bebfc 237 err_t netconn_join_leave_group(struct netconn *conn, ip_addr_t *multiaddr,
pmr1 0:8cc2035bebfc 238 ip_addr_t *netif_addr, enum netconn_igmp join_or_leave);
pmr1 0:8cc2035bebfc 239 #endif /* LWIP_IGMP */
pmr1 0:8cc2035bebfc 240 #if LWIP_DNS
pmr1 0:8cc2035bebfc 241 err_t netconn_gethostbyname(const char *name, ip_addr_t *addr);
pmr1 0:8cc2035bebfc 242 #endif /* LWIP_DNS */
pmr1 0:8cc2035bebfc 243
pmr1 0:8cc2035bebfc 244 #define netconn_err(conn) ((conn)->last_err)
pmr1 0:8cc2035bebfc 245 #define netconn_recv_bufsize(conn) ((conn)->recv_bufsize)
pmr1 0:8cc2035bebfc 246
pmr1 0:8cc2035bebfc 247 /** Set the blocking status of netconn calls (@todo: write/send is missing) */
pmr1 0:8cc2035bebfc 248 #define netconn_set_nonblocking(conn, val) do { if(val) { \
pmr1 0:8cc2035bebfc 249 (conn)->flags |= NETCONN_FLAG_NON_BLOCKING; \
pmr1 0:8cc2035bebfc 250 } else { \
pmr1 0:8cc2035bebfc 251 (conn)->flags &= ~ NETCONN_FLAG_NON_BLOCKING; }} while(0)
pmr1 0:8cc2035bebfc 252 /** Get the blocking status of netconn calls (@todo: write/send is missing) */
pmr1 0:8cc2035bebfc 253 #define netconn_is_nonblocking(conn) (((conn)->flags & NETCONN_FLAG_NON_BLOCKING) != 0)
pmr1 0:8cc2035bebfc 254
pmr1 0:8cc2035bebfc 255 /** TCP: Set the no-auto-recved status of netconn calls (see NETCONN_FLAG_NO_AUTO_RECVED) */
pmr1 0:8cc2035bebfc 256 #define netconn_set_noautorecved(conn, val) do { if(val) { \
pmr1 0:8cc2035bebfc 257 (conn)->flags |= NETCONN_FLAG_NO_AUTO_RECVED; \
pmr1 0:8cc2035bebfc 258 } else { \
pmr1 0:8cc2035bebfc 259 (conn)->flags &= ~ NETCONN_FLAG_NO_AUTO_RECVED; }} while(0)
pmr1 0:8cc2035bebfc 260 /** TCP: Get the no-auto-recved status of netconn calls (see NETCONN_FLAG_NO_AUTO_RECVED) */
pmr1 0:8cc2035bebfc 261 #define netconn_get_noautorecved(conn) (((conn)->flags & NETCONN_FLAG_NO_AUTO_RECVED) != 0)
pmr1 0:8cc2035bebfc 262
pmr1 0:8cc2035bebfc 263 #if LWIP_SO_RCVTIMEO
pmr1 0:8cc2035bebfc 264 /** Set the receive timeout in miliseconds */
pmr1 0:8cc2035bebfc 265 #define netconn_set_recvtimeout(conn, timeout) ((conn)->recv_timeout = (timeout))
pmr1 0:8cc2035bebfc 266 /** Get the receive timeout in miliseconds */
pmr1 0:8cc2035bebfc 267 #define netconn_get_recvtimeout(conn) ((conn)->recv_timeout)
pmr1 0:8cc2035bebfc 268 #endif /* LWIP_SO_RCVTIMEO */
pmr1 0:8cc2035bebfc 269 #if LWIP_SO_RCVBUF
pmr1 0:8cc2035bebfc 270 /** Set the receive buffer in bytes */
pmr1 0:8cc2035bebfc 271 #define netconn_set_recvbufsize(conn, recvbufsize) ((conn)->recv_bufsize = (recvbufsize))
pmr1 0:8cc2035bebfc 272 /** Get the receive buffer in bytes */
pmr1 0:8cc2035bebfc 273 #define netconn_get_recvbufsize(conn) ((conn)->recv_bufsize)
pmr1 0:8cc2035bebfc 274 #endif /* LWIP_SO_RCVBUF*/
pmr1 0:8cc2035bebfc 275
pmr1 0:8cc2035bebfc 276 #ifdef __cplusplus
pmr1 0:8cc2035bebfc 277 }
pmr1 0:8cc2035bebfc 278 #endif
pmr1 0:8cc2035bebfc 279
pmr1 0:8cc2035bebfc 280 #endif /* LWIP_NETCONN */
pmr1 0:8cc2035bebfc 281
pmr1 0:8cc2035bebfc 282 #endif /* __LWIP_API_H__ */