
The Packet Filtering Language
319
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
■
What Can You Filter?
■
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 module 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.
Содержание 4007
Страница 1: ...http www 3com com Switch 4007 Implementation Guide Release 3 0 5 Part No 10013673 Published May 2000 ...
Страница 36: ...36 ABOUT THIS GUIDE ...
Страница 37: ...I UNDERSTANDING YOUR SWITCH 4007 SYSTEM Chapter 1 Configuration Overview ...
Страница 38: ......
Страница 50: ...50 CHAPTER 1 CONFIGURATION OVERVIEW ...
Страница 52: ......
Страница 70: ...70 CHAPTER 3 INSTALLING MANAGEMENT MODULES ...
Страница 110: ...110 CHAPTER 4 CONFIGURING AND USING EME OPTIONS ...
Страница 130: ...130 CHAPTER 5 MANAGING THE CHASSIS POWER AND TEMPERATURE ...
Страница 222: ...222 CHAPTER 11 IP MULTICAST FILTERING WITH IGMP ...
Страница 240: ...240 CHAPTER 13 RESILIENT LINKS ...
Страница 304: ...304 CHAPTER 14 VIRTUAL LANS VLANS ...
Страница 350: ...350 CHAPTER 15 PACKET FILTERING ...
Страница 506: ...506 CHAPTER 19 OPEN SHORTEST PATH FIRST OSPF ROUTING ...
Страница 534: ...534 CHAPTER 20 IPX ROUTING ...
Страница 612: ...612 CHAPTER 22 QOS AND RSVP ...
Страница 656: ...656 CHAPTER 23 DEVICE MONITORING ...
Страница 657: ...IV REFERENCE Appendix A Technical Support Index ...
Страница 658: ......
Страница 664: ......