<string.h> int errno; u32_t lwip_sys_now; struct sys_timeouts { struct sys_timeo *next; }; struct timeoutlist { struct sys_timeouts timeouts; xTaskHandle pid; }; #define SYS_THREAD_MAX 4 static struct timeoutlist s_timeoutlist[SYS_THREAD_MAX]; static u16_t s_nextthread = 0; ...
intlwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop) Thread-safe variant of lwip_gethostbyname: instead of using a static buffer, this function takes buffer and errno pointers as arguments and uses these for th...
Override anything you don't like! */ #include "lwipopts.h" #include "lwip/debug.h" #include "os_mem.h" #define LWIP_PROVIDE_ERRNO 1 #define LWIP_COMPAT_MUTEX 0 #define LWIP_DEBUG 1 #define DEFAULT_THREAD_PRIO 7 #define DEFAULT_THREAD_STACKSIZE 1024 #define TCPIP_THREAD_STACKSIZE 10...
#include <api/errno.h> #include <api/stdlib.h> #define LWIP_PLATFORM_DIAG(x) do {printk x;} while(0) /** Platform specific assertion handling.\n * Note the default implementation pulls in printf, fflush and abort, which may * in turn pull in a lot of standard libary code. In res...
可以定义LWIP_ERRNO_STDINCLUDE则自动#include 否则错误头文件由LWIP_ERRNO_INCLUDE定义。 随机数产生接口 如果有stdint.h则直接使用库函数,否则自行实现 Cc.h中 #include extern unsigned int lwip_port_rand(void); #define LWIP_RAND() (lwip_port_rand()) ...
30 set_errno(EINVAL); 31 return -1; 32 } 33 34 if (!conn) { 35 LWIP_DEBUGF(SOCKETS_DEBUG, ("-1 / ENOBUFS (could not create netconn)\n")); 36 set_errno(ENOBUFS); 37 return -1; 38 } 39 40 i = alloc_socket(conn); // 开辟一个socket,这个函数也很重要 ...
(sn)printf formatters for these lwIP types*/#defineU16_F "hu"#defineS16_F "hd"#defineX16_F "hx"#defineU32_F "lu"#defineS32_F "ld"#defineX32_F "lx"#defineSZT_F "uz"/*选择小端模式*/#defineBYTE_ORDER LITTLE_ENDIAN/*Use LWIP error codes*/#defineLWIP_PROVIDE_ERRNO/*内存对齐*/#...
<errno.h> perf.h sys_arch.h sys_arch.c的头文件 整个移植所依赖的操作系统平台. OK 文件夹和文件指定的路建立后, 先去定数据类型定义. cc.h: typedef unsigned char u8_t typedef signed char s8_t typedef unsigned short u16_t ; ... 允许它们...
Statistics options --- */#define LWIP_STATS 0#define LWIP_PROVIDE_ERRNO 1/*** LWIP_NETCONN==...
cc.h文件定义大小端模式,输出调试的宏等 #ifndef __CC_H__ #define __CC_H__ #include "cpu.h" #include <stdlib.h> #include <stdio.h> typedef int sys_prot_t; #define LWIP_PROVIDE_ERRNO #if defined (__GNUC__) & !defined (__CC_ARM) #define LWIP_TIMEVAL_PRIVATE 0 //#include <...