ipf.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (C) 1993-2001, 2003, 2004 by Darren Reed.
* See the IPFILTER.LICENCE file for details on licencing.
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __IPF_H__
#define __IPF_H__
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*/
#ifndef _KERNEL
# define ADD_KERNEL
# define _KERNEL
# define KERNEL
#endif
#ifdef __OpenBSD__
struct file;
#endif
#ifdef ADD_KERNEL
#endif
#if __FreeBSD_version >= 300000
#endif
#include <netinet/in_systm.h>
#ifndef TCP_PAWS_IDLE /* IRIX */
#endif
#ifndef _KERNEL
#include <errno.h>
#include <limits.h>
#include <netdb.h>
#include <stdlib.h>
#include <stdio.h>
# include <strings.h>
#endif
#include <string.h>
#include <unistd.h>
#endif
#if SOLARIS2 >= 10
#include "ip_compat.h"
#include "ip_fil.h"
#include "ip_nat.h"
#include "ip_frag.h"
#include "ip_state.h"
#include "ip_proxy.h"
#include "ip_auth.h"
#include "ip_lookup.h"
#include "ip_pool.h"
#include "ip_htable.h"
#else
#include "netinet/ip_compat.h"
#include "netinet/ip_state.h"
#include "netinet/ip_proxy.h"
#include "netinet/ip_lookup.h"
#include "netinet/ip_htable.h"
#endif
#include "opts.h"
#ifndef __P
# ifdef __STDC__
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
#ifndef __STDC__
# undef const
# define const
#endif
#ifndef U_32_T
# define U_32_T 1
defined(__sgi)
# else
typedef unsigned int u_32_t;
# else
# if SOLARIS2 >= 6
# else
typedef unsigned int u_32_t;
# endif
# endif
# endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ || __sgi */
#endif /* U_32_T */
#ifndef MAXHOSTNAMELEN
# define MAXHOSTNAMELEN 256
#endif
#define MAX_ICMPCODE 16
#define MAX_ICMPTYPE 19
struct ipopt_names {
int on_value;
int on_bit;
int on_siz;
char *on_name;
};
typedef struct alist_s {
int al_not;
} alist_t;
#if defined(__NetBSD__) || defined(__OpenBSD__) || \
# include <stdarg.h>
typedef u_long ioctlcmd_t;
#else
#ifndef _KERNEL
# include <stdarg.h>
#endif
typedef int ioctlcmd_t;
# else
typedef int ioctlcmd_t;
# endif
#endif
/*
* SunOS4
*/
#endif
extern char thishost[];
extern char flagset[];
extern struct ipopt_names ionames[];
extern struct ipopt_names secclass[];
extern int use_inet6;
extern int lineNum;
#ifdef USE_INET6
extern struct ipopt_names v6ionames[];
#endif
extern char *fac_toname __P((int));
extern int fac_findname __P((char *));
extern int getportproto __P((char *, int));
#ifndef _KERNEL
#endif
#ifndef _KERNEL
#endif
extern int ipmon_parsefile __P((char *));
ioctlfunc_t));
extern void natparsefile __P((int, char *, int));
extern int pri_findname __P((char *));
extern char *pri_toname __P((int));
copyfunc_t, int));
struct iphtent_s *,
copyfunc_t, int));
#ifdef USE_INET6
#endif
extern void printifname __P((char *, char *, void *));
extern void set_variable __P((char *, char *));
extern char *get_variable __P((char *, char **, int));
extern void resetlexer __P((void));
#if SOLARIS
extern int gethostname __P((char *, int ));
#endif
#endif /* __IPF_H__ */