
Custom Packet Filter Examples
333
Custom Packet
Filter Examples
The following examples of packet filters, which were built using the
packet filter language, start with basic concepts.
Destination
Address Filter
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.
Source Address Filter
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.
Length Filter
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 to 08-00-02”
pushField.l
0
# Get first 4 bytes of
# destination address.
pushLiteral.l
0xffffff00
# Set up mask to isolate first
# 3 bytes.
and
# Top of stack now has OUI
pushLiteral.l
0x08000200
# Load OUI value.
eq
# Check for match.
name
“Forward from 08-00-02”
pushField.l
6
# Get first 4 bytes of source
# address.
pushLiteral.l
0xffffff00
# Set up mask to isolate first
# 3 bytes.
and
# Top of stack now has OUI
pushLiteral.l
0x08000200
# Load OUI value.
eq
# Check for match.
name
“Forward < 400”
pushField.w
12
# Get length field.
pushLiteral.w
400
# Load length limit.
lt
# Check for frame length <
# limit.
Содержание 4007
Страница 1: ...http www 3com com Switch 4007 Implementation Guide Release 3 0 5 Part No 10013673 Published May 2000 ...
Страница 36: ...36 ABOUT THIS GUIDE ...
Страница 37: ...I UNDERSTANDING YOUR SWITCH 4007 SYSTEM Chapter 1 Configuration Overview ...
Страница 38: ......
Страница 50: ...50 CHAPTER 1 CONFIGURATION OVERVIEW ...
Страница 52: ......
Страница 70: ...70 CHAPTER 3 INSTALLING MANAGEMENT MODULES ...
Страница 110: ...110 CHAPTER 4 CONFIGURING AND USING EME OPTIONS ...
Страница 130: ...130 CHAPTER 5 MANAGING THE CHASSIS POWER AND TEMPERATURE ...
Страница 222: ...222 CHAPTER 11 IP MULTICAST FILTERING WITH IGMP ...
Страница 240: ...240 CHAPTER 13 RESILIENT LINKS ...
Страница 304: ...304 CHAPTER 14 VIRTUAL LANS VLANS ...
Страница 350: ...350 CHAPTER 15 PACKET FILTERING ...
Страница 506: ...506 CHAPTER 19 OPEN SHORTEST PATH FIRST OSPF ROUTING ...
Страница 534: ...534 CHAPTER 20 IPX ROUTING ...
Страница 612: ...612 CHAPTER 22 QOS AND RSVP ...
Страница 656: ...656 CHAPTER 23 DEVICE MONITORING ...
Страница 657: ...IV REFERENCE Appendix A Technical Support Index ...
Страница 658: ......
Страница 664: ......