mirror of https://github.com/OISF/suricata
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.3 KiB
C
56 lines
1.3 KiB
C
/* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
|
|
|
|
/*
|
|
* Program defines
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef __EIDPS_H__
|
|
#define __EIDPS_H__
|
|
|
|
#include "eidps-common.h"
|
|
#include "packet-queue.h"
|
|
|
|
/* the name of our binary */
|
|
#define PROG_NAME "eidps"
|
|
|
|
/* max packets processed simultaniously */
|
|
#define MAX_PENDING 50
|
|
|
|
/* number of packets in processing right now
|
|
* This is the diff between recv'd and verdicted
|
|
* pkts
|
|
* XXX this should be turned into an api located
|
|
* in the packetpool code
|
|
*/
|
|
uint32_t pending;
|
|
#ifdef DBG_PERF
|
|
uint32_t dbg_maxpending;
|
|
#endif /* DBG_PERF */
|
|
pthread_mutex_t mutex_pending;
|
|
pthread_cond_t cond_pending;
|
|
|
|
/* preallocated packet structures here
|
|
* XXX move to the packetpool queue handler code
|
|
*/
|
|
PacketQueue packet_q;
|
|
/* queue's between various other threads
|
|
* XXX move to the TmQueue structure later
|
|
*/
|
|
PacketQueue trans_q[256];
|
|
|
|
/* uppercase to lowercase conversion lookup table */
|
|
uint8_t g_u8_lowercasetable[256];
|
|
/* marco to do the actual lookup */
|
|
#define u8_tolower(c) g_u8_lowercasetable[(c)]
|
|
// these 2 are slower:
|
|
//#define u8_tolower(c) ((c) >= 'A' && (c) <= 'Z') ? g_u8_lowercasetable[(c)] : (c)
|
|
//#define u8_tolower(c) ((c) >= 'A' && (c) <= 'Z') ? ((c) + ('a' - 'A')) : (c)
|
|
|
|
void EngineStop(void);
|
|
void EngineKill(void);
|
|
|
|
#endif /* __EIDPS_H__ */
|
|
|