Copy of NetServicesMin with the HTTP Client library. Includes modification for HTTP servers which send the HTTP status line in its own packet.

Committer:
andrewbonney
Date:
Thu May 26 10:02:40 2011 +0000
Revision:
0:18dd877d2c77

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewbonney 0:18dd877d2c77 1 /*
andrewbonney 0:18dd877d2c77 2 * Author: Adam Dunkels <adam@sics.se>
andrewbonney 0:18dd877d2c77 3 *
andrewbonney 0:18dd877d2c77 4 */
andrewbonney 0:18dd877d2c77 5 #ifndef __LWIP_ARCH_CC_H__
andrewbonney 0:18dd877d2c77 6 #define __LWIP_ARCH_CC_H__
andrewbonney 0:18dd877d2c77 7
andrewbonney 0:18dd877d2c77 8 #define LITTLE_ENDIAN 1234
andrewbonney 0:18dd877d2c77 9
andrewbonney 0:18dd877d2c77 10 #define BYTE_ORDER LITTLE_ENDIAN
andrewbonney 0:18dd877d2c77 11
andrewbonney 0:18dd877d2c77 12 typedef unsigned char u8_t;
andrewbonney 0:18dd877d2c77 13 typedef signed char s8_t;
andrewbonney 0:18dd877d2c77 14 typedef unsigned short u16_t;
andrewbonney 0:18dd877d2c77 15 typedef signed short s16_t;
andrewbonney 0:18dd877d2c77 16 typedef unsigned int u32_t;
andrewbonney 0:18dd877d2c77 17 typedef signed int s32_t;
andrewbonney 0:18dd877d2c77 18 typedef unsigned int mem_ptr_t;
andrewbonney 0:18dd877d2c77 19
andrewbonney 0:18dd877d2c77 20 #ifndef NULL
andrewbonney 0:18dd877d2c77 21 #define NULL 0
andrewbonney 0:18dd877d2c77 22 #endif
andrewbonney 0:18dd877d2c77 23
andrewbonney 0:18dd877d2c77 24 #ifndef TRUE
andrewbonney 0:18dd877d2c77 25 #define TRUE 1
andrewbonney 0:18dd877d2c77 26 #endif
andrewbonney 0:18dd877d2c77 27
andrewbonney 0:18dd877d2c77 28 #ifndef FALSE
andrewbonney 0:18dd877d2c77 29 #define FALSE 0
andrewbonney 0:18dd877d2c77 30 #endif
andrewbonney 0:18dd877d2c77 31
andrewbonney 0:18dd877d2c77 32 #include <stdlib.h>
andrewbonney 0:18dd877d2c77 33 #define LWIP_RAND rand
andrewbonney 0:18dd877d2c77 34
andrewbonney 0:18dd877d2c77 35 #define LWIP_PLATFORM_DIAG(x) DBG x
andrewbonney 0:18dd877d2c77 36 #define LWIP_PLATFORM_ASSERT(x) DBG(x)
andrewbonney 0:18dd877d2c77 37
andrewbonney 0:18dd877d2c77 38 #define LWIP_PROVIDE_ERRNO
andrewbonney 0:18dd877d2c77 39
andrewbonney 0:18dd877d2c77 40 #define U16_F "hu"
andrewbonney 0:18dd877d2c77 41 #define S16_F "hd"
andrewbonney 0:18dd877d2c77 42 #define X16_F "hx"
andrewbonney 0:18dd877d2c77 43 #define U32_F "lu"
andrewbonney 0:18dd877d2c77 44 #define S32_F "ld"
andrewbonney 0:18dd877d2c77 45 #define X32_F "lx"
andrewbonney 0:18dd877d2c77 46
andrewbonney 0:18dd877d2c77 47 #if 0
andrewbonney 0:18dd877d2c77 48 /*Create compilation problems, and according to http://www.mail-archive.com/lwip-users@nongnu.org/msg06786.html,
andrewbonney 0:18dd877d2c77 49 lwIP uses packed structures, so packing the field is not really a good idea ;) */
andrewbonney 0:18dd877d2c77 50 #define PACK_STRUCT_FIELD(x) __packed x
andrewbonney 0:18dd877d2c77 51 #else
andrewbonney 0:18dd877d2c77 52 #define PACK_STRUCT_FIELD(x) x
andrewbonney 0:18dd877d2c77 53 #endif
andrewbonney 0:18dd877d2c77 54
andrewbonney 0:18dd877d2c77 55 #define PACK_STRUCT_STRUCT
andrewbonney 0:18dd877d2c77 56 #define PACK_STRUCT_BEGIN __packed
andrewbonney 0:18dd877d2c77 57 #define PACK_STRUCT_END
andrewbonney 0:18dd877d2c77 58
andrewbonney 0:18dd877d2c77 59 #define LWIP_CHKSUM_ALGORITHM 3
andrewbonney 0:18dd877d2c77 60
andrewbonney 0:18dd877d2c77 61
andrewbonney 0:18dd877d2c77 62 #endif /* __LWIP_ARCH_CC_H__ */