#include #include #include #include #if STDC_HEADERS #include #include #endif #ifdef HAVE_STDINT_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif #ifdef HAVE_NETINET_UDP_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef HAVE_PCAP_H #include #endif #ifdef HAVE_NETINET_IN_SYSTM_H #include #endif #ifdef HAVE_NETINET_IP_H #include #endif #ifdef HAVE_NET_IF_H #include #endif #ifdef HAVE_NETINET_IF_ETHER_H #include #endif #ifdef HAVE_WINSOCK2_H #define USE_WINSOCK 1 #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif #ifndef HAVE_GETADDRINFO #include #endif #ifndef HAVE_RANDOM /* random can be replaced by rand for ldnsexamples */ #define random rand #endif #ifndef HAVE_SRANDOM /* srandom can be replaced by srand for ldnsexamples */ #define srandom srand #endif extern char *optarg; extern int optind, opterr; #ifndef EXIT_FAILURE #define EXIT_FAILURE 1 #endif #ifndef EXIT_SUCCESS #define EXIT_SUCCESS 0 #endif #ifdef S_SPLINT_S #define FD_ZERO(a) /* a */ #define FD_SET(a,b) /* a, b */ #endif