3com 2200 Manual Do Utilizador

Página de 200
A-12
A
PPENDIX
 A: P
ACKET
 F
ILTER
 O
PCODES
, E
XAMPLES
AND 
S
YNTAX
 E
RRORS
Address Group
Filter
This filter accepts only frames whose source and destination address are in 
the same group.
name
“Forward Same Source and Destination”
pushSAGM
# Get source address group mask
pushDAGM
# Get destination address group 
# mask
and
# Compare if source and 
destination 
# groups are common members of 
# an address group (result is 
# either zero or non-zero)
# address group masks
pushLiteral.l
0
# Put a zero on the stack
ne
# If not equal, returns a “one” 
# to stack, resulting in packet 
# forwarded
Port Group Filter
This filter discards all frames sourced from a port in either group three or 
eight.
name
“Discard Port Groups 3 and 8”
pushSPGM
# Get source port group mask
pushLiteral.l
0x0084
# Select bits 3 and 8
and
# If port group bits 3 & 8 are 
# common with SPGM, then 
# non-zero value is 
# pushed onto stack
pushLiteral.l
0
# Push zero
eq
# Only if SPGM is not in port 
# groups corresponding to bits 
# 3 & 8, then packet is 
# forwarded