44 #define WATCH_SOCK_UDP_SEND 0x01
45 #define WATCH_SOCK_TCP_SEND 0x02
46 #define WATCH_SOCK_CONN_TRY 0x04
47 #define WATCH_SOCK_CLS_TRY 0x08
48 #define WATCH_SOCK_CONN_EVT 0x10
49 #define WATCH_SOCK_CLS_EVT 0x20
50 #define WATCH_SOCK_RECV 0x40
51 #define WATCH_SOCK_MASK_LOW 0x0F
52 #define WATCH_SOCK_MASK_HIGH 0x70
53 #define WATCH_SOCK_ALL_MASK 0x7F
61 #define DEVICE_INIT_WITH_MEMCHK(tx_size_v, rx_size_v) \
63 uint8 _i, *_tx, *_rx, _tx_cnt = 0, _rx_cnt = 0; \
64 if(sizeof(tx_size_v)/sizeof(uint8) != TOTAL_SOCK_NUM || \
65 sizeof(rx_size_v)/sizeof(uint8) != TOTAL_SOCK_NUM) { \
66 printf("Device Memory Configure fail 1"); \
69 _tx = (uint8*)tx_size_v; \
70 _rx = (uint8*)rx_size_v; \
71 for(_i=0; _i<TOTAL_SOCK_NUM; _i++) { \
75 if(_tx_cnt+_rx_cnt != TOTAL_SOCK_MEM) { \
76 printf("Device Memory Configure fail 2"); \
79 device_init(tx_size_v, rx_size_v); \
96 uint16
htons( uint16 hostshort);
97 uint32
htonl(uint32 hostlong);
98 uint32
ntohs(uint16 netshort);
99 uint32
ntohl(uint32 netlong);