1 /* ReactOS-Specific lwIP binding header - by Cameron Gutman */ 2 3 #include <wdm.h> 4 5 /* ROS-specific mem defs */ 6 void * 7 malloc(size_t size); 8 9 void * 10 calloc(size_t count, size_t size); 11 12 void 13 free(void *mem); 14 15 void * 16 realloc(void *mem, size_t size); 17 18 /* Printf/DPRINT formatters */ 19 #define U16_F "hu" 20 #define S16_F "hd" 21 #define X16_F "hx" 22 #define U32_F "lu" 23 #define S32_F "ld" 24 #define X32_F "lx" 25 26 /* Endianness */ 27 #define BYTE_ORDER LITTLE_ENDIAN 28 29 /* Checksum calculation algorithm choice */ 30 #define LWIP_CHKSUM_ALGORITHM 3 31 32 /* Diagnostics */ 33 #define LWIP_PLATFORM_DIAG(x) (DbgPrint x) 34 #define LWIP_PLATFORM_ASSERT(x) ASSERTMSG(x, FALSE) 35 36 /* Synchronization */ 37 #define SYS_ARCH_DECL_PROTECT(lev) sys_prot_t (lev) 38 #define SYS_ARCH_PROTECT(lev) sys_arch_protect(&(lev)) 39 #define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect(lev) 40 41 /* Compiler hints for packing structures */ 42 #define PACK_STRUCT_STRUCT 43 #define PACK_STRUCT_USE_INCLUDES 44 45