In article <[EMAIL PROTECTED]> you wrote:
> How does one do general selectors against the TCP header?
> match u32 0xd170ab9e 0xffffffff at 16
> matches ip dst 209.112.171.158/32 at starting after octet 16 in the IP
> header.
> How would I determin the proper offset for the TCP package?
The 'nexthdr' keyword will do that automatically for you.
> Also, how are matches smaller than an octet handled?
> Say I want to match the 2nd bit of octet 7, I do an at 6 then
> what?
Well, I guess for the 2nd bit you would use 'match u8 0x02 0x02'
(assuming big-endian architecture). You can make the match more
precise using the mask - i.e. in the above example the mask 0x02
will mean, that the condition is satisfied if the 2nd bit is set,
and the rest doesn't matter. If the mask was 0xff the whole octet
would have to be exactly 0x02.
--
Pawel Krawczyk, CETI internet, Krakow. http://ceti.pl/~kravietz/
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]