/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_PFMOD_H
#define _SYS_PFMOD_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Ioctls.
*/
/*
* filter structure for SETF
*/
struct packetfilt {
};
/*
* The extended packet filter structure
*/
struct Pf_ext_packetfilt {
};
/*
* We now allow specification of up to MAXFILTERS (short) words of a filter
* command list to be applied to incoming packets to determine if
* those packets should be given to a particular open ethernet file.
* Alternatively, PF_MAXFILTERS and Pf_ext_packetfilt structure can be
* used in case even bigger filter command list is needed.
*
* In this context, "word" means a short (16-bit) integer.
*
* The filter command list is specified using ioctl(). Each filter command
* list specifies a sequence of actions that leaves a boolean value on the
* top of an internal stack. There is also an offset register which is
* initialized to zero. Each word of the command list specifies an action
* from the set {PUSHLIT, PUSHZERO, PUSHWORD+N, LOAD_OFFSET, BRTR, BRFL, POP}
* (see #defines below for definitions), and a binary operator from the set
* {EQ, LT, LE, GT, GE, AND, OR, XOR} which operates on the top two elements
* of the stack and replaces them with its result. The special action NOPUSH
* and the special operator NOP can be used to only perform the binary
* operation or to only push a value on the stack.
*
* If the final value of the filter operation is true, then the packet is
* accepted for the open file which specified the filter.
*/
/* these must sum to sizeof (ushort_t)! */
/* binary operators */
/* stack actions */
#define ENF_NOPUSH 0
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PFMOD_H */