All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about TC functionality
@ 2020-08-17  4:01 Tomasz W
  2020-08-17  7:38 ` Erik Auerswald
  2020-08-17 18:59 ` Grant Taylor
  0 siblings, 2 replies; 3+ messages in thread
From: Tomasz W @ 2020-08-17  4:01 UTC (permalink / raw)
  To: lartc

Good morning,

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.

Kind Regards,
Tomasz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about TC functionality
  2020-08-17  4:01 Question about TC functionality Tomasz W
@ 2020-08-17  7:38 ` Erik Auerswald
  2020-08-17 18:59 ` Grant Taylor
  1 sibling, 0 replies; 3+ messages in thread
From: Erik Auerswald @ 2020-08-17  7:38 UTC (permalink / raw)
  To: lartc

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about TC functionality
  2020-08-17  4:01 Question about TC functionality Tomasz W
  2020-08-17  7:38 ` Erik Auerswald
@ 2020-08-17 18:59 ` Grant Taylor
  1 sibling, 0 replies; 3+ messages in thread
From: Grant Taylor @ 2020-08-17 18:59 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

On 8/16/20 10:01 PM, Tomasz W wrote:
> Good morning,

Hi,

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

In addition to what Erik suggested, you might be able to apply routes 
via iptables such that traffic goes out different (virtual) interfaces 
and then apply generic tc QoS as desired on the different (virtual) 
interfaces.



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4013 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-17 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17  4:01 Question about TC functionality Tomasz W
2020-08-17  7:38 ` Erik Auerswald
2020-08-17 18:59 ` Grant Taylor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.