On Mon, 2006-19-06 at 11:13 -0400, James Morris wrote:

> 
> It seems that TIPC is multiplexing all of it's commands through  
> TIPC_GENL_CMD.


TIPC is a deviation; they had the 100 ioctls and therefore did a direct
one-to-one mapping.

> I wonder, if this is how other protocols are likely to utilize genl, then 
> we could possibly drop the command registration code completely and one 
> command op can be registered by the protocol during 
> genl_register_family().
> 

The intent is to have a handful of commands as in classical netlink
(eg route or qdisc etc) where you are controlling data that sits in the
kernel; i.e when you have an attribute or a vector of attributes, then
the commands will be of the semantics: ADD/DEL/GET/DUMP only. 
Other that TIPC the two other users i have seen use it in this manner.
But, you are right if usage tends to lean in some other way we could get
rid of it (I think TIPC is a bad example).

> This would both simplify the genl code and API, and help ensure 
> consistency of users.
> 

You are talking from an SELinux perspective i take it?
My view: If you want to have ACLs against such commands
then it becomes easier to say "can only do ADD but not DEL" for example
(We need to resolve genl_rcv_msg() check on commands to be in sync with
SELinux as was pointed by Thomas)

cheers,
jamal

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to