suricata
source-ipfw.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2011 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 Nick Rogness <nick@rogness.net>
22 * \author Eric Leblond <eric@regit.org>
23 */
24
25#ifndef SURICATA_SOURCE_IPFW_H
26#define SURICATA_SOURCE_IPFW_H
27
28#define IPFW_MAX_QUEUE 16
29
30/* per packet IPFW vars (Not used) */
35
36typedef struct IPFWQueueVars_
37{
38 int fd;
40 uint8_t use_mutex;
41 /* this one should be not changing after init */
42 uint16_t port_num;
43 /* position into the ipfw queue var array */
44 uint16_t ipfw_index;
45 struct sockaddr_in ipfw_sin;
46 socklen_t ipfw_sinlen;
47
48#ifdef DBG_PERF
49 int dbg_maxreadsize;
50#endif /* DBG_PERF */
51
52 /* counters */
53 uint32_t pkts;
54 uint64_t bytes;
55 uint32_t errs;
56 uint32_t accepted;
57 uint32_t dropped;
58 uint32_t replaced;
59
61
62void *IPFWGetThread(int number);
63int IPFWRegisterQueue(char *queue);
64
68
69#endif /* SURICATA_SOURCE_IPFW_H */
struct IPFWPacketVars_ IPFWPacketVars
int IPFWRegisterQueue(char *queue)
Add an IPFW divert.
void TmModuleReceiveIPFWRegister(void)
Registration Function for RecieveIPFW.
struct IPFWQueueVars_ IPFWQueueVars
void TmModuleDecodeIPFWRegister(void)
Registration Function for DecodeIPFW.
void * IPFWGetThread(int number)
Get a pointer to the IPFW thread at index.
void TmModuleVerdictIPFWRegister(void)
Registration Function for VerdictIPFW.
SCMutex socket_lock
Definition source-ipfw.h:39
struct sockaddr_in ipfw_sin
Definition source-ipfw.h:45
uint32_t accepted
Definition source-ipfw.h:56
uint32_t replaced
Definition source-ipfw.h:58
uint8_t use_mutex
Definition source-ipfw.h:40
uint16_t ipfw_index
Definition source-ipfw.h:44
uint32_t pkts
Definition source-ipfw.h:53
uint32_t errs
Definition source-ipfw.h:55
uint32_t dropped
Definition source-ipfw.h:57
uint64_t bytes
Definition source-ipfw.h:54
socklen_t ipfw_sinlen
Definition source-ipfw.h:46
uint16_t port_num
Definition source-ipfw.h:42
#define SCMutex