Reorganize header inclusions.

remotes/origin/master-1.0.x
Victor Julien 16 years ago
parent 1727d191a4
commit 0d0ffb9963

@ -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"

@ -12,18 +12,6 @@
* - 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"

@ -12,18 +12,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"

@ -12,18 +12,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"

@ -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"

@ -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>

@ -14,12 +14,6 @@
* \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"

@ -7,8 +7,6 @@
#ifndef __CONF_H__
#define __CONF_H__
#include <inttypes.h>
/**
* The default log directory.
*/

@ -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"

@ -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"

@ -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"

@ -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 */

@ -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

@ -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"

@ -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"

@ -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"

@ -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

@ -13,17 +13,6 @@
//#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__ */

@ -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"

@ -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"

@ -1,5 +1,6 @@
/* CLASSTYPE part of the detection engine. */
#include "eidps-common.h"
#include "decode.h"
#include "detect.h"
#include "flow-var.h"

@ -26,23 +26,18 @@
*
*/
#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 *);

@ -5,8 +5,6 @@
* Checksum keyword for the the detection engine.
*/
#include <pcre.h>
#include "eidps-common.h"
#include "debug.h"
#include "decode.h"

@ -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;

@ -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"

@ -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"

@ -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;

@ -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"

@ -5,6 +5,8 @@
* XXX unit test the join code
*/
#include "eidps-common.h"
#include "decode.h"
#include "detect.h"
#include "flow-var.h"

@ -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"

@ -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"

@ -5,8 +5,6 @@
* FLOW part of the detection engine.
*/
#include <pcre.h>
#include "eidps-common.h"
#include "debug.h"
#include "decode.h"

@ -18,9 +18,6 @@
*
*/
#include <ctype.h>
#include <pcre.h>
#include "eidps-common.h"
#include "decode.h"
#include "detect.h"

@ -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"

@ -5,8 +5,6 @@
* ISDATAAT part of the detection engine.
*/
#include <pcre.h>
#include "eidps-common.h"
#include "debug.h"
#include "decode.h"

@ -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);

@ -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);

@ -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 *);

@ -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"

@ -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"

@ -1,7 +1,5 @@
/* signature parser */
#include <pcre.h>
#include "eidps-common.h"
#include "debug.h"

@ -1,7 +1,5 @@
/* PCRE part of the detection engine. */
#include <pcre.h>
#include "eidps-common.h"
#include "debug.h"
#include "decode.h"

@ -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"

@ -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);

@ -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"

@ -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) {

@ -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);

@ -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);

@ -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);

@ -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"

@ -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);

@ -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"

@ -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"

@ -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"

@ -1,7 +1,6 @@
/* Basic detection engine */
#include <pcre.h>
#include "eidps-common.h"
#include "eidps.h"
#include "debug.h"
#include "detect.h"

@ -10,8 +10,37 @@
#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))

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -1,3 +1,4 @@
#include "eidps-common.h"
#include "host.h"
Host *HostAlloc(void) {

@ -2,7 +2,6 @@
#define __HOST_H__
#include "decode.h"
#include "util-hash.h"
#include "util-bloomfilter-counting.h"

@ -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"

@ -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"

@ -14,11 +14,11 @@
* 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"

@ -11,10 +11,6 @@
* 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"

@ -7,9 +7,6 @@
*
*/
#include <pthread.h>
#include <sys/signal.h>
#include "eidps-common.h"
#include "eidps.h"
#include "decode.h"

@ -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"

@ -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"

@ -11,20 +11,8 @@
* \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"

@ -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"

@ -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);
}

@ -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"

@ -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"

@ -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)]

@ -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

@ -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)) {

@ -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"

@ -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];

@ -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 *)) {

@ -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 *)) {

@ -14,14 +14,7 @@
//#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"

@ -12,12 +12,7 @@
*
*/
#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"

@ -15,13 +15,8 @@
* - 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"

@ -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"

@ -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 *))

@ -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) {

@ -1,7 +1,3 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "eidps-common.h"
#include "util-unittest.h"

Loading…
Cancel
Save