All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Deleting filters from a hashtable
@ 2003-10-23 23:59 Paul J. Caritj
  2003-10-25 16:59 ` ewan
  0 siblings, 1 reply; 2+ messages in thread
From: Paul J. Caritj @ 2003-10-23 23:59 UTC (permalink / raw)
  To: lartc

Hi,
I'm trying to delete filters from a hashtable programatically, but am 
being foiled by one small problem:

I can delete the rule with no difficulty given the full handle like so:
tc filter del dev eth2 pref 5 handle 2:fe:800 u32

First, my understanding is that, in this case:
2 => table
fe => column
800 =>row (or vice versa)
Is this correct?

Given that, I suppose I need to know how to delete an entry without 
knowing which row it was inserted into. Alternatively, can I explicitly 
set the row into which I am inserting? Here is what I'm doing now:

 tc filter add dev eth2 parent 1:0 protocol ip prio 1 u32 ht 2:fe: match 
ip dst 192.168.255.254/32 flowid 1:fe; (Where, notably, "fffe" is the 
last two octets of the IP, and fe is the last.)

Any help would be *much* appreciated. My brain is starting to melt ;)

-Paul

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] Deleting filters from a hashtable
  2003-10-23 23:59 [LARTC] Deleting filters from a hashtable Paul J. Caritj
@ 2003-10-25 16:59 ` ewan
  0 siblings, 0 replies; 2+ messages in thread
From: ewan @ 2003-10-25 16:59 UTC (permalink / raw)
  To: lartc

sorry paul, meant to answer in list.....

an alternate approach to this problem might be to keep your rules in a
database such as mysql and have a simple script file which builds and runs
the filter script.

this would allow you to add extra id and comment fields in the database
which can be used by your program to decide which rules should be applied at
any given time.

such a setup makes the task of identifing, deleting and adding rules much
easier as you can use complex programs and sql statements on the database.
You no longer have to worry about how to pick out a certian rule from a
textfile or installed ruleset as your build script simple replaces all rules
with a set selected from the DB

----- Original Message ----- 
From: "Paul J. Caritj" <pcaritj@riovia.net>
To: <lartc@mailman.ds9a.nl>
Sent: Thursday, October 23, 2003 4:59 PM
Subject: [LARTC] Deleting filters from a hashtable


> Hi,
> I'm trying to delete filters from a hashtable programatically, but am
> being foiled by one small problem:
>
> I can delete the rule with no difficulty given the full handle like so:
> tc filter del dev eth2 pref 5 handle 2:fe:800 u32
>
> First, my understanding is that, in this case:
> 2 => table
> fe => column
> 800 =>row (or vice versa)
> Is this correct?
>
> Given that, I suppose I need to know how to delete an entry without
> knowing which row it was inserted into. Alternatively, can I explicitly
> set the row into which I am inserting? Here is what I'm doing now:
>
>  tc filter add dev eth2 parent 1:0 protocol ip prio 1 u32 ht 2:fe: match
> ip dst 192.168.255.254/32 flowid 1:fe; (Where, notably, "fffe" is the
> last two octets of the IP, and fe is the last.)
>
> Any help would be *much* appreciated. My brain is starting to melt ;)
>
> -Paul
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2003-10-25 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-23 23:59 [LARTC] Deleting filters from a hashtable Paul J. Caritj
2003-10-25 16:59 ` ewan

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.