A-10 APPENDIX A: PACKET FILTER OPCODES, EXAMPLES, AND SYNTAX ERRORS

Type Filter This filter operates on the type field of a frame. It allows packets to be forwarded that are IP frames. To customize this filter to another type value, change the literal value loaded in the pushLiteral.w instruction.

name

“Forward

IP frames”

 

 

pushField.w

12

#

Get type

field

pushLiteral.w

0x0800

#

Load

IP

type value

eq

 

#

Check

for match

Ethernet Type IPX This filter rejects frames that have either a Novell IPX Ethernet type field and Multicast Filter (8134 hex) or a multicast destination address.

name

“Type > 900

or

Multicast”

pushField.w

12

#

Get

type field

pushLiteral.w

0x900

#

Push type value to test

 

 

#

against

gt

 

#

Is type field > 900 (hex)?

reject

 

#

If yes: reject frame (done)

pushLiteral.b

0x01

#

Multicast bit is low-order bit

pushField.b

0

#

Get 1st byte of destination

and

 

#

Isolate multicast bit

not

 

#

Top

of stack 1 to accept,

 

 

#

0 to

reject

Multiple This filter operates on the destination address field of a frame. It allows Destination packets to be forwarded that are destined for one of four different stations.

Address Filter To customize this filter to other destination stations, change the literal values.

name

“Forward

to four

stations”

 

 

 

pushField.a

0

#

Get destination address

pushTop

 

#

Make

3 copies

of

address

pushTop

 

#

 

 

 

 

 

pushTop

 

#

 

 

 

 

 

pushLiteral.a

0x367002010203 #

Load

allowed

destination

 

 

#

address

 

 

 

eq

 

#

Check

for

match

 

accept

 

#

Forward if

valid

address

pushLiteral.a

0x468462236526 #

Load

allowed

destination

 

 

#

address

 

 

 

eq

 

#

Check

for

match

 

accept

 

#

Forward if

valid

address

pushLiteral.a

0x347872927352 #

Load

allowed

destination

 

 

#

address

 

 

 

eq

 

#

Check

for

match

 

accept

 

#

Forward if

valid

address

pushLiteral.a

0x080239572897 #

Load

allowed

destination

 

 

#

address

 

 

 

eq

 

#

Check

for

match

 

Page 184
Image 184
3Com 2200 manual Address