Linux - specific selectors
Welcome to the tutorial guide. The tutorial guide will provide a user with advise and guidance on specific selectors.
If a user wants to increase the readability of his/her filter’s configuration then it is a good idea to have a look at a list of specific selectors in the tc program source code.
FIXME: table placeholder - the table is in separate file ,,selector.html”
FIXME: it’s also still in Polish
FIXME: must be sgml’ized
Some examples:
# tc filter add dev ppp0 parent 1:0 prio 10 u32 \
match ip tos 0×10 0xff \
flowid 1:4
FIXME: tcp dport match does not work as described below:
Please note that the rule will match packets which have the TOS field set to 0×10. The TOS field starts at second byte of the packet and is one byte big. A user can write an equivalent general selector: match u8 0×10 0xff at 1. It is good to know that the tcp and udp selectors are exactly the same and single match tcp dport 53 0xffff selector can not be used to match TCP packets sent to given port — they will also match UDP packets sent to this port. It is good to remember that a user should also specify the protocol and end up with the following rule:
# tc filter add dev ppp0 parent 1:0 prio 10 u32 \
match tcp dport 53 0xffff \
match ip protocol 0×6 0xff \
flowid 1:2
If you followed the tutorial guide then you would have learnt about the specific selectors.













