46
Classifier
This element, along with the IPClassifier, formed the basis of how packets flowed through the
click router. It classified all the input packets based on an offset, and a bit value. Each of these
patterns had an associated output. If a packet matches the bit value at the given offset, they were
sent out the corresponding output. A special pattern, ‘-‘, matched every packet, and could be used
as the last pattern in order to route all unmatched packets. This element formed a construct
similar to many programming languages switch/case statement.
IPClassifier
This element functioned in the same manner as the Classifier, except that it classified packets
based on their type, or the protocol they used. For example, it could distinguish echo-request
ICMP packets from ICMP error packets. It could also classify packets based on their destination
or source IP addresses.
ARPQuerier
This element was used to discover system MAC addresses using the ARP protocol. It contained a
table of MAC addresses associated with IP addresses. If a packet arrives on input 0, and there is
no mapping, an ARP request is sent out. When the ARP reply arrived on input 1, the table was
updated and the packet was sent out.
GetIPAddress
This element sets the destination IP address annotation.
CheckIPHeader
This element checks the integrity of the IP header of a packet. It also sets the destination IP
address annotation for that packet.
TTLChecker - Compound Element
This compound element was used to decrement the time to live (TTL) for a packet if it was being
forwarded to another router. Classifiers were used to decrement only the TTL for IP packets that
did not originated from the host router. All other packets were just sent to the output. The TTL is
decremented using the DecIPTTL element. If it had not expired, the checksum for the packet was
Komentarze do niniejszej Instrukcji