home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR3
/
KA9Q212.ZIP
/
FILTER.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-16
|
1KB
|
37 lines
/****************************************************************************
* $Id: filter.h 1.2 93/07/16 11:44:39 ROOT_DOS Exp $
* 14 Jun 93 1.2 GT Enable ip_filter () prototype. *
****************************************************************************/
#ifndef _FILTER_H
#define _FILTER_H
#ifndef _GLOBAL_H
#include "global.h"
#endif
#define FILTER_ACTION_DENY 1
#define FILTER_ACTION_PERMIT 2
/*
* Filter entry structure.
*/
struct filter {
struct filter *next; /* Link to next filter element */
short action; /* Filter entry match action */
int (*type) __ARGS((struct mbuf *bp, struct ip *ip, struct filter *fp)); /* Packet type comparison f(x) */
struct filtersd {
unsigned long addr; /* Address used for comparisons */
unsigned long mask; /* Address comparison mask */
unsigned char bits; /* One bits in high part of mask*/
unsigned char exclude; /* Exclude matching addresses */
unsigned short port; /* TCP/UDP port (low of range) */
unsigned short hiport; /* High port of range */
} src, dest;
unsigned long matches; /* Number of matching packets */
};
int doipfilter __ARGS(( int argc, char *argv[], void *p ));
int ip_filter __ARGS(( struct mbuf *bp, struct ip *ip, struct filter *fp ));
#endif /* _FILTER_H */