/* $Id: udp.h,v 1.2 2005/03/27 01:31:50 stpohle Exp $ * UDP Network */ #ifndef _UDP_H #define _UDP_H #include #include #include #include #include #include #include #ifdef _WIN32 #include #include #else #include #include #include #include #include #include #endif #ifdef _WIN32 #define _sockaddr sockaddr #else #define _sockaddr sockaddr_in6 #endif extern char *dns_net_getip (char *host); extern int dns_filladdr (char *host, int hostlen, char *port, int portlen, int ai_family, struct _sockaddr *sAddr); extern int udp_get (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family); extern int udp_server (char *port, int ai_family); extern void udp_send (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family); extern void udp_sendbroadcast (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family); extern void udp_close (int sock); #endif