234
C
HAPTER
10: P
ACKET
F
ILTERING
Figure 37
Accept and Reject Instructions
The following example shows the use of both accept and reject in a
packet filter. This packet filter was created for a network that is running
both Phase I and Phase II AppleTalk software. The goal of the filter is to
eliminate the AppleTalk traffic.
Accept
(Use for OR-ing tests)
Reject
(Use for AND-ing tests)
First test
Nonzero
result?
Accept packet
and terminate
test sequence
Next test
Yes
No
Reject packet
and terminate
test sequence
First test
Nonzero
result?
Next test
Yes
No
Name
“Filter AppleTalk datagrams”
pushField.w
12
# Get the type field.
pushTop
# Make a copy.
pushLiteral
0x809b
# EtherTalk Phase I type.
eq
# Test if the packet type is
# equal to the AppleTalk type,
reject
# reject the packet and end.
# Otherwise,
pushLiteral.w
0x5dc
# Largest 802.3 packet size
lt
# If this value is less than the
# value in the packet’s
# type/length field, then this
# is an Ethernet frame, so
accept
# accept the packet if it is not
# 802.3, otherwise…
pushField.a
16
# get the SNAP OUI and Ethertype
pushLiteral.a
0x03080007809b
# value to compare.
ne
# If not equal, then forward the
# packet, otherwise drop it.
Содержание CoreBuilder 3500
Страница 44: ...44 CHAPTER 2 MANAGEMENT ACCESS ...
Страница 58: ...58 CHAPTER 3 SYSTEM PARAMETERS ...
Страница 86: ...86 CHAPTER 5 ETHERNET ...
Страница 112: ...112 CHAPTER 6 FIBER DISTRIBUTED DATA INTERFACE FDDI ...
Страница 208: ...208 CHAPTER 9 VIRTUAL LANS ...
Страница 256: ...256 CHAPTER 10 PACKET FILTERING ...
Страница 330: ...330 CHAPTER 12 VIRTUAL ROUTER REDUNDANCY PROTOCOL VRRP ...
Страница 356: ...356 CHAPTER 13 IP MULTICAST ROUTING ...
Страница 418: ...418 CHAPTER 14 OPEN SHORTEST PATH FIRST OSPF ...
Страница 519: ...RSVP 519 Figure 94 Sample RSVP Configuration Source station End stations Routers ...
Страница 566: ...566 CHAPTER 18 DEVICE MONITORING ...
Страница 572: ...572 APPENDIX A TECHNICAL SUPPORT ...
Страница 592: ...592 INDEX ...