
The Packet Filtering Language
225
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 31 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.
Содержание CoreBuilder 3500
Страница 44: ...44 CHAPTER 2 MANAGEMENT ACCESS ...
Страница 58: ...58 CHAPTER 3 SYSTEM PARAMETERS ...
Страница 86: ...86 CHAPTER 5 ETHERNET ...
Страница 112: ...112 CHAPTER 6 FIBER DISTRIBUTED DATA INTERFACE FDDI ...
Страница 208: ...208 CHAPTER 9 VIRTUAL LANS ...
Страница 256: ...256 CHAPTER 10 PACKET FILTERING ...
Страница 330: ...330 CHAPTER 12 VIRTUAL ROUTER REDUNDANCY PROTOCOL VRRP ...
Страница 356: ...356 CHAPTER 13 IP MULTICAST ROUTING ...
Страница 418: ...418 CHAPTER 14 OPEN SHORTEST PATH FIRST OSPF ...
Страница 519: ...RSVP 519 Figure 94 Sample RSVP Configuration Source station End stations Routers ...
Страница 566: ...566 CHAPTER 18 DEVICE MONITORING ...
Страница 572: ...572 APPENDIX A TECHNICAL SUPPORT ...
Страница 592: ...592 INDEX ...