3Com corebuilder 3500 Implementation Manual page 226

Hide thumbs Also See for corebuilder 3500:
Table of Contents

Advertisement

226
C
10: P
HAPTER
ACKET
Table 31 Packet Filter Instructions and Stacks — Descriptions and Guidelines
Element
Instructions
Instruction format
Operand sizes
Maximum length
Stack
F
ILTERING
Table 31 describes the instructions and stacks of a packet filter.
Descriptions and Guidelines
Each instruction in a packet filter definition must be on a separate line
in the packet filter definition file.
A typical instruction consists of an opcode followed by explicit
operands and a comment. Although comments are optional, it is
recommended that you use them throughout the packet filter to make
it easier for yourself and others to administer the filters. Several
opcodes include an explicit operand size specification.
The general syntax of an instruction is:
<opcode>[.<size>] [<operand>...] [# <comment>]
Example:
pushliteral.l
mask
Use any combination of uppercase and lowercase letters for the
opcode and size.
The contents of a line following the first # outside a quoted string are
ignored, so use the # to begin your comments. Comments are not
stored in the system; they are useful when the filter is created and
saved externally.
The following operand sizes are supported:
1 byte = .b
2 bytes = .w
4 bytes = .l
6 bytes = .a (Included primarily for use with 48-bit, IEEE, globally
assigned MAC addresses)
The maximum length for a filter definition is 4096 bytes.
The packet filter language uses a stack to store the operands that will
be used by an instruction and the results of the instruction.
Operands are popped from the stack as required by the instructions.
An instruction using two or more operands takes the first operand
from the top of the stack, with subsequent operands taken in order
from succeeding levels of the stack.
The stack is a maximum of 64 bytes long, with space within the stack
allocated in multiples of 4 bytes. Thus you can have a maximum of 16
operands on the stack.
The address size operand .a consumes 8 bytes on the stack, decreasing
the maximum number of operands on the stack for a 48-bit address.
0xffffff00
#load the type field

Advertisement

Table of Contents
loading

Table of Contents