suricata
tmqh-nfq.c
Go to the documentation of this file.
1 /* Copyright (C) 2007-2010 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Victor Julien <victor@inliniac.net>
22  *
23  * NFQ Verdict Handler
24  */
25 
26 #include "suricata-common.h"
27 #include "packet-queue.h"
28 #include "decode.h"
29 #include "threads.h"
30 #include "threadvars.h"
31 
32 #include "tm-queuehandlers.h"
33 #include "tmqh-nfq.h"
34 
36 
37 void TmqhNfqRegister (void)
38 {
39  tmqh_table[TMQH_NFQ].name = "nfq";
42 }
43 
45 {
46 /* XXX not scaling */
47 #if 0
48  PacketQueue *q = &trans_q[p->verdict_q_id];
49 
50  SCMutexLock(&q->mutex_q);
51  PacketEnqueue(q, p);
52  SCCondSignal(&q->cond_q);
54 #endif
55 }
56 
Packet *(* InHandler)(ThreadVars *)
const char * name
Tmqh tmqh_table[TMQH_SIZE]
SCCondT cond_q
Definition: decode.h:628
#define SCMutexLock(mut)
#define SCMutexUnlock(mut)
void(* OutHandler)(ThreadVars *, Packet *)
void TmqhOutputVerdictNfq(ThreadVars *t, Packet *p)
Definition: tmqh-nfq.c:44
void TmqhNfqRegister(void)
Definition: tmqh-nfq.c:37
#define SCCondSignal
PacketQueue trans_q[256]
Definition: suricata.h:132
Per thread variable structure.
Definition: threadvars.h:57
void PacketEnqueue(PacketQueue *q, Packet *p)
Definition: packet-queue.c:139
SCMutex mutex_q
Definition: decode.h:627