3Com corebuilder 3500 Implementation Manual page 229

Hide thumbs Also See for corebuilder 3500:
Table of Contents

Advertisement

Table 33 Packet Filtering Opcodes (continued)
Opcode
pushTop
Memory
Requirements
Description
1 byte
Pushes the current top of the stack onto the stack (that
is, it reads the top of the stack and pushes the value
onto the stack, which effectively duplicates the item
currently on top of the stack). The size of the contents
of the stack determines the size of the push.
Use pushTop for each additional comparison you
intend to make with the current top of the stack. The
pushTop instruction makes a copy of the field more
efficiently than if you use a second pushField
instruction.
If you are writing a filter that is going to check the
same offset more than once, such as checking the
Ethernet type field to filter multiple protocols, use the
following guidelines. Assume that you want to filter
DEC LAT, IP, and ARP traffic on a port. Rather than use
multiple pushField .w 12 commands to look at the
12th offset where the Ethernet type field resides, use
multiple pushTop commands, as shown here:
Original Filter:
pushField.w 12
pushLiteral.w 0x6004
eq
reject
pushField.w 12
pushLiteral.w 0x0800
eq
reject
pushField.w 12
pushLiteral.w 0x0806
ne
Shortened Filter:
PushField.w 12
pushTop
pushTop
pushLiteral.w 0x6004
eq
reject
pushLiteral.w 0x0800
eq
reject
pushLiteral.w 0x0806
ne
The Packet Filtering Language
229

Advertisement

Table of Contents
loading

Table of Contents