2010-09-21 06:11:24 +00:00
|
|
|
/* ReactOS-Specific lwIP binding header - by Cameron Gutman */
|
|
|
|
|
|
|
|
#include <wdm.h>
|
|
|
|
|
|
|
|
/* ROS-specific mem defs */
|
|
|
|
void *
|
|
|
|
malloc(size_t size);
|
|
|
|
|
|
|
|
void *
|
|
|
|
calloc(size_t count, size_t size);
|
|
|
|
|
|
|
|
void
|
|
|
|
free(void *mem);
|
|
|
|
|
|
|
|
void *
|
|
|
|
realloc(void *mem, size_t size);
|
|
|
|
|
2013-04-30 08:16:29 +00:00
|
|
|
/* mem_trim() must trim the buffer without relocating it.
|
|
|
|
* Since we can't do that, we just return the buffer passed in unchanged */
|
|
|
|
#define mem_trim(_m_, _s_) (_m_)
|
2010-09-21 06:11:24 +00:00
|
|
|
|
|
|
|
/* Unsigned int types */
|
|
|
|
typedef unsigned char u8_t;
|
|
|
|
typedef unsigned short u16_t;
|
|
|
|
typedef unsigned long u32_t;
|
|
|
|
|
|
|
|
/* Signed int types */
|
|
|
|
typedef signed char s8_t;
|
|
|
|
typedef signed short s16_t;
|
|
|
|
typedef signed long s32_t;
|
|
|
|
|
|
|
|
/* Memory pointer */
|
2012-05-06 22:59:42 +00:00
|
|
|
typedef ULONG_PTR mem_ptr_t;
|
2010-09-21 06:11:24 +00:00
|
|
|
|
|
|
|
/* Printf/DPRINT formatters */
|
|
|
|
#define U16_F "hu"
|
|
|
|
#define S16_F "hd"
|
|
|
|
#define X16_F "hx"
|
|
|
|
#define U32_F "lu"
|
|
|
|
#define S32_F "ld"
|
|
|
|
#define X32_F "lx"
|
|
|
|
|
|
|
|
/* Endianness */
|
|
|
|
#define BYTE_ORDER LITTLE_ENDIAN
|
|
|
|
|
|
|
|
/* Checksum calculation algorithm choice */
|
|
|
|
#define LWIP_CHKSUM_ALGORITHM 3
|
|
|
|
|
|
|
|
/* Diagnostics */
|
2011-05-24 18:05:51 +00:00
|
|
|
#define LWIP_PLATFORM_DIAG(x) (DbgPrint x)
|
2010-09-21 06:11:24 +00:00
|
|
|
#define LWIP_PLATFORM_ASSERT(x) ASSERTMSG(x, FALSE)
|
|
|
|
|
|
|
|
/* Synchronization */
|
2011-05-07 19:53:38 +00:00
|
|
|
#define SYS_ARCH_DECL_PROTECT(lev) sys_prot_t (lev)
|
|
|
|
#define SYS_ARCH_PROTECT(lev) sys_arch_protect(&(lev))
|
|
|
|
#define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect(lev)
|
2010-09-21 06:11:24 +00:00
|
|
|
|
|
|
|
/* Compiler hints for packing structures */
|
|
|
|
#define PACK_STRUCT_STRUCT
|
|
|
|
#define PACK_STRUCT_USE_INCLUDES
|
|
|
|
|