3Com SUPERSTACK 2200 User Manual page 153

Switch administration console
Table of Contents

Advertisement

12-16
C
12: C
HAPTER
Name
pushField.w
pushLiteral.w
eq
pushLiteral.w
pushField.w
ge
pushLiteral.w
pushField.w
lt
and
and
U
P
REATING AND
SING
ACKET
Combining a Subset of the Filters. The next filter accepts IP packets with
a socket range of 0x76c (1900) and 0x898 (2200). The filter combines packet
filters one and two, modifying them for IP. These steps show how to create
this filter.
1 Name the filter:
"Only IP pkts w/in socket range"
2 Perform steps 2 through 4 as described in "Packet Filter One" on page 12-14,
except give the pushLiteral instruction (in step 3) a value of 0x0800 for IP.
3 Perform steps 2 through 8 as described in "Packet Filter Two" on page 12-15,
except the socket value for IP (in step 3) is located 24 bytes into the packet
(instead of 30 as for XNS).
4 Add an and statement to compare the results of step 2 with the results of
step 3:
and # compare if IP and in range
This combination looks like this:
"Only IP pkts w/in socket range"
12
0x0800
0x76c
24
0x0898
24
F
ILTERS
# get the type field of the packet and
# place it on top of the stack
# put the type value for IP on top of
# the stack
# if the two values on the top of the
# stack are equal, then return a non-zero
# value
# put the lowest socket value on top of
# the stack (1900)
# put the value of the socket from the
# packet on top of the stack
# compare if the value of the socket is
# greater than or equal to the lower bound
# put the highest socket value on top of
# the stack (2200)
# put the value of the socket from the
# packet on top of the stack
# compare if the value of the socket is
# less than the upper bound
# "and" together with "ge" and "lt" test
# to determine if the socket value is
# "within" the range. If it is in range, a
# "one" will be placed on the stack.
# compare if IP and in range

Advertisement

Table of Contents
loading

This manual is also suitable for:

Superstack ii 2200

Table of Contents