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

Committer:
RodColeman
Date:
Thu Sep 08 10:48:09 2011 +0000
Revision:
0:850eacf3e945
revised fixed length to 178 bytes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RodColeman 0:850eacf3e945 1 /*
RodColeman 0:850eacf3e945 2 * Redistribution and use in source and binary forms, with or without modification,
RodColeman 0:850eacf3e945 3 * are permitted provided that the following conditions are met:
RodColeman 0:850eacf3e945 4 *
RodColeman 0:850eacf3e945 5 * 1. Redistributions of source code must retain the above copyright notice,
RodColeman 0:850eacf3e945 6 * this list of conditions and the following disclaimer.
RodColeman 0:850eacf3e945 7 * 2. Redistributions in binary form must reproduce the above copyright notice,
RodColeman 0:850eacf3e945 8 * this list of conditions and the following disclaimer in the documentation
RodColeman 0:850eacf3e945 9 * and/or other materials provided with the distribution.
RodColeman 0:850eacf3e945 10 * 3. The name of the author may not be used to endorse or promote products
RodColeman 0:850eacf3e945 11 * derived from this software without specific prior written permission.
RodColeman 0:850eacf3e945 12 *
RodColeman 0:850eacf3e945 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
RodColeman 0:850eacf3e945 14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
RodColeman 0:850eacf3e945 15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
RodColeman 0:850eacf3e945 16 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
RodColeman 0:850eacf3e945 17 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
RodColeman 0:850eacf3e945 18 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
RodColeman 0:850eacf3e945 19 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
RodColeman 0:850eacf3e945 20 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
RodColeman 0:850eacf3e945 21 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
RodColeman 0:850eacf3e945 22 * OF SUCH DAMAGE.
RodColeman 0:850eacf3e945 23 *
RodColeman 0:850eacf3e945 24 * This file is part of the lwIP TCP/IP stack.
RodColeman 0:850eacf3e945 25 *
RodColeman 0:850eacf3e945 26 */
RodColeman 0:850eacf3e945 27
RodColeman 0:850eacf3e945 28 #ifndef __LWIP_NETIFAPI_H__
RodColeman 0:850eacf3e945 29 #define __LWIP_NETIFAPI_H__
RodColeman 0:850eacf3e945 30
RodColeman 0:850eacf3e945 31 #include "lwip/opt.h"
RodColeman 0:850eacf3e945 32
RodColeman 0:850eacf3e945 33 #if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */
RodColeman 0:850eacf3e945 34
RodColeman 0:850eacf3e945 35 #include "lwip/sys.h"
RodColeman 0:850eacf3e945 36 #include "lwip/netif.h"
RodColeman 0:850eacf3e945 37 #include "lwip/dhcp.h"
RodColeman 0:850eacf3e945 38 #include "lwip/autoip.h"
RodColeman 0:850eacf3e945 39
RodColeman 0:850eacf3e945 40 #ifdef __cplusplus
RodColeman 0:850eacf3e945 41 extern "C" {
RodColeman 0:850eacf3e945 42 #endif
RodColeman 0:850eacf3e945 43
RodColeman 0:850eacf3e945 44 typedef void (*netifapi_void_fn)(struct netif *netif);
RodColeman 0:850eacf3e945 45 typedef err_t (*netifapi_errt_fn)(struct netif *netif);
RodColeman 0:850eacf3e945 46
RodColeman 0:850eacf3e945 47 struct netifapi_msg_msg {
RodColeman 0:850eacf3e945 48 #if !LWIP_TCPIP_CORE_LOCKING
RodColeman 0:850eacf3e945 49 sys_sem_t sem;
RodColeman 0:850eacf3e945 50 #endif /* !LWIP_TCPIP_CORE_LOCKING */
RodColeman 0:850eacf3e945 51 err_t err;
RodColeman 0:850eacf3e945 52 struct netif *netif;
RodColeman 0:850eacf3e945 53 union {
RodColeman 0:850eacf3e945 54 struct {
RodColeman 0:850eacf3e945 55 ip_addr_t *ipaddr;
RodColeman 0:850eacf3e945 56 ip_addr_t *netmask;
RodColeman 0:850eacf3e945 57 ip_addr_t *gw;
RodColeman 0:850eacf3e945 58 void *state;
RodColeman 0:850eacf3e945 59 netif_init_fn init;
RodColeman 0:850eacf3e945 60 netif_input_fn input;
RodColeman 0:850eacf3e945 61 } add;
RodColeman 0:850eacf3e945 62 struct {
RodColeman 0:850eacf3e945 63 netifapi_void_fn voidfunc;
RodColeman 0:850eacf3e945 64 netifapi_errt_fn errtfunc;
RodColeman 0:850eacf3e945 65 } common;
RodColeman 0:850eacf3e945 66 } msg;
RodColeman 0:850eacf3e945 67 };
RodColeman 0:850eacf3e945 68
RodColeman 0:850eacf3e945 69 struct netifapi_msg {
RodColeman 0:850eacf3e945 70 void (* function)(struct netifapi_msg_msg *msg);
RodColeman 0:850eacf3e945 71 struct netifapi_msg_msg msg;
RodColeman 0:850eacf3e945 72 };
RodColeman 0:850eacf3e945 73
RodColeman 0:850eacf3e945 74
RodColeman 0:850eacf3e945 75 /* API for application */
RodColeman 0:850eacf3e945 76 err_t netifapi_netif_add ( struct netif *netif,
RodColeman 0:850eacf3e945 77 ip_addr_t *ipaddr,
RodColeman 0:850eacf3e945 78 ip_addr_t *netmask,
RodColeman 0:850eacf3e945 79 ip_addr_t *gw,
RodColeman 0:850eacf3e945 80 void *state,
RodColeman 0:850eacf3e945 81 netif_init_fn init,
RodColeman 0:850eacf3e945 82 netif_input_fn input);
RodColeman 0:850eacf3e945 83
RodColeman 0:850eacf3e945 84 err_t netifapi_netif_set_addr ( struct netif *netif,
RodColeman 0:850eacf3e945 85 ip_addr_t *ipaddr,
RodColeman 0:850eacf3e945 86 ip_addr_t *netmask,
RodColeman 0:850eacf3e945 87 ip_addr_t *gw );
RodColeman 0:850eacf3e945 88
RodColeman 0:850eacf3e945 89 err_t netifapi_netif_common ( struct netif *netif,
RodColeman 0:850eacf3e945 90 netifapi_void_fn voidfunc,
RodColeman 0:850eacf3e945 91 netifapi_errt_fn errtfunc);
RodColeman 0:850eacf3e945 92
RodColeman 0:850eacf3e945 93 #define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL)
RodColeman 0:850eacf3e945 94 #define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL)
RodColeman 0:850eacf3e945 95 #define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL)
RodColeman 0:850eacf3e945 96 #define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL)
RodColeman 0:850eacf3e945 97 #define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start)
RodColeman 0:850eacf3e945 98 #define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL)
RodColeman 0:850eacf3e945 99 #define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start)
RodColeman 0:850eacf3e945 100 #define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop)
RodColeman 0:850eacf3e945 101
RodColeman 0:850eacf3e945 102 #ifdef __cplusplus
RodColeman 0:850eacf3e945 103 }
RodColeman 0:850eacf3e945 104 #endif
RodColeman 0:850eacf3e945 105
RodColeman 0:850eacf3e945 106 #endif /* LWIP_NETIF_API */
RodColeman 0:850eacf3e945 107
RodColeman 0:850eacf3e945 108 #endif /* __LWIP_NETIFAPI_H__ */