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