Netservices modded to read fragmented HTTP respsonse/payload from special purpose server - 180 bytes only

Committer:
RodColeman
Date:
Thu Sep 08 10:41:36 2011 +0000
Revision:
0:8f5825f330b0
setDataLen hacked to 180bytes

Who changed what in which revision?

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