2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * @(#)ip_fil.h 1.35 6/5/96
7 * $Id: ipmon.h,v 2.8 2003/07/25 22:16:20 darrenr Exp $
11 typedef struct ipmon_action
{
12 struct ipmon_action
*ac_next
;
13 int ac_mflag
; /* collection of things to compare */
14 int ac_dflag
; /* flags to compliment the doing fields */
15 int ac_syslog
; /* = 1 to syslog rules. */
16 char *ac_savefile
; /* filename to save log records to */
19 char ac_group
[FR_GROUPLEN
];
22 int ac_type
; /* nat/state/ipf */
34 char *ac_exec
; /* execute argument */
35 char *ac_run
; /* actual command that gets run */
38 * used with ac_packet/ac_second
40 struct timeval ac_last
;
44 #define ac_lastsec ac_last.tv_sec
45 #define ac_lastusec ac_last.tv_usec
48 * Flags indicating what fields to do matching upon (ac_mflag).
50 #define IPMAC_DIRECTION 0x0001
51 #define IPMAC_DSTIP 0x0002
52 #define IPMAC_DSTPORT 0x0004
53 #define IPMAC_EVERY 0x0008
54 #define IPMAC_GROUP 0x0010
55 #define IPMAC_INTERFACE 0x0020
56 #define IPMAC_LOGTAG 0x0040
57 #define IPMAC_NATTAG 0x0080
58 #define IPMAC_PROTOCOL 0x0100
59 #define IPMAC_RESULT 0x0200
60 #define IPMAC_RULE 0x0400
61 #define IPMAC_SRCIP 0x0800
62 #define IPMAC_SRCPORT 0x1000
63 #define IPMAC_TYPE 0x2000
64 #define IPMAC_WITH 0x4000
68 #define IPMR_NOMATCH 3
71 #define IPMDO_SAVERAW 0x0001
73 #define OPT_SYSLOG 0x001
74 #define OPT_RESOLVE 0x002
75 #define OPT_HEXBODY 0x004
76 #define OPT_VERBOSE 0x008
77 #define OPT_HEXHDR 0x010
78 #define OPT_TAIL 0x020
80 #define OPT_STATE 0x100
81 #define OPT_FILTER 0x200
82 #define OPT_PORTNUM 0x400
83 #define OPT_LOGALL (OPT_NAT|OPT_STATE|OPT_FILTER)
85 #define HOSTNAME_V4(a,b) hostname((a), 4, (u_32_t *)&(b))
88 #define LOGFAC LOG_LOCAL0
91 extern int load_config
__P((char *));
92 extern void dumphex
__P((FILE *, int, char *, int));
93 extern int check_action
__P((char *, char *, int, int));
94 extern char *getword
__P((int));