WebSocketServer test

Dependencies:   mbed

Committer:
gtk2k
Date:
Sun Apr 29 03:58:08 2012 +0000
Revision:
0:74be48b504a5
WebSocketServer

Who changed what in which revision?

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