[Click] About the IPClassifier
Eddie Kohler
kohler at cs.ucla.edu
Sun May 6 17:30:01 EDT 2007
Hi Roberto,
IPClassifier programs use C's rules for whether a number is in hex, decimal,
or octal. 0034 is interpreted as 34 octal, or 28 (== 0x1c hex). You want
ip[2:2] 0x0034
If you're ever interested in what IPClassifier is doing try something like this:
mug% click -e 'Idle -> IPClassifier(ip[2:2] 0034) -> Idle' -qh '*.program'
IPClassifier at 2.program:
0 0/0000001c%0000ffff yes->[0] no->[1]
safe length 4
alignment offset 0
Eddie
Roberto Riggio wrote:
> Hi,
>
> I'm using the IPClassifier element to match all the IP packets
> with a total length equal to 52 bytes:
>
> IPClassifier(ip[2:2] 0034, -)
>
> However when I run my configuration no packet are emitted on
> port 0. I'm double checking with wireshark if indeed there are
> such packets.
>
> What am I doing wrong?
>
> Bye
> Roberto
>
More information about the click
mailing list