]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ipfilter/ipf.h
unfinished sblive driver, playback/mixer only for now - not enabled in
[FreeBSD/FreeBSD.git] / contrib / ipfilter / ipf.h
1 /*
2  * Copyright (C) 1993-1998 by Darren Reed.
3  *
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.
7  *
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 $
10  */
11
12 #ifndef __IPF_H__
13 #define __IPF_H__
14
15 #ifndef SOLARIS
16 #define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
17 #endif
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
40
41 #ifndef __P
42 # ifdef __STDC__
43 #  define       __P(x)  x
44 # else
45 #  define       __P(x)  ()
46 # endif
47 #endif
48
49 #ifdef  ultrix
50 extern  char    *strdup __P((char *));
51 #endif
52
53 extern  struct  frentry *parse __P((char *, int));
54
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));
58
59
60 struct  ipopt_names     {
61         int     on_value;
62         int     on_bit;
63         int     on_siz;
64         char    *on_name;
65 };
66
67
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 *));
72 #if SOLARIS
73 extern  int     inet_aton __P((const char *, struct in_addr *));
74 extern  int     gethostname __P((char *, int ));
75 extern  void    sync __P((void));
76 #endif
77
78 #if defined(sun) && !SOLARIS
79 # define        STRERROR(x)     sys_errlist[x]
80 extern  char    *sys_errlist[];
81 #else
82 # define        STRERROR(x)     strerror(x)
83 #endif
84
85 #ifndef MIN
86 #define MIN(a,b)        ((a) > (b) ? (b) : (a))
87 #endif
88
89 #endif /* __IPF_H__ */