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: Jani Monoses <jani@iv.ro>
RodColeman 0:8f5825f330b0 30 *
RodColeman 0:8f5825f330b0 31 */
RodColeman 0:8f5825f330b0 32
RodColeman 0:8f5825f330b0 33 #ifndef __LWIP_IP_FRAG_H__
RodColeman 0:8f5825f330b0 34 #define __LWIP_IP_FRAG_H__
RodColeman 0:8f5825f330b0 35
RodColeman 0:8f5825f330b0 36 #include "lwip/opt.h"
RodColeman 0:8f5825f330b0 37 #include "lwip/err.h"
RodColeman 0:8f5825f330b0 38 #include "lwip/pbuf.h"
RodColeman 0:8f5825f330b0 39 #include "lwip/netif.h"
RodColeman 0:8f5825f330b0 40 #include "lwip/ip_addr.h"
RodColeman 0:8f5825f330b0 41 #include "lwip/ip.h"
RodColeman 0:8f5825f330b0 42
RodColeman 0:8f5825f330b0 43 #ifdef __cplusplus
RodColeman 0:8f5825f330b0 44 extern "C" {
RodColeman 0:8f5825f330b0 45 #endif
RodColeman 0:8f5825f330b0 46
RodColeman 0:8f5825f330b0 47 #if IP_REASSEMBLY
RodColeman 0:8f5825f330b0 48 /* The IP reassembly timer interval in milliseconds. */
RodColeman 0:8f5825f330b0 49 #define IP_TMR_INTERVAL 1000
RodColeman 0:8f5825f330b0 50
RodColeman 0:8f5825f330b0 51 /* IP reassembly helper struct.
RodColeman 0:8f5825f330b0 52 * This is exported because memp needs to know the size.
RodColeman 0:8f5825f330b0 53 */
RodColeman 0:8f5825f330b0 54 struct ip_reassdata {
RodColeman 0:8f5825f330b0 55 struct ip_reassdata *next;
RodColeman 0:8f5825f330b0 56 struct pbuf *p;
RodColeman 0:8f5825f330b0 57 struct ip_hdr iphdr;
RodColeman 0:8f5825f330b0 58 u16_t datagram_len;
RodColeman 0:8f5825f330b0 59 u8_t flags;
RodColeman 0:8f5825f330b0 60 u8_t timer;
RodColeman 0:8f5825f330b0 61 };
RodColeman 0:8f5825f330b0 62
RodColeman 0:8f5825f330b0 63 void ip_reass_init(void);
RodColeman 0:8f5825f330b0 64 void ip_reass_tmr(void);
RodColeman 0:8f5825f330b0 65 struct pbuf * ip_reass(struct pbuf *p);
RodColeman 0:8f5825f330b0 66 #endif /* IP_REASSEMBLY */
RodColeman 0:8f5825f330b0 67
RodColeman 0:8f5825f330b0 68 #if IP_FRAG
RodColeman 0:8f5825f330b0 69 #if !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF
RodColeman 0:8f5825f330b0 70 /** A custom pbuf that holds a reference to another pbuf, which is freed
RodColeman 0:8f5825f330b0 71 * when this custom pbuf is freed. This is used to create a custom PBUF_REF
RodColeman 0:8f5825f330b0 72 * that points into the original pbuf. */
RodColeman 0:8f5825f330b0 73 struct pbuf_custom_ref {
RodColeman 0:8f5825f330b0 74 /** 'base class' */
RodColeman 0:8f5825f330b0 75 struct pbuf_custom pc;
RodColeman 0:8f5825f330b0 76 /** pointer to the original pbuf that is referenced */
RodColeman 0:8f5825f330b0 77 struct pbuf *original;
RodColeman 0:8f5825f330b0 78 };
RodColeman 0:8f5825f330b0 79 #endif /* !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF */
RodColeman 0:8f5825f330b0 80
RodColeman 0:8f5825f330b0 81 err_t ip_frag(struct pbuf *p, struct netif *netif, ip_addr_t *dest);
RodColeman 0:8f5825f330b0 82 #endif /* IP_FRAG */
RodColeman 0:8f5825f330b0 83
RodColeman 0:8f5825f330b0 84 #ifdef __cplusplus
RodColeman 0:8f5825f330b0 85 }
RodColeman 0:8f5825f330b0 86 #endif
RodColeman 0:8f5825f330b0 87
RodColeman 0:8f5825f330b0 88 #endif /* __LWIP_IP_FRAG_H__ */