2 * Copyright (C) 1993-1998 by Darren Reed.
4 * Redistribution and use in source and binary forms are permitted
5 * provided that this notice is preserved and due credit is given
6 * to the original author and the contributors.
8 * @(#)ipf.h 1.12 6/5/96
9 * $Id: ipf.h,v 2.1.2.1 1999/10/05 12:59:25 darrenr Exp $
16 #define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
18 #define OPT_REMOVE 0x000001
19 #define OPT_DEBUG 0x000002
20 #define OPT_OUTQUE FR_OUTQUE /* 0x00004 */
21 #define OPT_INQUE FR_INQUE /* 0x00008 */
22 #define OPT_LOG FR_LOG /* 0x00010 */
23 #define OPT_SHOWLIST 0x000020
24 #define OPT_VERBOSE 0x000040
25 #define OPT_DONOTHING 0x000080
26 #define OPT_HITS 0x000100
27 #define OPT_BRIEF 0x000200
28 #define OPT_ACCNT FR_ACCOUNT /* 0x0400 */
29 #define OPT_FRSTATES FR_KEEPFRAG /* 0x0800 */
30 #define OPT_IPSTATES FR_KEEPSTATE /* 0x1000 */
31 #define OPT_INACTIVE FR_INACTIVE /* 0x2000 */
32 #define OPT_SHOWLINENO 0x004000
33 #define OPT_PRINTFR 0x008000
34 #define OPT_ZERORULEST 0x010000
35 #define OPT_SAVEOUT 0x020000
36 #define OPT_AUTHSTATS 0x040000
37 #define OPT_RAW 0x080000
38 #define OPT_NAT 0x100000
39 #define OPT_GROUPS 0x200000
50 extern char *strdup __P((char *));
53 extern struct frentry *parse __P((char *, int));
55 extern void printfr __P((struct frentry *));
56 extern void binprint __P((struct frentry *)), initparse __P((void));
57 extern int portnum __P((char *, u_short *, int));
68 extern u_32_t buildopts __P((char *, char *, int));
69 extern u_32_t hostnum __P((char *, int *, int));
70 extern u_32_t optname __P((char ***, u_short *, int));
71 extern void printpacket __P((ip_t *));
73 extern int inet_aton __P((const char *, struct in_addr *));
74 extern int gethostname __P((char *, int ));
75 extern void sync __P((void));
78 #if defined(sun) && !SOLARIS
79 # define STRERROR(x) sys_errlist[x]
80 extern char *sys_errlist[];
82 # define STRERROR(x) strerror(x)
86 #define MIN(a,b) ((a) > (b) ? (b) : (a))
89 #endif /* __IPF_H__ */