pfil.h revision 381a2a9a387f449fab7d0c7e97c4184c26963abf
/*
* Copyright (C) 2003 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef _NET_PFIL_H_
#define _NET_PFIL_H_
#define PFIL_RELEASE "2.1.6"
#define PFIL_VERSION 2010600
#define PFIL_INTERFACE 2000000
#ifndef __P
# ifdef __STDC__
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
#ifdef sun
# if SOLARIS2 < 9
# include <netinet/in_systm.h>
# endif
#endif
#ifdef __hpux
# include <netinet/in_systm.h>
#endif
typedef struct packet_filter_hook {
struct packet_filter_hook *pfil_next;
struct packet_filter_hook **pfil_pnext;
void *, mblk_t **));
int pfil_flags;
typedef struct pfil_list {
struct packet_filter_hook *pfl_top;
struct packet_filter_hook **pfl_tail;
} pfil_list_t;
/*
** HP Port
** spinlocks should be the first member for
** alignment reason. Spinlocks need to be 16 byte
** aligned. The struct itself is aligned during
** allocation so that the spinlock starts at a
** 16 byte boundary
*/
typedef struct pfil_head {
int ph_init;
} pfil_head_t;
#define PFIL_IN 0x00000001
#define PFIL_OUT 0x00000002
#define PFIL_WAITOK 0x00000004
#define PFIL_GROUP 0x00000008
/* HPUX Port Major no. for pfil spinlocks */
#define PFIL_SMAJ 0
void *, mblk_t **)), int,
struct pfil_head *));
void *, mblk_t **)), int,
struct pfil_head *));
int pfil_sendbuf(mblk_t *);
char *, queue_t **));
extern int pfilinterface;
extern int pfil_delayed_copy;
extern int pfildebug;
extern krwlock_t qif_rwlock;
/*
* NOTE: On Solaris, even though pfilwput(), etc, are prototyped as returning
* an int, the return value is never checked and much code ignores it, anyway,
* so for performance reasonsm, various functions return void instead of int.
*/
extern int pfil_nd_init __P((void));
extern void pfil_nd_fini __P((void));
extern void pfil_startup __P((void));
#ifdef USE_SERVICE_ROUTINE
#else
#define pfilmodrsrv NULL
#endif
#ifdef IRE_ILL_CN
void pfil_addif(queue_t *, const char *, int);
#endif
extern int pfildebug;
#endif /* _NET_PFIL_H_ */