1997-02-09 22:50:16 +00:00
|
|
|
/*
|
1999-11-08 20:51:23 +00:00
|
|
|
* Copyright (C) 1993-1998 by Darren Reed.
|
1997-02-09 22:50:16 +00:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms are permitted
|
|
|
|
* provided that this notice is preserved and due credit is given
|
|
|
|
* to the original author and the contributors.
|
|
|
|
*
|
|
|
|
* @(#)ipf.h 1.12 6/5/96
|
1999-11-08 20:51:23 +00:00
|
|
|
* $Id: ipf.h,v 2.1.2.1 1999/10/05 12:59:25 darrenr Exp $
|
1997-02-09 22:50:16 +00:00
|
|
|
*/
|
|
|
|
|
1997-05-25 15:45:04 +00:00
|
|
|
#ifndef __IPF_H__
|
|
|
|
#define __IPF_H__
|
|
|
|
|
1997-02-09 22:50:16 +00:00
|
|
|
#ifndef SOLARIS
|
|
|
|
#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
|
|
|
|
#endif
|
1999-11-08 20:51:23 +00:00
|
|
|
#define OPT_REMOVE 0x000001
|
|
|
|
#define OPT_DEBUG 0x000002
|
|
|
|
#define OPT_OUTQUE FR_OUTQUE /* 0x00004 */
|
|
|
|
#define OPT_INQUE FR_INQUE /* 0x00008 */
|
|
|
|
#define OPT_LOG FR_LOG /* 0x00010 */
|
|
|
|
#define OPT_SHOWLIST 0x000020
|
|
|
|
#define OPT_VERBOSE 0x000040
|
|
|
|
#define OPT_DONOTHING 0x000080
|
|
|
|
#define OPT_HITS 0x000100
|
|
|
|
#define OPT_BRIEF 0x000200
|
1997-02-09 22:50:16 +00:00
|
|
|
#define OPT_ACCNT FR_ACCOUNT /* 0x0400 */
|
|
|
|
#define OPT_FRSTATES FR_KEEPFRAG /* 0x0800 */
|
|
|
|
#define OPT_IPSTATES FR_KEEPSTATE /* 0x1000 */
|
|
|
|
#define OPT_INACTIVE FR_INACTIVE /* 0x2000 */
|
1999-11-08 20:51:23 +00:00
|
|
|
#define OPT_SHOWLINENO 0x004000
|
|
|
|
#define OPT_PRINTFR 0x008000
|
|
|
|
#define OPT_ZERORULEST 0x010000
|
|
|
|
#define OPT_SAVEOUT 0x020000
|
|
|
|
#define OPT_AUTHSTATS 0x040000
|
|
|
|
#define OPT_RAW 0x080000
|
|
|
|
#define OPT_NAT 0x100000
|
|
|
|
#define OPT_GROUPS 0x200000
|
1997-02-09 22:50:16 +00:00
|
|
|
|
1997-04-03 10:22:02 +00:00
|
|
|
#ifndef __P
|
|
|
|
# ifdef __STDC__
|
|
|
|
# define __P(x) x
|
|
|
|
# else
|
|
|
|
# define __P(x) ()
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
1997-11-16 04:52:19 +00:00
|
|
|
#ifdef ultrix
|
|
|
|
extern char *strdup __P((char *));
|
|
|
|
#endif
|
|
|
|
|
1999-11-08 20:51:23 +00:00
|
|
|
extern struct frentry *parse __P((char *, int));
|
1997-04-03 10:22:02 +00:00
|
|
|
|
|
|
|
extern void printfr __P((struct frentry *));
|
|
|
|
extern void binprint __P((struct frentry *)), initparse __P((void));
|
1999-11-08 20:51:23 +00:00
|
|
|
extern int portnum __P((char *, u_short *, int));
|
1997-02-09 22:50:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
struct ipopt_names {
|
|
|
|
int on_value;
|
|
|
|
int on_bit;
|
|
|
|
int on_siz;
|
|
|
|
char *on_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1997-11-16 04:52:19 +00:00
|
|
|
extern u_32_t buildopts __P((char *, char *, int));
|
1999-11-08 20:51:23 +00:00
|
|
|
extern u_32_t hostnum __P((char *, int *, int));
|
|
|
|
extern u_32_t optname __P((char ***, u_short *, int));
|
1997-11-16 04:52:19 +00:00
|
|
|
extern void printpacket __P((ip_t *));
|
1997-02-09 22:50:16 +00:00
|
|
|
#if SOLARIS
|
1997-04-03 10:22:02 +00:00
|
|
|
extern int inet_aton __P((const char *, struct in_addr *));
|
1999-11-08 20:51:23 +00:00
|
|
|
extern int gethostname __P((char *, int ));
|
|
|
|
extern void sync __P((void));
|
1997-02-09 22:50:16 +00:00
|
|
|
#endif
|
|
|
|
|
1999-11-08 20:51:23 +00:00
|
|
|
#if defined(sun) && !SOLARIS
|
|
|
|
# define STRERROR(x) sys_errlist[x]
|
1997-02-09 22:50:16 +00:00
|
|
|
extern char *sys_errlist[];
|
|
|
|
#else
|
1999-11-08 20:51:23 +00:00
|
|
|
# define STRERROR(x) strerror(x)
|
1997-02-09 22:50:16 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MIN
|
|
|
|
#define MIN(a,b) ((a) > (b) ? (b) : (a))
|
|
|
|
#endif
|
|
|
|
|
1997-05-25 15:45:04 +00:00
|
|
|
#endif /* __IPF_H__ */
|