Hello Tomasz, On Mon, Aug 17, 2020 at 06:01:42AM +0200, Tomasz W wrote: > I am writing software that implements DPI to shape traffic flow. I have > already done packet sniffing and recognition (e.g. ICMP, Skype, HTTP, > etc). However I would like to implement HTB for just those packets > that I select, so I can "slow" or "speed" them up. I know that tc can > do that, but I can't find how to do that basing on packets. You would probably need to somehow mark the packets, and then let "tc" match based on that mark. Otherwise you would need to implement the DPI inside tc. You could look into seeting the "fwmark" based on DPI, and then have tc match on that. Or you could look into setting a DSCP value based on DPI, and then match on that, using, e.g., the u32 match of tc. See, e.g., https://lartc.org/howto/lartc.adv-filter.html for additional info. HTH, Erik