
224
C
HAPTER
10: P
ACKET
F
ILTERING
The Packet Filtering
Language
You define packet filters using a
stack-oriented
language, which uses a
LIFO (last in, first out) queue when the packet filter is running. The
program places values (called
operands
) on the stack and tests them with
various logical expressions (called
operators
), such as
and
,
or
,
equal
, and
not equal.
These expressions typically test the values of various fields in
the received packet, which include MAC addresses, type fields, IP
addresses, or any field within the first 64 bytes of any frame.
Principles for Writing
a Custom Filter
Before you write a packet filter, understand these basic principles:
■
How the Packet Filter Language Works
■
■
Implementing Sequential Tests in a Packet Filter
A packet filter program is stored in a preprocessed format to minimize the
space that is required by the packet filter definition. Comments are
stripped. When assigned to a port, the packet filter is converted from the
stored format to a run-time format to optimize the performance of the
filter. Each system is limited to a maximum of 16 packet filter programs.
How the Packet Filter
Language Works
A program in the packet filter language typically consists of a series of
one or more instructions that results in the top of the stack containing a
byte value after execution of the last instruction in the program. This
top-of-stack byte value determines whether to forward or discard the
packet.
In this stack-oriented language, instructions:
■
Push
operands onto the stack
■
Pop
the operands from the stack for comparison purposes
■
Push
the results back onto the stack
Therefore, with the exception of the push instructions, instructions (such
as logical operators) locate their operands implicitly and do not require
additional operand specifiers in the instruction stream.
Opcodes
are the variables that are used to identify the type of operands
and operators you are specifying in the packet filter instructions.
Summary of Contents for CoreBuilder 3500
Page 44: ...44 CHAPTER 2 MANAGEMENT ACCESS ...
Page 58: ...58 CHAPTER 3 SYSTEM PARAMETERS ...
Page 86: ...86 CHAPTER 5 ETHERNET ...
Page 112: ...112 CHAPTER 6 FIBER DISTRIBUTED DATA INTERFACE FDDI ...
Page 208: ...208 CHAPTER 9 VIRTUAL LANS ...
Page 256: ...256 CHAPTER 10 PACKET FILTERING ...
Page 330: ...330 CHAPTER 12 VIRTUAL ROUTER REDUNDANCY PROTOCOL VRRP ...
Page 356: ...356 CHAPTER 13 IP MULTICAST ROUTING ...
Page 418: ...418 CHAPTER 14 OPEN SHORTEST PATH FIRST OSPF ...
Page 519: ...RSVP 519 Figure 94 Sample RSVP Configuration Source station End stations Routers ...
Page 566: ...566 CHAPTER 18 DEVICE MONITORING ...
Page 572: ...572 APPENDIX A TECHNICAL SUPPORT ...
Page 592: ...592 INDEX ...