typedef enum
{
	CLOSED = 0,
	OPENED = 1,
	TIMEDOUT = 2
} port_response;

typedef void (*rescb)(port_response resp, unsigned short port);

void net_init();
void net_end();
void struct_init(rescb cb, unsigned long wait_time);
void net_uninit();
int net_add(unsigned long ip, unsigned short port, unsigned long time);
int net_check(unsigned long time);
char *net_get_aip(unsigned long ip);
unsigned long net_get_iip(char *aip);
