Custom Packet Filter Examples; Destination Address Filter; Source Address Filter; Length Filter - 3Com corebuilder 3500 Implementation Manual

Hide thumbs Also See for corebuilder 3500:
Table of Contents

Advertisement

Custom Packet
Filter Examples
Destination
Address Filter

Source Address Filter

Length Filter

The following examples of packet filters, which were built using the
packet filter language, start with basic concepts.
This filter operates on the destination address field of a frame. It allows
packets to be forwarded that are destined for stations with an
Organizationally Unique Identifier (OUI) of 08-00-02. To customize this
filter to another OUI value, change the literal value loaded in the last
pushLiteral.l instruction. The OUI must be padded with an additional 00
to fill out the literal to 4 bytes.
name
"Forward to 08-00-02"
pushField.l
0
pushLiteral.l
0xffffff00
and
pushLiteral.l
0x08000200
eq
This filter operates on the source address field of a frame. It allows
packets to be forwarded that are from stations with an OUI of 08-00-02.
To customize this filter to another OUI value, change the literal value
loaded in the last pushLiteral.l instruction. The OUI must be padded with
an additional 00 to fill out the literal to 4 bytes.
name
"Forward from 08-00-02"
pushField.l
6
pushLiteral.l
0xffffff00
and
pushLiteral.l
0x08000200
eq
This filter operates on the length field of a frame. It allows packets to be
forwarded that are less than 400 bytes in length. To customize this filter
to another length value, change the literal value loaded in the
pushLiteral.w instruction.
name
"Forward < 400"
pushField.w
12
pushLiteral.w
400
lt

Custom Packet Filter Examples

# Get first 4 bytes of
# destination address.
# Set up mask to isolate first
# 3 bytes.
# Top of stack now has OUI
# Load OUI value.
# Check for match.
# Get first 4 bytes of source
# address.
# Set up mask to isolate first
# 3 bytes.
# Top of stack now has OUI
# Load OUI value.
# Check for match.
# Get length field.
# Load length limit.
# Check for frame length <
# limit.
237

Advertisement

Table of Contents
loading

Table of Contents