Re: I didn't understand Packet Classifier Element
Emerson Barea <[email protected]> Mon, 20 Jul 2015 09:13:15 -0300
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAO1UhdViK9pf-wyOG+JtQr+gLYker27tWem+4OvTe7XKiw6yQQ@mail.gmail.com> |
You were clean like water. Thank you. Emerson Barea 2015-07-18 18:04 GMT-03:00 Lars Bro <[email protected]>: > Hi Emerson, > > The values dd/hhhhhhhh... are interpreted like this: > > > dd is a byte offset in decimal and hhhhhhh... is a binary value in hex > format. > > so, 12/0806 means that at offset 12, two bytes are expected, namely 0x0806 > This will match an ARP message, since the packet type is in byte 12 of an > Ethernet packet. However, if it is an ARP message, byte 20 and 21 will tell > the type. They have to be 0x0001 for request and 0x0002 for reply. Forgive > me if I mixed them up. > > So, 12/0806 20/0001 means an ARP message that is a request. > > The expressions are separated by comma, and each expression has its own > output. > > So, the whole classifier above means: "ARP requests to output 0, ARP > responses to output 1, IP to output 2 and all the rest (-) to output 3" > > yours, > Lars Bro > > On Sat, Jul 18, 2015 at 5:05 PM, Emerson Barea <[email protected]> > wrote: > >> Hi there. >> >> Please, could someone explain to me how Packet Classifier Element works? >> For example, I want to understant how this command knows what is the arp >> request, response and IP packet. >> >> c0 :: Classifier(12/0806 20/0001, >> 12/0806 20/0002, >> 12/0800, >> -); >> >> I didn't understant the offset/value definition. >> >> Thank you. >> >> Emerson Barea >> _______________________________________________ >> click mailing list >> [email protected] >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click >> > >