All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Tc Filter - Port Ranges Calculate Mask Value
@ 2007-10-19 12:26 anshul makkar
  2007-10-20 18:42 ` anshul makkar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: anshul makkar @ 2007-10-19 12:26 UTC (permalink / raw)
  To: lartc

Hi,

I need to support port ranges in tc filter rules.

I know how to formulate the rule but , I am not able to understand how
to calculate the mask value for a perticular range so as to segregate
the port values that lie within this range .

I got the following sample

"tc filter add dev eth1 parent 1:1 protocol ip prio 10 u32 match ip
sport 0x1ae0 0x1ff0 flowid 1:10 This rule will match all ports from
6880 to 6895. "

This rule correctly matches port range from 6880 to 6895. But I am
unable to figure out , how the mask value has been calculated.

I am picking up port ranges from GUI. So the range can be any and I
need to calculte mask value so as to find out which ports lie within
the entered range.

Please if you have any link, clue or reference material , do share it.

Thanking You
Anshul Makkar
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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

end of thread, other threads:[~2007-10-23 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-19 12:26 [LARTC] Tc Filter - Port Ranges Calculate Mask Value anshul makkar
2007-10-20 18:42 ` anshul makkar
2007-10-23 12:27 ` Nikolay Kichukov
2007-10-23 14:38 ` Peter Rabbitson

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.