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 $
14 #define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
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
62 extern char *strdup
__P((char *));
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));
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 *,
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));
107 extern int inet_aton
__P((const char *, struct in_addr
*));
108 extern int gethostname
__P((char *, int ));
109 extern void sync
__P((void));
112 #if defined(sun) && !SOLARIS
113 # define STRERROR(x) sys_errlist[x]
114 extern char *sys_errlist
[];
116 # define STRERROR(x) strerror(x)
120 #define MIN(a,b) ((a) > (b) ? (b) : (a))
123 #endif /* __IPF_H__ */