Re: kobject events questions

From: Robert Love
Date: Wed Sep 29 2004 - 14:48:51 EST


On Wed, 2004-09-29 at 16:37 +0300, Timo TerÃs wrote:

> 1) Send the events so that they are always associated with the network
> devices class_device kobject. I guess this would be quite clean way to
> do it, but it'd require adding a new signal type and would limit the
> iptables target to be associated always with a interface.
>
> 2) Create a device class that has virtual timer devices that trigger
> events (ie. /sys/class/utimer). Each timer could have some attributes
> (like expired, expire_time, etc.) and would emit "change" signals
> whenever timer expires.
>
> I'd like to hear what you think of the thing I'm trying to do?
>
> And especially how "bad" idea the option 2 is (since the new class might
> not be useful for others)?

Well, #1 is the intention and spirit of the kevent system.

And adding a new signal type is fine.

So the only downside is that the table to interface association thing.
I have no idea how big an issue that is for you.

You could of course create a new kobject, ala #2, but that does not seem
optimal if the object is otherwise worthless. I don't think that you
should create a new class. Better to put something under /sys/net
related to what you are doing.

Robert Love


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/