Re: IPFilter: need to classify packets according to value of certain bits of a field

Momina Khan <[email protected]> Tue, 23 Jul 2013 00:30:57 +0500
Newsgroups gmane.network.routing.click
Message-ID <CAHs+bTjP1CqQXc5+-_ZG0m3i3DBe8q4pk8Bq-gor_JPucu6_Jw@mail.gmail.com>
Thank you Eddie this just solves the issue! I concede my ignorance i was
unaware of the dscp and ECN devision of the TOS field. So what i was
wanting to do was to use the higher order 6 bits for transferring a value
in the IP header and i did a bit shift by two bits so as to leave the ECN
bits unchanged in the header. The bit shift widened the gap between < and >
values. (Ofcourse = was also not catered for :))

thanks again!
momina


On Mon, Jul 22, 2013 at 6:28 PM, Eddie Kohler <[email protected]> wrote:

> 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
>