1 | /* $NetBSD: opts.h,v 1.3 2012/09/15 16:56:05 plunky Exp $ */ |
2 | |
3 | /* |
4 | * Copyright (C) 2012 by Darren Reed. |
5 | * |
6 | * See the IPFILTER.LICENCE file for details on licencing. |
7 | * |
8 | * Id: opts.h,v 1.1.1.2 2012/07/22 13:44:25 darrenr Exp $ |
9 | */ |
10 | |
11 | #ifndef __OPTS_H__ |
12 | #define __OPTS_H__ |
13 | |
14 | #ifndef SOLARIS |
15 | # if (defined(sun) && (defined(__svr4__) || defined(__SVR4))) |
16 | # define SOLARIS 1 |
17 | # else |
18 | # define SOLARIS 0 |
19 | # endif |
20 | #endif |
21 | #define OPT_REMOVE 0x000001 |
22 | #define OPT_DEBUG 0x000002 |
23 | #define OPT_AUTHSTATS 0x000004 |
24 | #define OPT_RAW 0x000008 |
25 | #define OPT_LOG 0x000010 |
26 | #define OPT_SHOWLIST 0x000020 |
27 | #define OPT_VERBOSE 0x000040 |
28 | #define OPT_DONOTHING 0x000080 |
29 | #define OPT_HITS 0x000100 |
30 | #define OPT_BRIEF 0x000200 |
31 | #define OPT_ACCNT 0x000400 |
32 | #define OPT_FRSTATES 0x000800 |
33 | #define OPT_SHOWLINENO 0x001000 |
34 | #define OPT_PRINTFR 0x002000 |
35 | #define OPT_OUTQUE FR_OUTQUE /* 0x4000 */ |
36 | #define OPT_INQUE FR_INQUE /* 0x8000 */ |
37 | #define OPT_ZERORULEST 0x010000 |
38 | #define OPT_SAVEOUT 0x020000 |
39 | #define OPT_IPSTATES 0x040000 |
40 | #define OPT_INACTIVE 0x080000 |
41 | #define OPT_NAT 0x100000 |
42 | #define OPT_GROUPS 0x200000 |
43 | #define OPT_STATETOP 0x400000 |
44 | #define OPT_FLUSH 0x800000 |
45 | #define OPT_CLEAR 0x1000000 |
46 | #define OPT_HEX 0x2000000 |
47 | #define OPT_ASCII 0x4000000 |
48 | #define OPT_NORESOLVE 0x8000000 |
49 | #define OPT_DONTOPEN 0x10000000 |
50 | #define OPT_PURGE 0x20000000 |
51 | |
52 | #define OPT_STAT OPT_FRSTATES |
53 | #define OPT_LIST OPT_SHOWLIST |
54 | |
55 | |
56 | #ifndef __P |
57 | # ifdef __STDC__ |
58 | # define __P(x) x |
59 | # else |
60 | # define __P(x) () |
61 | # endif |
62 | #endif |
63 | |
64 | #if defined(sun) && !SOLARIS |
65 | # define STRERROR(x) sys_errlist[x] |
66 | extern char *sys_errlist[]; |
67 | #else |
68 | # define STRERROR(x) strerror(x) |
69 | #endif |
70 | |
71 | extern int opts; |
72 | |
73 | #endif /* __OPTS_H__ */ |
74 | |