undo: don't run diff between last tid and tid_max
[dragonfly.git] / contrib / ipfilter / ipf.h
blob9260d03f0a5320de5324e71c5daeabaefd0f8ae3
1 /*
2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * @(#)ipf.h 1.12 6/5/96
7 * $Id: ipf.h,v 2.9.2.7 2003/05/15 17:45:33 darrenr Exp $
8 */
10 #ifndef __IPF_H__
11 #define __IPF_H__
13 #ifndef SOLARIS
14 #define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
15 #endif
16 #define OPT_REMOVE 0x000001
17 #define OPT_DEBUG 0x000002
18 #define OPT_OUTQUE FR_OUTQUE /* 0x00004 */
19 #define OPT_INQUE FR_INQUE /* 0x00008 */
20 #define OPT_LOG FR_LOG /* 0x00010 */
21 #define OPT_SHOWLIST 0x000020
22 #define OPT_VERBOSE 0x000040
23 #define OPT_DONOTHING 0x000080
24 #define OPT_HITS 0x000100
25 #define OPT_BRIEF 0x000200
26 #define OPT_ACCNT FR_ACCOUNT /* 0x0400 */
27 #define OPT_FRSTATES FR_KEEPFRAG /* 0x0800 */
28 #define OPT_IPSTATES FR_KEEPSTATE /* 0x1000 */
29 #define OPT_INACTIVE FR_INACTIVE /* 0x2000 */
30 #define OPT_SHOWLINENO 0x004000
31 #define OPT_PRINTFR 0x008000
32 #define OPT_ZERORULEST 0x010000
33 #define OPT_SAVEOUT 0x020000
34 #define OPT_AUTHSTATS 0x040000
35 #define OPT_RAW 0x080000
36 #define OPT_NAT 0x100000
37 #define OPT_GROUPS 0x200000
38 #define OPT_STATETOP 0x400000
39 #define OPT_FLUSH 0x800000
40 #define OPT_CLEAR 0x1000000
41 #define OPT_HEX 0x2000000
42 #define OPT_NODO 0x80000000
44 #define OPT_STAT OPT_FRSTATES
45 #define OPT_LIST OPT_SHOWLIST
48 #ifndef __P
49 # ifdef __STDC__
50 # define __P(x) x
51 # else
52 # define __P(x) ()
53 # endif
54 #endif
56 struct ipstate;
57 struct frpcmp;
58 struct ipnat;
59 struct nat;
61 #ifdef ultrix
62 extern char *strdup __P((char *));
63 #endif
65 extern struct frentry *parse __P((char *, int, int *));
67 extern void printfr __P((struct frentry *));
68 extern void binprint __P((struct frentry *)), initparse __P((void));
69 extern int portnum __P((char *, u_short *, int));
72 struct ipopt_names {
73 int on_value;
74 int on_bit;
75 int on_siz;
76 char *on_name;
80 extern char *proto;
81 extern char flagset[];
82 extern u_char flags[];
84 extern u_char tcp_flags __P((char *, u_char *, int));
85 extern int countbits __P((u_32_t));
86 extern int ratoi __P((char *, int *, int, int));
87 extern int ratoui __P((char *, u_int *, u_int, u_int));
88 extern int hostmask __P((char ***, u_32_t *, u_32_t *, u_short *, int *,
89 u_short *, int));
90 extern int ports __P((char ***, u_short *, int *, u_short *, int));
91 extern char *portname __P((int, int));
92 extern u_32_t buildopts __P((char *, char *, int));
93 extern int genmask __P((char *, u_32_t *));
94 extern int hostnum __P((u_32_t *, char *, int));
95 extern u_32_t optname __P((char ***, u_short *, int));
96 extern void printpacket __P((ip_t *));
97 extern void printpacket6 __P((ip_t *));
98 extern void printportcmp __P((int, struct frpcmp *));
99 extern void printhostmask __P((int, u_32_t *, u_32_t *));
100 extern void printbuf __P((char *, int, int));
101 extern char *hostname __P((int, void *));
102 extern struct ipstate *printstate __P((struct ipstate *, int));
103 extern void printnat __P((struct ipnat *, int));
104 extern void printactivenat __P((struct nat *, int));
106 #if SOLARIS
107 extern int inet_aton __P((const char *, struct in_addr *));
108 extern int gethostname __P((char *, int ));
109 extern void sync __P((void));
110 #endif
112 #if defined(sun) && !SOLARIS
113 # define STRERROR(x) sys_errlist[x]
114 extern char *sys_errlist[];
115 #else
116 # define STRERROR(x) strerror(x)
117 #endif
119 #ifndef MIN
120 #define MIN(a,b) ((a) > (b) ? (b) : (a))
121 #endif
123 #endif /* __IPF_H__ */