# Checks for libraries.
# Checks for header files.
- AC_CHECK_HEADERS([arpa/inet.h inttypes.h limits.h netdb.h poll.h signal.h stdint.h stdlib.h string.h syslog.h sys/ioctl.h sys/prctl.h sys/socket.h sys/syscall.h netinet/in.h sys/time.h unistd.h windows.h winsock2.h ws2tcpip.h sched.h assert.h])
- AC_CHECK_HEADERS([sys/socket.h net/if.h sys/mman.h], [], [],
+ AC_CHECK_HEADERS([arpa/inet.h assert.h ctype.h errno.h fcntl.h inttypes.h])
+ AC_CHECK_HEADERS([getopt.h])
+ AC_CHECK_HEADERS([limits.h netdb.h netinet/in.h poll.h sched.h signal.h])
+ AC_CHECK_HEADERS([stdarg.h stdint.h stdio.h stdlib.h string.h sys/ioctl.h])
+ AC_CHECK_HEADERS([syslog.h sys/prctl.h sys/socket.h sys/stat.h sys/syscall.h])
+ AC_CHECK_HEADERS([sys/time.h time.h unistd.h windows.h winsock2.h ws2tcpip.h])
+ AC_CHECK_HEADERS([sys/ioctl.h linux/if_ether.h linux/if_packet.h linux/filter.h])
+
+ AC_CHECK_HEADERS([sys/socket.h net/if.h sys/mman.h linux/if_arp.h], [], [],
[[#ifdef HAVE_SYS_SOCKET_H
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #endif
]])
if test "$with_libpcap_libraries" != "no"; then
LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}"
fi
- AC_CHECK_HEADERS([pcap.h pcap/pcap.h])
+ AC_CHECK_HEADERS([pcap.h pcap/pcap.h pcap/bpf.h])
LIBPCAP=""
AC_CHECK_LIB(pcap, pcap_open_live,, LIBPCAP="no", [-lpthread])
#include "app-layer-htp.h"
#include "app-layer-htp-file.h"
#include "util-time.h"
-#include <htp/htp.h>
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "util-debug.h"
#include "app-layer-htp.h"
#include "util-time.h"
-#include <htp/htp.h>
#include "util-unittest.h"
#include "util-unittest-helper.h"
* stays approach?
*/
-#include <string.h>
-
#include "suricata-common.h"
#include "conf.h"
#include "util-unittest.h"
"content:\"aa\"; content:\"aa\"; distance:0; content:\"aa\"; distance:0; "
"byte_test:1,>,200,0,relative; sid:1;)";
-#include <sys/time.h>
struct timeval tv_start, tv_end, tv_diff;
gettimeofday(&tv_start, NULL);
* Signature ordering part of the detection engine.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pcre.h>
-
#include "suricata-common.h"
#include "detect.h"
#include "detect-flowbits.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-client-body.h"
#include "stream-tcp.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-cookie.h"
#include "stream-tcp.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-header.h"
#include "stream-tcp.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-method.h"
#include "stream-tcp.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-raw-header.h"
#include "stream-tcp.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-raw-uri.h"
#include "stream-tcp.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-server-body.h"
#include "stream-tcp.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-stat-code.h"
#include "stream-tcp-private.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-stat-msg.h"
#include "stream-tcp-private.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "stream-tcp.h"
#include "detect-http-ua.h"
#include "app-layer.h"
-#include <htp/htp.h>
#include "app-layer-htp.h"
#include "detect-http-uri.h"
#include "detect-uricontent.h"
#include "app-layer-parser.h"
#include "app-layer-htp.h"
-#include <htp/htp.h>
#include "stream.h"
* Implements http logging portion of the engine.
*/
-#include <htp/dslib.h>
-
#include "suricata-common.h"
#include "debug.h"
#include "detect.h"
#include "runmodes.h"
#ifdef HAVE_AF_PACKET
+
+#if HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
+#endif
+
+#if HAVE_LINUX_IF_ETHER_H
#include <linux/if_ether.h>
+#endif
+
+#if HAVE_LINUX_IF_PACKET_H
#include <linux/if_packet.h>
+#endif
+
+#if HAVE_LINUX_IF_ARP_H
#include <linux/if_arp.h>
+#endif
-#include <pcap/pcap.h>
-#include <pcap/bpf.h>
+#if HAVE_LINUX_FILTER_H
#include <linux/filter.h>
#endif
+#if HAVE_SYS_MMAN_H
#include <sys/mman.h>
+#endif
+
+#endif /* HAVE_AF_PACKET */
extern uint8_t suricata_ctl_flags;
extern int max_pending_packets;
}
#else /* implied we do have NFQ support */
-#include <pthread.h>
extern int max_pending_packets;
#include <config.h>
#endif
+#if HAVE_STDIO_H
#include <stdio.h>
+#endif
+
+#if HAVE_STDINT_h
#include <stdint.h>
+#endif
+
+#if HAVE_STDARG_H
#include <stdarg.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+
+#if HAVE_ERRNO_H
#include <errno.h>
+#endif
+
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
+
+#if HAVE_LIMITS_H
#include <limits.h>
+#endif
+
+#if HAVE_CTYPE_H
#include <ctype.h>
+#endif
+
+#if HAVE_STRING_H
#include <string.h>
+#endif
+
+#if HAVE_FCNTL_H
#include <fcntl.h>
+#endif
+
+#ifdef HAVE_TIME_H
#include <time.h>
+#endif
#if HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#include <sys/socket.h>
#endif
+#if HAVE_SYS_STAT_H
#include <sys/stat.h>
+#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#include <pcap/pcap.h>
#endif
+#ifdef HAVE_PCAP_BPF_H
+#include <pcap/bpf.h>
+#endif
+
/* we need this to stringify the defines which are supplied at compiletime see:
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/cpp/Stringification.html#Stringification */
#define xstr(s) str(s)
#include "suricata-common.h"
#include "config.h"
+#if HAVE_GETOPT_H
#include <getopt.h>
+#endif
+
+#if HAVE_SIGNAL_H
#include <signal.h>
-#include <pthread.h>
+#endif
#ifdef HAVE_NSS
#include <prinit.h>
#include "tmqh-packetpool.h"
#include "threads.h"
#include "util-debug.h"
-#include <pthread.h>
-#include <unistd.h>
#include "util-privs.h"
#include "util-cpu.h"
#include "util-optimize.h"
* Retrieve CPU information (configured CPUs, online CPUs)
*/
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
#include "util-error.h"
#include "util-debug.h"
#include "suricata-common.h"
*/
#include "suricata-common.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "threads.h"
-#include "util-debug.h"
-#include "util-debug-filters.h"
-#include "util-error.h"
-#include "util-enum.h"
-#include <pthread.h>
/* both of these are defined in util-debug.c */
extern int sc_log_module_initialized;
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <inttypes.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
#include "suricata-common.h"
#include "util-decode-der.h"
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <inttypes.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
#include "suricata-common.h"
#include "util-decode-der.h"