IPFilter: need to classify packets according to value of certain bits of a field
Momina Khan <[email protected]> Mon, 22 Jul 2013 16:41:17 +0500
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAHs+bThyjrWki01VeZ=AtR84KTO8q9urC=d9pfBqzO7YUcuLAA@mail.gmail.com> |
Hi all i have been going through the IPFilter code for some time now ... i have to filter packets based on the value of the 6 high end unused bits of the TOS field in the IP header. have set _mask.u to 252 ... as per my understanding the value of the field to be checked is applied this mask before value checking The problem is that the config parameter to be compared with _u.u leaves a gap between the greater than and less ( >110 and < 110) than value provided after the bit shift and in this gap of values the router neither labels packets as greater than nor less than. referring to the set_mask() routine. What routine actually does the comparison and filtering? is there detailed documentation of IPFilter code? from .click file ip_classifier :: IPClassifier(tcp and ip tos > 110,tcp and ip tos < 110/*protocol == tcp and TOS < 110*/,- /*everything else */ ); regards momina