]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
Reorganize header inclusions.
authorVictor Julien <victor@inliniac.net>
Thu, 17 Sep 2009 08:43:45 +0000 (10:43 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 17 Sep 2009 08:43:45 +0000 (10:43 +0200)
89 files changed:
src/alert-debuglog.c
src/alert-fastlog.c
src/alert-unified-alert.c
src/alert-unified-log.c
src/alert-unified2-alert.c
src/conf-yaml-loader.c
src/conf.c
src/conf.h
src/counters.c
src/decode-ethernet.c
src/decode-gre.c
src/decode-ipv4.h
src/decode-ipv6.h
src/decode-ppp.c
src/decode-pppoe.h
src/decode-sll.c
src/decode-tcp.h
src/decode.h
src/detect-bytejump.c
src/detect-bytetest.c
src/detect-classtype.c
src/detect-content.c
src/detect-csum.c
src/detect-decode-event.c
src/detect-depth.c
src/detect-distance.c
src/detect-dsize.c
src/detect-engine-address-ipv4.c
src/detect-engine-address-ipv6.c
src/detect-engine-mpm.c
src/detect-engine-proto.c
src/detect-flow.c
src/detect-flowbits.c
src/detect-flowvar.c
src/detect-isdataat.c
src/detect-metadata.c
src/detect-msg.c
src/detect-noalert.c
src/detect-nocase.c
src/detect-offset.c
src/detect-parse.c
src/detect-pcre.c
src/detect-pktvar.c
src/detect-priority.c
src/detect-rawbytes.c
src/detect-recursive.c
src/detect-reference.c
src/detect-rev.c
src/detect-sid.c
src/detect-stream_size.c
src/detect-threshold.c
src/detect-uricontent.c
src/detect-window.c
src/detect-within.c
src/detect.c
src/eidps-common.h
src/eidps.c
src/flow-bit.c
src/flow-hash.c
src/flow-queue.c
src/flow-var.c
src/host.c
src/host.h
src/log-httplog.c
src/pkt-var.c
src/respond-reject-libnet11.c
src/respond-reject.c
src/source-nfq.c
src/source-pcap-file.c
src/source-pcap.c
src/stream-tcp-reassemble.c
src/stream-tcp.c
src/threads.c
src/tm-modules.c
src/tm-threads.c
src/util-binsearch.c
src/util-bloomfilter-counting.c
src/util-bloomfilter.c
src/util-byte.c
src/util-cidr.c
src/util-hash.c
src/util-hashlist.c
src/util-mpm-b2g.c
src/util-mpm-b3g.c
src/util-mpm-wumanber.c
src/util-mpm.c
src/util-pool.c
src/util-print.c
src/util-unittest.c

index a37551f9ae10a22d6c67882b6a8e3a28b373304a..3da91edf0c26c658491998399cd8178d6a83b8bc 100644 (file)
@@ -8,18 +8,6 @@
  *   - maybe by accessing it just and hoping threading doesn't hurt
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "detect.h"
index 042491d44e70e417c0d8ca34a48d23769f90107d..b0769ca571a646d7d457655dbfd0a57f90a6e416 100644 (file)
  * - Print [drop] as well if appropriate
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "detect.h"
index 68449de9913d5eb04eee2b617c8c5ff3a5a5847f..5e2ba2f64e0fe7076280a6965caf42c433a0df40 100644 (file)
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "detect.h"
index 4971091c6fee730310b355a4b2cef84ce216ddf7..11fe9d6543fb5b150b661148588c20ce0ebc8205 100644 (file)
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "detect.h"
index b2936a3f56e2946dbc15947033c49d00f052dcde..1c6f1b9c7366b6c1aa72251ef2d5ac6ff7806403 100644 (file)
@@ -4,18 +4,6 @@
  *  \author Breno Silva <breno.silva@gmail.com>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "detect.h"
index 4cce058721d760bfb8d7b9ff396da19b3c50383d..299b9fe2db4454982ff0c10c7df57634c1f35cfc 100644 (file)
@@ -8,10 +8,7 @@
  * YAML configuration loader.
  */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
+#include "eidps-common.h"
 
 #include <yaml.h>
 
index 7b27e81f4690c941fe381925ea191bc21232edc9..0a4fd23fbb4da1cf12f462684fcf530cbfa4e3e2 100644 (file)
  * \todo Consider using HashListTable to allow easy dumping of all data.
  */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
-#include <string.h>
-#include <errno.h>
-
 #include "eidps-common.h"
 #include "conf.h"
 #include "util-hash.h"
index 52020be3ed762e16348f1da2f85d8c542ccf66e8..623bbaf65956e42e6eae45d23cfd524f8c24a2c6 100644 (file)
@@ -7,8 +7,6 @@
 #ifndef __CONF_H__
 #define __CONF_H__
 
-#include <inttypes.h>
-
 /**
  * The default log directory.
  */
index 0f033a1b3cbf33b3b76ff7b32ce32be5ee407938..ac8dc104bb35aca2b1c00b2ead0ff7852164ec8e 100644 (file)
@@ -1,9 +1,5 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-#include <sys/time.h>
-#include <limits.h>
+#include "eidps-common.h"
+
 #include "time.h"
 
 #include "eidps.h"
index 80b9c2a60fee3516ae1f8faf4825ce0b6270d569..967e5871bf97c27cb57e3eebbd97baf595d29788 100644 (file)
@@ -1,5 +1,6 @@
 /* Copyright (c) 2009 Victor Julien <victor@inliniac.net> */
 
+#include "eidps-common.h"
 #include "decode.h"
 #include "decode-ethernet.h"
 #include "decode-events.h"
index 49a1e5fcead16a009b2feb6149e826e78b38417a..0aedac1ae901576d6e3680e92f328795c16d1568 100644 (file)
@@ -3,7 +3,7 @@
  *  \author Breno Silva <breno.silva@gmail.com>
  */
 
-
+#include "eidps-common.h"
 #include "eidps.h"
 #include "decode.h"
 #include "decode-events.h"
index 612aab2245632c6f2be3f14856add9376b4ef18d..99c2530dbac362cbc8f6778450e61714620c752a 100644 (file)
@@ -3,12 +3,6 @@
 #ifndef __DECODE_IPV4_H__
 #define __DECODE_IPV4_H__
 
-#include <sys/types.h>
-#include <pcap.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-
 #define IPV4_HEADER_LEN           20    /**< Header length */
 #define IPV4_OPTMAX               40    /**< Max options length */
 #define        IPV4_MAXPACKET_LEN        65535 /**< Maximum packet size */
index 15a52cf64ccf36ef5074412c0e88615434bcb745..cd6d7fb52544df48e2ec1b43e616c5e0d5e70383 100644 (file)
@@ -3,12 +3,6 @@
 #ifndef __DECODE_IPV6_H__
 #define __DECODE_IPV6_H__
 
-#include <sys/types.h>
-#include <pcap.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-
 #define IPV6_HEADER_LEN            40
 #define        IPV6_MAXPACKET             65535 /* maximum packet size */
 #define IPV6_MAX_OPT               40
index fb64588f9b99300c7cf193322ff70ac07b471cdb..8ea17c841416f2847dc300820422aeb48929d4e7 100644 (file)
@@ -2,7 +2,6 @@
  *  \author Breno Silva Pinto <breno.silva@gmail.com> */
 
 #include "eidps-common.h"
-
 #include "decode.h"
 #include "decode-ppp.h"
 #include "decode-events.h"
index 22025d6cf0ecc88b8da65e5a2286b231edbd2a70..f732e4b14bcdc347ea10ea936fec8dbad958245d 100644 (file)
@@ -8,12 +8,6 @@
 #ifndef __DECODE_PPPOE_H__
 #define __DECODE_PPPOE_H__
 
-#include <sys/types.h>
-#include <pcap.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-
 #include "decode.h"
 #include "threadvars.h"
 
index 74ad9e58b50a6346fff624a94abd427c540ac35a..80476373dd10f659617fa93f375b5e3d4492ee83 100644 (file)
@@ -1,5 +1,6 @@
 /* Copyright (c) 2009 Victor Julien <victor@inliniac.net> */
 
+#include "eidps-common.h"
 #include "decode.h"
 #include "decode-sll.h"
 #include "decode-events.h"
index 165e13172fc4828a11e7fcc56d86e0e614254742..2c9476f9792c9fe939ce2833a844b7328110f849 100644 (file)
@@ -6,12 +6,6 @@
 #ifndef __DECODE_TCP_H__
 #define __DECODE_TCP_H__
 
-#include <sys/types.h>
-#include <pcap.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-
 #define TCP_HEADER_LEN                       20
 #define TCP_OPTLENMAX                        40
 #define TCP_OPTMAX                           20 /* every opt is at least 2 bytes
index b6a34b61537ef8e78b3feedd211e80430a447fb2..302b2609c2a8bab1fd6c5ccb17449ad03173d8ff 100644 (file)
 //#define DBG_THREADS
 #define COUNTERS
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "threadvars.h"
 
 #include "source-nfq.h"
@@ -449,5 +438,10 @@ Packet *TunnelPktSetup(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, ui
 #define IPPROTO_DCCP 33
 #endif
 
+/* pcap provides this, but we don't want to depend on libpcap */
+#ifndef DLT_EN10MB
+#define DLT_EN10MB 1
+#endif
+
 #endif /* __DECODE_H__ */
 
index 7eb112a764b5b32f8a617245dbe7333a86b55791..b5ae58411973b27e44d63a3352b5f38af1c71e08 100644 (file)
@@ -3,9 +3,6 @@
  * \author Brian Rectanus <brectanu@gmail.com>
  */
 
-#include <pcre.h>
-#include <stdlib.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "decode.h"
index cd4df7efdee3d2070dc7bac121d5285d1a2e7cc1..c8ea705b7d8ff75d9365a7b5d35aff9072f6a1c0 100644 (file)
@@ -3,9 +3,6 @@
  * \author Brian Rectanus <brectanu@gmail.com>
  */
 
-#include <pcre.h>
-#include <stdlib.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "decode.h"
index e502a06f296b3f4bd8273d9b07c0401cc8226ced..948fd18134ce625ee2054b6b0b2d83a1b0b89b80 100644 (file)
@@ -1,5 +1,6 @@
 /* CLASSTYPE part of the detection engine. */
 
+#include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
index d0ef0a252a2e8b2a914fe85f3cf073893411ec3b..c94ca4eccf78c1700871c1287c4ae816e219c7a3 100644 (file)
  *
  */
 
-#include <ctype.h>
+#include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
 #include "detect-content.h"
 #include "detect-uricontent.h"
-
-#include "eidps-common.h"
 #include "detect-engine-mpm.h"
 #include "util-mpm.h"
-
 #include "flow.h"
 #include "flow-var.h"
 #include "detect-flow.h"
-
 #include "util-unittest.h"
 #include "util-print.h"
-
 #include "threads.h"
 
 int DetectContentMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *, Signature *, SigMatch *);
index ad3125e3830538fc81525c32bcf8f5f025757e70..0d9949126505772bf8868d802d00896afc7387b0 100644 (file)
@@ -5,8 +5,6 @@
  * Checksum keyword for the the detection engine.
  */
 
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "decode.h"
index 7af99a784779cb0f8a96e73ac3601ebdb4d46084..b18b09cf1249c8554e0a03238655948e2c0d5ce4 100644 (file)
@@ -3,24 +3,19 @@
  *  \author Breno Silva <breno.silva@gmail.com>
  */
 
+#include "eidps-common.h"
+#include "eidps.h"
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
-
-#include "eidps.h"
-
 #include "decode-events.h"
 
 /* Need to get the DEvents[] array */
 #define DETECT_EVENTS
 
 #include "detect-decode-event.h"
-
 #include "util-unittest.h"
 
-#include <pcre.h>
-#include <ctype.h>
-
 #define PARSE_REGEX "\\S[0-9A-z_]+[.][A-z+]+$"
 
 static pcre *parse_regex;
index 6c806fc6738f2759288b36a1187bb2fd4cd19981..93a9eb3ee9713b713e046c641b5872d4a934adb4 100644 (file)
@@ -1,10 +1,9 @@
 /* DEPTH part of the detection engine. */
 
+#include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
-
-#include <pcre.h>
 #include "detect-content.h"
 #include "detect-pcre.h"
 
index 919f720abf4dfbc52b979040099d23ebd2d17979..fc482a85a30c2ccb7e4da22e0b22fcc6f4f3e27e 100644 (file)
@@ -1,10 +1,9 @@
 /* DISTANCE part of the detection engine. */
 
+#include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
-
-#include <pcre.h>
 #include "detect-content.h"
 #include "detect-uricontent.h"
 #include "detect-pcre.h"
index 4f6358d268b3df8cc526ab54684507c702e52168..ea0f4b5bb99b2a109d7fc69dfe82fe0255efe69b 100644 (file)
@@ -9,8 +9,6 @@
 
 #include "util-unittest.h"
 
-#include <pcre.h>
-
 #define PARSE_REGEX "^(?:\\\")?(<|>)?([0-9]+)(?:(<>)([0-9]+))?(?:\\\")?$"
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
index 78fa0fdeace627fa568df13fdd3c0ac810368782..975165e42b26fd89e5abe1ba1fa304194de394e3 100644 (file)
@@ -5,6 +5,8 @@
  * XXX we need to unit test the hell out of this code
  */
 
+#include "eidps-common.h"
+
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
index 52598144489a427c94e75a8754dd9e207abe76a9..928fd4c1dba7d81d2271bb3d75c38245bc3f1297 100644 (file)
@@ -5,6 +5,8 @@
  * XXX unit test the join code
  */
 
+#include "eidps-common.h"
+
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
index a0487188a990b6543d314ed8279fe0a2edc042fe..1f067243c7983becd2bb7d0d75d8a4645dfb8eaf 100644 (file)
@@ -1,9 +1,6 @@
 /* Multi pattern matcher */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include "eidps-common.h"
 
 #include "decode.h"
 #include "detect.h"
index e14a905c68138e104477a76936063b97175f58c7..10456aa06ff4ca51e283045c43fa75103f24f545 100644 (file)
@@ -4,6 +4,8 @@
  *
  * TODO move this out of the detection plugin structure */
 
+#include "eidps-common.h"
+
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
index bf2b5a9d76c94a8af87d68656cb7009a8a9fe712..e418a0370fdca73e6ece5ec056770b3ca153ca44 100644 (file)
@@ -5,8 +5,6 @@
  * FLOW part of the detection engine.
  */
 
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "decode.h"
index 0b299c7afbd2b3df43b30c47bf3bc271e5f62a22..6ce13ab755b9c2f320bf12e07a8c3a99b7d6f747 100644 (file)
@@ -18,9 +18,6 @@
  *
  */
 
-#include <ctype.h>
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
index cdbdfdee90f64a210b96043679c295428a59139d..c40eb6d213d260de93b074d823a0ecf27f165991 100644 (file)
@@ -2,9 +2,6 @@
  *
  * Copyright (C) 2008 by Victor Julien <victor@inliniac.net> */
 
-#include <ctype.h>
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
index d0bc274ef536641c8347d86afd187641405a7b66..071b2041e8f7fd95c735036ed0d560a13a4731e1 100644 (file)
@@ -5,8 +5,6 @@
  * ISDATAAT part of the detection engine.
  */
 
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "decode.h"
index 0348a2fac773dd62577182ab0bfb54ff829da5b7..0fd20f679de68e70b46f6f818314b5ef294ae3da 100644 (file)
@@ -1,8 +1,7 @@
 /* METADATA part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
 
 int DetectMetadataSetup (DetectEngineCtx *, Signature *s, SigMatch *m, char *str);
 
index be388c46d37ab437caadb79520f7a3fcec82411b..d782bb887e21d837672091bf9dd6dbfe23eb2da0 100644 (file)
@@ -1,8 +1,7 @@
 /* MSG part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
 
 int DetectMsgSetup (DetectEngineCtx *de_ctx, Signature *s, SigMatch *m, char *msgstr);
 
index 2cb49330c3e9e39ac73541d6530e65365879651c..474293c64071f2b0ba12af6aac7404a76fa2d073 100644 (file)
@@ -1,10 +1,7 @@
 /* NOALERT part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
-
-#include <pcre.h>
 
 int DetectNoalertSetup (DetectEngineCtx *, Signature *, SigMatch *, char *);
 
index 5b164a3eb568ea247ab2b0c51b74e234aa380501..be455f7c44e27d0a71fd42b418e5bac5e098482d 100644 (file)
@@ -5,7 +5,6 @@
 #include "detect.h"
 #include "flow-var.h"
 
-#include <pcre.h>
 #include "detect-content.h"
 #include "detect-uricontent.h"
 #include "detect-pcre.h"
index e1a13467e2a055ea3ec8b57eb89521fc95ba9fcc..b4c2bec377ec43c2dccb14ea09b35fe1c2b5b71c 100644 (file)
@@ -1,10 +1,11 @@
 /* OFFSET part of the detection engine. */
 
+#include "eidps-common.h"
+
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
 
-#include <pcre.h>
 #include "detect-content.h"
 #include "detect-pcre.h"
 
index 3fd563c2c08f63e309313807df9299a1c3561be2..2cc9272be0d209863dac4ecdb9da136d30b7f59f 100644 (file)
@@ -1,7 +1,5 @@
 /* signature parser */
 
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 
index 6cdfd4400a8b5d556b5b9e96f089a7f488dc1469..8768b41e71e0fbf8802afa3de5c4968f0c410f34 100644 (file)
@@ -1,7 +1,5 @@
 /* PCRE part of the detection engine. */
 
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "decode.h"
index f439131c7d9f92454d6e2ee46689e59595576672..afa299cc09450750691d801fe7a4cd5686f4eb9e 100644 (file)
@@ -2,9 +2,6 @@
  *
  * Copyright (C) 2008 by Victor Julien <victor@inliniac.net> */
 
-#include <ctype.h>
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
index f963b0e1aa8bd4b8d09a5052c487695204b89626..c5c698fb06afc280804e595961478a944dbf71bd 100644 (file)
@@ -1,8 +1,7 @@
 /* PRIORITY part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
 
 int DetectPrioritySetup (DetectEngineCtx *, Signature *s, SigMatch *m, char *sidstr);
 
index dff6bdbdfa730f859d7af7c494df8fb87d55c8fb..cbe8f3562c2c83a525a20b414e7e7bf81035871f 100644 (file)
@@ -1,10 +1,11 @@
 /* RAWBYTES part of the detection engine. */
 
+#include "eidps-common.h"
+
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
 
-#include <pcre.h>
 #include "detect-content.h"
 #include "detect-pcre.h"
 
index 5a437bae069a6925b4e09dd46cece833fe5a7700..c25c6478e8b98d6b3f8dbcf2c49ca54d4c8a3caa 100644 (file)
@@ -5,12 +5,11 @@
  *
  * Note: non Snort compatible. */
 
+#include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
 
-#include <pcre.h>
-
 int DetectRecursiveSetup (DetectEngineCtx *, Signature *, SigMatch *, char *);
 
 void DetectRecursiveRegister (void) {
index 0cdae4887ded6bd8ff106899775677063c8e5bab..6aa38bc924e4832b469d1e710698b0ddc8393677 100644 (file)
@@ -1,8 +1,7 @@
 /* REFERENCE part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
 
 int DetectReferenceSetup (DetectEngineCtx *, Signature *s, SigMatch *m, char *str);
 
index 6b86652528b3ae6b7fbad6c62d5fd992bb55cccf..426a330292e75ba479c757a0683b340422574d0e 100644 (file)
@@ -1,8 +1,7 @@
 /* REV part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
 
 int DetectRevSetup (DetectEngineCtx *, Signature *s, SigMatch *m, char *str);
 
index ea2521245610f650c95ac25dc1e79297e6fa513a..0dd39391f071c9200425aed2467eb527c36e2a55 100644 (file)
@@ -1,8 +1,7 @@
 /* SID part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
 
 int DetectSidSetup (DetectEngineCtx *, Signature *s, SigMatch *m, char *sidstr);
 
index 2cc28b336ab2585fc481a1fef5e2c02d268d24df..a0e55ef957718174a34c3913741ca11b4c9ed2bd 100644 (file)
@@ -5,10 +5,7 @@
  * Stream size for the engine.
  */
 
-#include <pcre.h>
-#include <string.h>
-
-#include "eidps.h"
+#include "eidps-common.h"
 #include "stream-tcp.h"
 #include "util-unittest.h"
 #include "detect.h"
index 82b44ba109db58381830fc309da50b0579f8e6ac..fc1506947df326ca791874b3413c85055d370e5a 100644 (file)
@@ -1,8 +1,7 @@
 /* THRESHOLD part of the detection engine. */
 
-#include "decode.h"
+#include "eidps-common.h"
 #include "detect.h"
-#include "flow-var.h"
 
 int DetectThresholdSetup (DetectEngineCtx *, Signature *s, SigMatch *m, char *str);
 
index 707b1e22c4b418fc119333366aec7ea422a874fd..db74d6539ad849fa24ef67653f0d812cc48a3100 100644 (file)
@@ -2,8 +2,6 @@
  *
  * Copyright (C) 2008 by Victor Julien <victor@inliniac.net> */
 
-#include <ctype.h>
-
 #include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
index c13ae7cf7bd549857ee94d2f1377cb036575cdeb..d3a415badfcd5ced58c05d45eb398e0077250549 100644 (file)
@@ -5,8 +5,6 @@
  * WINDOW tcp window option, part of the detection engine.
  */
 
-#include <pcre.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "decode.h"
index ea56b85d74a18143b5fd60665436cc50218e9550..cfe5f86e2ad1a8483b885535dbea2f15a482760c 100644 (file)
@@ -4,11 +4,10 @@
  *  \author Victor Julien <victor@inliniac.net>
  *  \todo within logic is not Snort compat atm: it is applied to pcre and uricontent as well */
 
+#include "eidps-common.h"
 #include "decode.h"
 #include "detect.h"
 #include "flow-var.h"
-
-#include <pcre.h>
 #include "detect-content.h"
 #include "detect-uricontent.h"
 #include "detect-pcre.h"
index 0f9937992245bf09cd6595de43f0bd7911097938..f51f312b66c4af8c181d051cecf4548a7e79707e 100644 (file)
@@ -1,7 +1,6 @@
 /* Basic detection engine */
 
-#include <pcre.h>
-
+#include "eidps-common.h"
 #include "eidps.h"
 #include "debug.h"
 #include "detect.h"
index b6919d5f01c88440e9c77ac819fc4f3b12ef00aa..6ca2532df0e30820eb1271b397a7a9f43cffff31 100644 (file)
 #define TRUE   1
 #define FALSE  0
 
+#include <sys/types.h> /* for gettid(2) */
+#define _GNU_SOURCE
+#define __USE_GNU
+#include <sys/syscall.h>
+#include <sched.h>     /* for sched_setaffinity(2) */
+
+#include <stdio.h>
 #include <stdint.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
 #include <inttypes.h>
+#include <limits.h>
+#include <ctype.h>
+#include <string.h>
+
+#include <pcre.h>
+#include <pthread.h>
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/time.h>
+#include <sys/signal.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <net/if.h>
 
 #include <assert.h>
 #define BUG_ON(x) assert(!(x))
index ee047d027c8d234c50a3aff8a6894c049a57c53d..fb12f890e490f0a05e52ed4fa891b838946c10c1 100644 (file)
@@ -1,21 +1,9 @@
 /* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
 
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "eidps-common.h"
 
-#include <errno.h>
-#include <stdio.h>
-#include <sys/signal.h>
 #include <getopt.h>
 
-/** \todo These are covered by HAVE_* macros */
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <netinet/in.h>
-
 #include "eidps.h"
 #include "decode.h"
 #include "detect.h"
index 269e5d46bd443f790877b3c3f8db7f5484062aad..9b29b0592122f35af1e33d742f3cfef1e0400d9d 100644 (file)
@@ -11,7 +11,7 @@
  *   multiple times, we can operate on all of them.
  */
 
-#include <ctype.h>
+#include "eidps-common.h"
 #include "threads.h"
 #include "flow-bit.h"
 #include "flow.h"
index fafb64f59ff19e61a8ce1624ebba25568962e673..4d3620a73166a2d7b69a594366baf5d64d4ea5a7 100644 (file)
@@ -1,5 +1,6 @@
 /* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
 
+#include "eidps-common.h"
 #include "threads.h"
 #include "decode.h"
 #include "debug.h"
index def83ac4e8b596ef7fe6d5ea9e2c2f2a3b93c54e..763cd562dd4122ce2a58711f8e5e7d7f26944bbb 100644 (file)
@@ -1,8 +1,8 @@
 /* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
 
+#include "eidps-common.h"
 #include "threads.h"
 #include "debug.h"
-
 #include "flow-queue.h"
 #include "flow-util.h"
 
index fb4c6b68a66a4bb3027ddc28cb5879ced43cde02..8294873e34f9f7aeeca151c5ef95ae19aa67fc3d 100644 (file)
@@ -8,8 +8,6 @@
  *   multiple times, we can operate on all of them.
  */
 
-#include <ctype.h>
-
 #include "eidps-common.h"
 #include "threads.h"
 #include "flow-var.h"
index 43502886a6389624c0a2677ff53ac20f1513ab58..cec9fb481fdf267595e0c074b9d7693d2110312d 100644 (file)
@@ -1,3 +1,4 @@
+#include "eidps-common.h"
 #include "host.h"
 
 Host *HostAlloc(void) {
index c2fcba7de90f76ca3f2defc9799457080470512c..037035ed3902767f94a24a4914ef39003b5646d2 100644 (file)
@@ -2,7 +2,6 @@
 #define __HOST_H__
 
 #include "decode.h"
-
 #include "util-hash.h"
 #include "util-bloomfilter-counting.h"
 
index 451b87fc6366c60a7d650732fe593b0cef19ab43..1cca706419232f6d151ca87936c48a49d72e8873 100644 (file)
@@ -4,18 +4,6 @@
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
 #include "debug.h"
 #include "detect.h"
index 522fb1b6c6dd7e1d69199b93cd593db61500f248..ffcdea91d7185c826ab82e3a5a2e639699503724 100644 (file)
@@ -8,8 +8,6 @@
  *   multiple times, we can operate on all of them.
  */
 
-#include <ctype.h>
-
 #include "eidps-common.h"
 #include "decode.h"
 #include "pkt-var.h"
index fd9690ddc91bc4d47f8f7a6259a228c06c2980d2..ef65a9e8b02cb2980dc3a7d64ee7528c589ea331 100644 (file)
  * to be the default in flexresp and iptables
  */
 
-#include <pthread.h>
-#include <sys/signal.h>
-#include <libnet.h>
 
 #include "eidps-common.h"
+
+#include <libnet.h>
+
 #include "decode.h"
 #include "decode-ipv4.h"
 #include "decode-tcp.h"
index 612c823aa37f95b58f4628a2c70d3b8d33f72c1c..ab005fd74dd21118d55a21a8e3757691f17687c7 100644 (file)
  *   just return 0 always, error handling is a TODO in the threading model (VJ)
  */
 
-#include <pthread.h>
-#include <sys/signal.h>
-#include <libnet.h>
-
 #include "eidps-common.h"
 #include "decode.h"
 #include "packet-queue.h"
index af539ee89ff5cc9736fb8547c2a71e26a3ac619f..5dc4528b4964da88ce85384374572bcbfc1c6bf1 100644 (file)
@@ -7,9 +7,6 @@
  *
  */
 
-#include <pthread.h>
-#include <sys/signal.h>
-
 #include "eidps-common.h"
 #include "eidps.h"
 #include "decode.h"
index 5e00404099e07fa97844c7c1d7e9b4aac994070a..f5ba02d07cb81b9d7498c78d40e536d7dc11cbc9 100644 (file)
@@ -6,21 +6,13 @@
  *
  */
 
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/signal.h>
-
-/** \todo These are covered by HAVE_* macros */
-#include <pthread.h>
-
 #if LIBPCAP_VERSION_MAJOR == 1
 #include <pcap/pcap.h>
 #else
 #include <pcap.h>
 #endif
 
+#include "eidps-common.h"
 #include "eidps.h"
 #include "decode.h"
 #include "packet-queue.h"
index 5a8d907f38801809fd560a29e6c817b9329d6c7d..1548feacfbe733bac87dfdffbcce88080df68628 100644 (file)
@@ -1,20 +1,12 @@
 /* Copyright (c) 2009 Victor Julien <victor@inliniac.net> */
 
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/signal.h>
-
-/** \todo These are covered by HAVE_* macros */
-#include <pthread.h>
-
 #if LIBPCAP_VERSION_MAJOR == 1
 #include <pcap/pcap.h>
 #else
 #include <pcap.h>
 #endif
 
+#include "eidps-common.h"
 #include "eidps.h"
 #include "decode.h"
 #include "packet-queue.h"
index 2d61fadaf73452ef4941a3dfc1bc9815d2b63d06..f0049e53f50bcd697644d838a16e246c92103259 100644 (file)
  * \todo segment insert fasttrack: most pkts are in order
 */
 
-#include "eidps.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
+#include "eidps.h"
 #include "debug.h"
 #include "detect.h"
 #include "flow.h"
index d914aa42f6cd2bf880345f389d28fad3167e0d0a..38727c9060323af65da9457637012ba8e3b2c341 100644 (file)
@@ -1,19 +1,6 @@
 /* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
 /*  2009 Gurvinder Singh <gurvindersinghdahiya@gmail.com>*/
 
-
-#include <malloc.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
 #include "eidps-common.h"
 #include "decode.h"
 #include "debug.h"
index 4f312ddc04670564fff2119d0c08b5d6d9005cbc..f7bfc4ed3f3bba51870780906479581a856a5938 100644 (file)
@@ -1,34 +1,34 @@
 /* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
 
+#include "eidps-common.h"
 #include "decode.h"
 
 #ifdef DBG_THREADS
-#include <pthread.h>
 
 int mutex_lock_dbg (pthread_mutex_t *m) {
     int ret;
 
-    printf("%16s: (%p) locking mutex %p\n", __FUNCTION__, pthread_self(), m);
+    printf("%16s: (%"PRIuMAX") locking mutex %p\n", __FUNCTION__, (uintmax_t)pthread_self(), m);
     ret = pthread_mutex_lock(m);
-    printf("%16s: (%p) locked mutex %p ret %" PRId32 "\n", __FUNCTION__, pthread_self(), m, ret);
+    printf("%16s: (%"PRIuMAX") locked mutex %p ret %" PRId32 "\n", __FUNCTION__, (uintmax_t)pthread_self(), m, ret);
     return(ret);
 }
 
 int mutex_trylock_dbg (pthread_mutex_t *m) {
     int ret;
 
-    printf("%16s: (%p) trylocking mutex %p\n", __FUNCTION__, pthread_self(), m);
+    printf("%16s: (%"PRIuMAX") trylocking mutex %p\n", __FUNCTION__, (uintmax_t)pthread_self(), m);
     ret = pthread_mutex_trylock(m);
-    printf("%16s: (%p) trylocked mutex %p ret %" PRId32 "\n", __FUNCTION__, pthread_self(), m, ret);
+    printf("%16s: (%"PRIuMAX") trylocked mutex %p ret %" PRId32 "\n", __FUNCTION__, (uintmax_t)pthread_self(), m, ret);
     return(ret);
 }
 
 int mutex_unlock_dbg (pthread_mutex_t *m) {
     int ret;
 
-    printf("%16s: (%p) unlocking mutex %p\n", __FUNCTION__, pthread_self(), m);
+    printf("%16s: (%"PRIuMAX") unlocking mutex %p\n", __FUNCTION__, (uintmax_t)pthread_self(), m);
     ret = pthread_mutex_unlock(m);
-    printf("%16s: (%p) unlocked mutex %p ret %" PRId32 "\n", __FUNCTION__, pthread_self(), m, ret);
+    printf("%16s: (%"PRIuMAX") unlocked mutex %p ret %" PRId32 "\n", __FUNCTION__, (uintmax_t)pthread_self(), m, ret);
     return(ret);
 }
 
index 6465c3283f17383ab582e693a89f8654da7ca91a..a97e27482934fc0ac796f562daa851acf499ec08 100644 (file)
@@ -1,8 +1,5 @@
 /* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "eidps-common.h"
 #include "packet-queue.h"
 #include "tm-modules.h"
index 2b626442d845be98d71fac63dd9c1803bc068efd..bbd32dc06f45061084dfedfe30ae014cff555725 100644 (file)
@@ -3,12 +3,7 @@
  *  \author Anoop Saldanha <poonaatsoc@gmail.com>
  */
 
-#include <sys/types.h> /* for gettid(2) */
-#define _GNU_SOURCE
-#define __USE_GNU
-#include <sys/syscall.h>
-#include <sched.h>     /* for sched_setaffinity(2) */
-
+#include "eidps-common.h"
 #include "eidps.h"
 #include "stream.h"
 #include "threadvars.h"
index 989c30e7896fc45675dee4a45218ee220f1a7466..4170255eeab992546e95b288a5b7160fa6a34ebe 100644 (file)
@@ -1,11 +1,6 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdint.h>
-#include <ctype.h>
-#include <inttypes.h>
+#include "eidps-common.h"
 
-/* XXX replace this by a better algo */
+/** \todo replace this by a better algo */
 
 uint8_t nocasetable[256];
 #define _nc(c) nocasetable[(c)]
index 11c49fa9e349a7151c406c2a16551dfe663aabd1..9488524c9e66d35c744e856cfdc74ee03a6618d7 100644 (file)
@@ -4,15 +4,8 @@
  * counters.
  */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-
 #include "eidps-common.h"
-
 #include "util-bloomfilter-counting.h"
-
 #include "util-unittest.h"
 
 /* type: 1, 2 or 4 for 8, 16, or 32 bit counters
index d7b378174380c7ba3b7f5ad6b4af729cca5e4600..91d49107347c32492e76904971f0322ef497f5bb 100644 (file)
@@ -2,15 +2,8 @@
 
 /* Bitwise bloom filter implementation. */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-
 #include "eidps-common.h"
-
 #include "util-bloomfilter.h"
-
 #include "util-unittest.h"
 
 BloomFilter *BloomFilterInit(uint32_t size, uint8_t iter, uint32_t (*Hash)(void *, uint16_t, uint8_t, uint32_t)) {
index 266b11c407f3a070473b3d13caf7b705d47a7989..086a008b3c645d68bd9ffa32ceb25fa69b92cbe5 100644 (file)
@@ -1,9 +1,4 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <inttypes.h>
-
+#include "eidps-common.h"
 #include "util-byte.h"
 #include "util-unittest.h"
 
index f32afb102d6f5146683d37486a544278ffd582f3..b6882536784dab8a8db92632953cc94d67da06ac 100644 (file)
@@ -1,7 +1,4 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <arpa/inet.h>
+#include "eidps-common.h"
 
 static uint32_t cidrs[33];
 
index 5ba8bf69c88af3ff9fecb643b61f7497919af2fb..de88551cf221c2ebff0c01bf7b71030a76a00780 100644 (file)
@@ -5,15 +5,8 @@
  * The 'Free' pointer can be used to have the API free your
  * hashed data. If it's NULL it's the callers responsebility */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-#include <stdint.h>
-#include <inttypes.h>
-
+#include "eidps-common.h"
 #include "util-hash.h"
-
 #include "util-unittest.h"
 
 HashTable* HashTableInit(uint32_t size, uint32_t (*Hash)(struct HashTable_ *, void *, uint16_t), char (*Compare)(void *, uint16_t, void *, uint16_t), void (*Free)(void *)) {
index 1b585e5b6f42c395898837037f3936043b053dd7..32de6e708a6698d977c142ed4d5c541f9d88bbcb 100644 (file)
@@ -5,15 +5,8 @@
  * The 'Free' pointer can be used to have the API free your
  * hashed data. If it's NULL it's the callers responsebility */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-#include <stdint.h>
-#include <inttypes.h>
-
+#include "eidps-common.h"
 #include "util-hashlist.h"
-
 #include "util-unittest.h"
 
 HashListTable* HashListTableInit(uint32_t size, uint32_t (*Hash)(struct HashListTable_ *, void *, uint16_t), char (*Compare)(void *, uint16_t, void *, uint16_t), void (*Free)(void *)) {
index 8fbd37910ead24b256a6aa45484acfb960b8053a..2ad0f830cc377f0557c7a2b796a25126645c14b6 100644 (file)
 
 //#define PRINTMATCH
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdint.h>
-#include <inttypes.h>
-
+#include "eidps-common.h"
 #include "eidps.h"
 #include "detect.h"
 #include "util-bloomfilter.h"
index 0510cbf631ca1c44e369b9b9819aa94c94956438..885765932785ba4662f0191d1e69daef91b5a4f7 100644 (file)
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
+#include "eidps-common.h"
 #include "eidps.h"
 #include "util-bloomfilter.h"
 #include "util-mpm-b3g.h"
index 907141cb69d54ab6c1c8efe3e4c46f74a359a522..f3d53ac911d5648e1873921028faf5ace4957cd8 100644 (file)
  *  - make sure runtime counters can be disabled (at compile time)
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
 #include "eidps-common.h"
+#include "eidps.h"
 #include "util-mpm.h"
 #include "util-mpm-wumanber.h"
 
index 71dd3672c87ae752e1904920b13452bd1a04f89e..f8a6fe883dfa1d590ec617e725ea3f34e82d4f8a 100644 (file)
@@ -1,10 +1,3 @@
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
 #include "eidps-common.h"
 #include "util-mpm.h"
 
index 1b35fbd68479b808bdd58e29f3e43065bf52f5a5..2aaac8125a4fc0bc82a543f9b3547bd1cd17cca8 100644 (file)
@@ -1,14 +1,7 @@
 /* Copyright (c) 2008 by Victor Julien <victor@inliniac.net> */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-
 #include "eidps-common.h"
-
 #include "util-pool.h"
-
 #include "util-unittest.h"
 
 Pool *PoolInit(uint32_t size, uint32_t prealloc_size, void *(*Alloc)(void *), void *AllocData, void (*Free)(void *))
index cc8b0d6fa99847244b296aa98a68273b1a0327eb..a2482f511a8089608ce3754d241fda89ed93c680 100644 (file)
@@ -1,10 +1,5 @@
 /* Copyright (c) 2008 by Victor Julien <victor@inliniac.net> */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
 #include "eidps-common.h"
 
 void PrintRawUriFp(FILE *fp, uint8_t *buf, uint32_t buflen) {
index ee041c92e3d94ad2fbd0af6a7bcda86783fea791..70633f4e3e6ca87e342a8ff3a2689a98f6989d66 100644 (file)
@@ -1,7 +1,3 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
 #include "eidps-common.h"
 #include "util-unittest.h"