ipf.h revision 22514
1/* 2 * (C)opyright 1993-1996 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.0.1.1 1997/01/09 15:14:43 darrenr Exp $ 10 */ 11 12#ifndef SOLARIS 13#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) 14#endif 15#define OPT_REMOVE 0x00001 16#define OPT_DEBUG 0x00002 17#define OPT_OUTQUE FR_OUTQUE /* 0x0004 */ 18#define OPT_INQUE FR_INQUE /* 0x0008 */ 19#define OPT_LOG FR_LOG /* 0x0010 */ 20#define OPT_SHOWLIST 0x00020 21#define OPT_VERBOSE 0x00040 22#define OPT_DONOTHING 0x00080 23#define OPT_HITS 0x00100 24#define OPT_BRIEF 0x00200 25#define OPT_ACCNT FR_ACCOUNT /* 0x0400 */ 26#define OPT_FRSTATES FR_KEEPFRAG /* 0x0800 */ 27#define OPT_IPSTATES FR_KEEPSTATE /* 0x1000 */ 28#define OPT_INACTIVE FR_INACTIVE /* 0x2000 */ 29#define OPT_SHOWLINENO 0x04000 30#define OPT_PRINTFR 0x08000 31#define OPT_ZERORULEST 0x10000 32 33extern struct frentry *parse(); 34 35extern void printfr(), binprint(), initparse(); 36 37#if defined(__SVR4) || defined(__svr4__) 38#define index strchr 39#define bzero(a,b) memset(a, 0, b) 40#define bcopy(a,b,c) memmove(b,a,c) 41#endif 42 43struct ipopt_names { 44 int on_value; 45 int on_bit; 46 int on_siz; 47 char *on_name; 48}; 49 50 51extern u_long hostnum(), optname(); 52extern void printpacket(); 53#if SOLARIS 54extern int inet_aton(); 55#endif 56 57#ifdef sun 58#define STRERROR(x) sys_errlist[x] 59extern char *sys_errlist[]; 60#else 61#define STRERROR(x) strerror(x) 62#endif 63 64#ifndef MIN 65#define MIN(a,b) ((a) > (b) ? (b) : (a)) 66#endif 67 68