Re: IPFilter: need to classify packets according to value of certain bits of a field
Eddie Kohler <[email protected]> Mon, 22 Jul 2013 09:28:41 -0400
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAF0C5S+2fAG0DVHc8GDAEypzUGYYgjOz4o+mLBJsa4NV+bu=Dw@mail.gmail.com> |
Momina, aren't those bits the same as the formerly-defined DSCP (Differentiated Services Code Point)? Can't you just say "tcp and ip dscp = 10" or whatever? I don't understand your problem; if you provided a specific Click configuration, perhaps using FromIPSummaryDump in the style of the tests, showing what you expect to happen, that would help. (Of course there's a gap between ip tos > 110 and ip tos < 110, namely ip tos == 110, but of course you know this.) Eddie On Mon, Jul 22, 2013 at 7:41 AM, Momina Khan <[email protected]> wrote: > 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 > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click