
320
C
HAPTER
15: P
ACKET
F
ILTERING
Procedure for Writing
a Custom Filter
This section describes the process of writing a packet filter. Detailed
examples are provided in “Long Custom Filter Example” later in this
chapter.
You write the instructions for the packet filter using the following syntax:
<opcode>[.<size>] [<operand>...] [# <comment>]
The opcode descriptions are in “Packet Filter Opcodes” later in this
chapter. Table 64 describes the supported operand sizes later in this
chapter. The operand value is determined by what you are testing (for
example, an address or a length).
Implicit operands for an instruction must be of the size expected by the
instruction. Any mismatch in implicit operand size results in an error
operand size mismatch
when you load the program into the system.
When you write a packet filter, be sure that you use comments (preceded
by #) to describe each step in the filter. This habit helps you to revise
filters and enables others to understand and use the filters you create.
To write a packet filter, follow these basic steps:
1
Assign a unique, descriptive name to the filter using the
Name
opcode.
2
Specify what to test. For example, use the
pushField
opcode to select a
field in the packet.
3
Specify what to compare to the value in step 2. For example, use the
pushLiteral
opcode to select a constant value.
4
Apply a logic operation to the values in steps 2 and 3. The operator you
use depends on what comparison you want to make.
Содержание 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: ......