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_ARCH_H__
RodColeman 0:8f5825f330b0 33 #define __LWIP_ARCH_H__
RodColeman 0:8f5825f330b0 34
RodColeman 0:8f5825f330b0 35 #ifndef LITTLE_ENDIAN
RodColeman 0:8f5825f330b0 36 #define LITTLE_ENDIAN 1234
RodColeman 0:8f5825f330b0 37 #endif
RodColeman 0:8f5825f330b0 38
RodColeman 0:8f5825f330b0 39 #ifndef BIG_ENDIAN
RodColeman 0:8f5825f330b0 40 #define BIG_ENDIAN 4321
RodColeman 0:8f5825f330b0 41 #endif
RodColeman 0:8f5825f330b0 42
RodColeman 0:8f5825f330b0 43 #include "arch/cc.h"
RodColeman 0:8f5825f330b0 44
RodColeman 0:8f5825f330b0 45 /** Temporary: define format string for size_t if not defined in cc.h */
RodColeman 0:8f5825f330b0 46 #ifndef SZT_F
RodColeman 0:8f5825f330b0 47 #define SZT_F U32_F
RodColeman 0:8f5825f330b0 48 #endif /* SZT_F */
RodColeman 0:8f5825f330b0 49 /** Temporary upgrade helper: define format string for u8_t as hex if not
RodColeman 0:8f5825f330b0 50 defined in cc.h */
RodColeman 0:8f5825f330b0 51 #ifndef X8_F
RodColeman 0:8f5825f330b0 52 #define X8_F "02x"
RodColeman 0:8f5825f330b0 53 #endif /* X8_F */
RodColeman 0:8f5825f330b0 54
RodColeman 0:8f5825f330b0 55 #ifdef __cplusplus
RodColeman 0:8f5825f330b0 56 extern "C" {
RodColeman 0:8f5825f330b0 57 #endif
RodColeman 0:8f5825f330b0 58
RodColeman 0:8f5825f330b0 59 #ifndef PACK_STRUCT_BEGIN
RodColeman 0:8f5825f330b0 60 #define PACK_STRUCT_BEGIN
RodColeman 0:8f5825f330b0 61 #endif /* PACK_STRUCT_BEGIN */
RodColeman 0:8f5825f330b0 62
RodColeman 0:8f5825f330b0 63 #ifndef PACK_STRUCT_END
RodColeman 0:8f5825f330b0 64 #define PACK_STRUCT_END
RodColeman 0:8f5825f330b0 65 #endif /* PACK_STRUCT_END */
RodColeman 0:8f5825f330b0 66
RodColeman 0:8f5825f330b0 67 #ifndef PACK_STRUCT_FIELD
RodColeman 0:8f5825f330b0 68 #define PACK_STRUCT_FIELD(x) x
RodColeman 0:8f5825f330b0 69 #endif /* PACK_STRUCT_FIELD */
RodColeman 0:8f5825f330b0 70
RodColeman 0:8f5825f330b0 71
RodColeman 0:8f5825f330b0 72 #ifndef LWIP_UNUSED_ARG
RodColeman 0:8f5825f330b0 73 #define LWIP_UNUSED_ARG(x) (void)x
RodColeman 0:8f5825f330b0 74 #endif /* LWIP_UNUSED_ARG */
RodColeman 0:8f5825f330b0 75
RodColeman 0:8f5825f330b0 76
RodColeman 0:8f5825f330b0 77 #ifdef LWIP_PROVIDE_ERRNO
RodColeman 0:8f5825f330b0 78
RodColeman 0:8f5825f330b0 79 #define EPERM 1 /* Operation not permitted */
RodColeman 0:8f5825f330b0 80 #define ENOENT 2 /* No such file or directory */
RodColeman 0:8f5825f330b0 81 #define ESRCH 3 /* No such process */
RodColeman 0:8f5825f330b0 82 #define EINTR 4 /* Interrupted system call */
RodColeman 0:8f5825f330b0 83 #define EIO 5 /* I/O error */
RodColeman 0:8f5825f330b0 84 #define ENXIO 6 /* No such device or address */
RodColeman 0:8f5825f330b0 85 #define E2BIG 7 /* Arg list too long */
RodColeman 0:8f5825f330b0 86 #define ENOEXEC 8 /* Exec format error */
RodColeman 0:8f5825f330b0 87 #define EBADF 9 /* Bad file number */
RodColeman 0:8f5825f330b0 88 #define ECHILD 10 /* No child processes */
RodColeman 0:8f5825f330b0 89 #define EAGAIN 11 /* Try again */
RodColeman 0:8f5825f330b0 90 #define ENOMEM 12 /* Out of memory */
RodColeman 0:8f5825f330b0 91 #define EACCES 13 /* Permission denied */
RodColeman 0:8f5825f330b0 92 #define EFAULT 14 /* Bad address */
RodColeman 0:8f5825f330b0 93 #define ENOTBLK 15 /* Block device required */
RodColeman 0:8f5825f330b0 94 #define EBUSY 16 /* Device or resource busy */
RodColeman 0:8f5825f330b0 95 #define EEXIST 17 /* File exists */
RodColeman 0:8f5825f330b0 96 #define EXDEV 18 /* Cross-device link */
RodColeman 0:8f5825f330b0 97 #define ENODEV 19 /* No such device */
RodColeman 0:8f5825f330b0 98 #define ENOTDIR 20 /* Not a directory */
RodColeman 0:8f5825f330b0 99 #define EISDIR 21 /* Is a directory */
RodColeman 0:8f5825f330b0 100 #define EINVAL 22 /* Invalid argument */
RodColeman 0:8f5825f330b0 101 #define ENFILE 23 /* File table overflow */
RodColeman 0:8f5825f330b0 102 #define EMFILE 24 /* Too many open files */
RodColeman 0:8f5825f330b0 103 #define ENOTTY 25 /* Not a typewriter */
RodColeman 0:8f5825f330b0 104 #define ETXTBSY 26 /* Text file busy */
RodColeman 0:8f5825f330b0 105 #define EFBIG 27 /* File too large */
RodColeman 0:8f5825f330b0 106 #define ENOSPC 28 /* No space left on device */
RodColeman 0:8f5825f330b0 107 #define ESPIPE 29 /* Illegal seek */
RodColeman 0:8f5825f330b0 108 #define EROFS 30 /* Read-only file system */
RodColeman 0:8f5825f330b0 109 #define EMLINK 31 /* Too many links */
RodColeman 0:8f5825f330b0 110 #define EPIPE 32 /* Broken pipe */
RodColeman 0:8f5825f330b0 111 #define EDOM 33 /* Math argument out of domain of func */
RodColeman 0:8f5825f330b0 112 #define ERANGE 34 /* Math result not representable */
RodColeman 0:8f5825f330b0 113 #define EDEADLK 35 /* Resource deadlock would occur */
RodColeman 0:8f5825f330b0 114 #define ENAMETOOLONG 36 /* File name too long */
RodColeman 0:8f5825f330b0 115 #define ENOLCK 37 /* No record locks available */
RodColeman 0:8f5825f330b0 116 #define ENOSYS 38 /* Function not implemented */
RodColeman 0:8f5825f330b0 117 #define ENOTEMPTY 39 /* Directory not empty */
RodColeman 0:8f5825f330b0 118 #define ELOOP 40 /* Too many symbolic links encountered */
RodColeman 0:8f5825f330b0 119 #define EWOULDBLOCK EAGAIN /* Operation would block */
RodColeman 0:8f5825f330b0 120 #define ENOMSG 42 /* No message of desired type */
RodColeman 0:8f5825f330b0 121 #define EIDRM 43 /* Identifier removed */
RodColeman 0:8f5825f330b0 122 #define ECHRNG 44 /* Channel number out of range */
RodColeman 0:8f5825f330b0 123 #define EL2NSYNC 45 /* Level 2 not synchronized */
RodColeman 0:8f5825f330b0 124 #define EL3HLT 46 /* Level 3 halted */
RodColeman 0:8f5825f330b0 125 #define EL3RST 47 /* Level 3 reset */
RodColeman 0:8f5825f330b0 126 #define ELNRNG 48 /* Link number out of range */
RodColeman 0:8f5825f330b0 127 #define EUNATCH 49 /* Protocol driver not attached */
RodColeman 0:8f5825f330b0 128 #define ENOCSI 50 /* No CSI structure available */
RodColeman 0:8f5825f330b0 129 #define EL2HLT 51 /* Level 2 halted */
RodColeman 0:8f5825f330b0 130 #define EBADE 52 /* Invalid exchange */
RodColeman 0:8f5825f330b0 131 #define EBADR 53 /* Invalid request descriptor */
RodColeman 0:8f5825f330b0 132 #define EXFULL 54 /* Exchange full */
RodColeman 0:8f5825f330b0 133 #define ENOANO 55 /* No anode */
RodColeman 0:8f5825f330b0 134 #define EBADRQC 56 /* Invalid request code */
RodColeman 0:8f5825f330b0 135 #define EBADSLT 57 /* Invalid slot */
RodColeman 0:8f5825f330b0 136
RodColeman 0:8f5825f330b0 137 #define EDEADLOCK EDEADLK
RodColeman 0:8f5825f330b0 138
RodColeman 0:8f5825f330b0 139 #define EBFONT 59 /* Bad font file format */
RodColeman 0:8f5825f330b0 140 #define ENOSTR 60 /* Device not a stream */
RodColeman 0:8f5825f330b0 141 #define ENODATA 61 /* No data available */
RodColeman 0:8f5825f330b0 142 #define ETIME 62 /* Timer expired */
RodColeman 0:8f5825f330b0 143 #define ENOSR 63 /* Out of streams resources */
RodColeman 0:8f5825f330b0 144 #define ENONET 64 /* Machine is not on the network */
RodColeman 0:8f5825f330b0 145 #define ENOPKG 65 /* Package not installed */
RodColeman 0:8f5825f330b0 146 #define EREMOTE 66 /* Object is remote */
RodColeman 0:8f5825f330b0 147 #define ENOLINK 67 /* Link has been severed */
RodColeman 0:8f5825f330b0 148 #define EADV 68 /* Advertise error */
RodColeman 0:8f5825f330b0 149 #define ESRMNT 69 /* Srmount error */
RodColeman 0:8f5825f330b0 150 #define ECOMM 70 /* Communication error on send */
RodColeman 0:8f5825f330b0 151 #define EPROTO 71 /* Protocol error */
RodColeman 0:8f5825f330b0 152 #define EMULTIHOP 72 /* Multihop attempted */
RodColeman 0:8f5825f330b0 153 #define EDOTDOT 73 /* RFS specific error */
RodColeman 0:8f5825f330b0 154 #define EBADMSG 74 /* Not a data message */
RodColeman 0:8f5825f330b0 155 #define EOVERFLOW 75 /* Value too large for defined data type */
RodColeman 0:8f5825f330b0 156 #define ENOTUNIQ 76 /* Name not unique on network */
RodColeman 0:8f5825f330b0 157 #define EBADFD 77 /* File descriptor in bad state */
RodColeman 0:8f5825f330b0 158 #define EREMCHG 78 /* Remote address changed */
RodColeman 0:8f5825f330b0 159 #define ELIBACC 79 /* Can not access a needed shared library */
RodColeman 0:8f5825f330b0 160 #define ELIBBAD 80 /* Accessing a corrupted shared library */
RodColeman 0:8f5825f330b0 161 #define ELIBSCN 81 /* .lib section in a.out corrupted */
RodColeman 0:8f5825f330b0 162 #define ELIBMAX 82 /* Attempting to link in too many shared libraries */
RodColeman 0:8f5825f330b0 163 #define ELIBEXEC 83 /* Cannot exec a shared library directly */
RodColeman 0:8f5825f330b0 164 #define EILSEQ 84 /* Illegal byte sequence */
RodColeman 0:8f5825f330b0 165 #define ERESTART 85 /* Interrupted system call should be restarted */
RodColeman 0:8f5825f330b0 166 #define ESTRPIPE 86 /* Streams pipe error */
RodColeman 0:8f5825f330b0 167 #define EUSERS 87 /* Too many users */
RodColeman 0:8f5825f330b0 168 #define ENOTSOCK 88 /* Socket operation on non-socket */
RodColeman 0:8f5825f330b0 169 #define EDESTADDRREQ 89 /* Destination address required */
RodColeman 0:8f5825f330b0 170 #define EMSGSIZE 90 /* Message too long */
RodColeman 0:8f5825f330b0 171 #define EPROTOTYPE 91 /* Protocol wrong type for socket */
RodColeman 0:8f5825f330b0 172 #define ENOPROTOOPT 92 /* Protocol not available */
RodColeman 0:8f5825f330b0 173 #define EPROTONOSUPPORT 93 /* Protocol not supported */
RodColeman 0:8f5825f330b0 174 #define ESOCKTNOSUPPORT 94 /* Socket type not supported */
RodColeman 0:8f5825f330b0 175 #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
RodColeman 0:8f5825f330b0 176 #define EPFNOSUPPORT 96 /* Protocol family not supported */
RodColeman 0:8f5825f330b0 177 #define EAFNOSUPPORT 97 /* Address family not supported by protocol */
RodColeman 0:8f5825f330b0 178 #define EADDRINUSE 98 /* Address already in use */
RodColeman 0:8f5825f330b0 179 #define EADDRNOTAVAIL 99 /* Cannot assign requested address */
RodColeman 0:8f5825f330b0 180 #define ENETDOWN 100 /* Network is down */
RodColeman 0:8f5825f330b0 181 #define ENETUNREACH 101 /* Network is unreachable */
RodColeman 0:8f5825f330b0 182 #define ENETRESET 102 /* Network dropped connection because of reset */
RodColeman 0:8f5825f330b0 183 #define ECONNABORTED 103 /* Software caused connection abort */
RodColeman 0:8f5825f330b0 184 #define ECONNRESET 104 /* Connection reset by peer */
RodColeman 0:8f5825f330b0 185 #define ENOBUFS 105 /* No buffer space available */
RodColeman 0:8f5825f330b0 186 #define EISCONN 106 /* Transport endpoint is already connected */
RodColeman 0:8f5825f330b0 187 #define ENOTCONN 107 /* Transport endpoint is not connected */
RodColeman 0:8f5825f330b0 188 #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
RodColeman 0:8f5825f330b0 189 #define ETOOMANYREFS 109 /* Too many references: cannot splice */
RodColeman 0:8f5825f330b0 190 #define ETIMEDOUT 110 /* Connection timed out */
RodColeman 0:8f5825f330b0 191 #define ECONNREFUSED 111 /* Connection refused */
RodColeman 0:8f5825f330b0 192 #define EHOSTDOWN 112 /* Host is down */
RodColeman 0:8f5825f330b0 193 #define EHOSTUNREACH 113 /* No route to host */
RodColeman 0:8f5825f330b0 194 #define EALREADY 114 /* Operation already in progress */
RodColeman 0:8f5825f330b0 195 #define EINPROGRESS 115 /* Operation now in progress */
RodColeman 0:8f5825f330b0 196 #define ESTALE 116 /* Stale NFS file handle */
RodColeman 0:8f5825f330b0 197 #define EUCLEAN 117 /* Structure needs cleaning */
RodColeman 0:8f5825f330b0 198 #define ENOTNAM 118 /* Not a XENIX named type file */
RodColeman 0:8f5825f330b0 199 #define ENAVAIL 119 /* No XENIX semaphores available */
RodColeman 0:8f5825f330b0 200 #define EISNAM 120 /* Is a named type file */
RodColeman 0:8f5825f330b0 201 #define EREMOTEIO 121 /* Remote I/O error */
RodColeman 0:8f5825f330b0 202 #define EDQUOT 122 /* Quota exceeded */
RodColeman 0:8f5825f330b0 203
RodColeman 0:8f5825f330b0 204 #define ENOMEDIUM 123 /* No medium found */
RodColeman 0:8f5825f330b0 205 #define EMEDIUMTYPE 124 /* Wrong medium type */
RodColeman 0:8f5825f330b0 206
RodColeman 0:8f5825f330b0 207
RodColeman 0:8f5825f330b0 208 #define ENSROK 0 /* DNS server returned answer with no data */
RodColeman 0:8f5825f330b0 209 #define ENSRNODATA 160 /* DNS server returned answer with no data */
RodColeman 0:8f5825f330b0 210 #define ENSRFORMERR 161 /* DNS server claims query was misformatted */
RodColeman 0:8f5825f330b0 211 #define ENSRSERVFAIL 162 /* DNS server returned general failure */
RodColeman 0:8f5825f330b0 212 #define ENSRNOTFOUND 163 /* Domain name not found */
RodColeman 0:8f5825f330b0 213 #define ENSRNOTIMP 164 /* DNS server does not implement requested operation */
RodColeman 0:8f5825f330b0 214 #define ENSRREFUSED 165 /* DNS server refused query */
RodColeman 0:8f5825f330b0 215 #define ENSRBADQUERY 166 /* Misformatted DNS query */
RodColeman 0:8f5825f330b0 216 #define ENSRBADNAME 167 /* Misformatted domain name */
RodColeman 0:8f5825f330b0 217 #define ENSRBADFAMILY 168 /* Unsupported address family */
RodColeman 0:8f5825f330b0 218 #define ENSRBADRESP 169 /* Misformatted DNS reply */
RodColeman 0:8f5825f330b0 219 #define ENSRCONNREFUSED 170 /* Could not contact DNS servers */
RodColeman 0:8f5825f330b0 220 #define ENSRTIMEOUT 171 /* Timeout while contacting DNS servers */
RodColeman 0:8f5825f330b0 221 #define ENSROF 172 /* End of file */
RodColeman 0:8f5825f330b0 222 #define ENSRFILE 173 /* Error reading file */
RodColeman 0:8f5825f330b0 223 #define ENSRNOMEM 174 /* Out of memory */
RodColeman 0:8f5825f330b0 224 #define ENSRDESTRUCTION 175 /* Application terminated lookup */
RodColeman 0:8f5825f330b0 225 #define ENSRQUERYDOMAINTOOLONG 176 /* Domain name is too long */
RodColeman 0:8f5825f330b0 226 #define ENSRCNAMELOOP 177 /* Domain name is too long */
RodColeman 0:8f5825f330b0 227
RodColeman 0:8f5825f330b0 228 #ifndef errno
RodColeman 0:8f5825f330b0 229 extern int errno;
RodColeman 0:8f5825f330b0 230 #endif
RodColeman 0:8f5825f330b0 231
RodColeman 0:8f5825f330b0 232 #endif /* LWIP_PROVIDE_ERRNO */
RodColeman 0:8f5825f330b0 233
RodColeman 0:8f5825f330b0 234 #ifdef __cplusplus
RodColeman 0:8f5825f330b0 235 }
RodColeman 0:8f5825f330b0 236 #endif
RodColeman 0:8f5825f330b0 237
RodColeman 0:8f5825f330b0 238 #endif /* __LWIP_ARCH_H__ */