Subject: Re: Refactor Netlink connector?

From: jamal <[email-masked]>
Date: Wed, 14 Jun 2006 08:36:04 -0400

So whats the resolution on this? I actually have some cycles this coming
weekend that i was hopping to spend updating the doc instead.

cheers,
jamal

On Thu, 2006-01-06 at 10:24 -0400, James Morris wrote:
> On Thu, 1 Jun 2006, Thomas Graf wrote:
> 
> > It shouldn't be hard to split what is implemented in nlmsg_route_perms[]
> > for NETLINK_ROUTE into the definitions of the generic netlink
> > operations, could look like this:
> > 
> > struct genl_ops some_op = {
> > 	[...]
> > 	.perm	 = NETLINK_GENERIC_SOCKET__NLMSG_READ,
> > };
> 
> We wouldn't need the socket class outside of SELinux, just the perm, so 
> something like:
> 
> NL_PERM_READ
> 
> > int genl_peek_cmd(struct nlmsghdr *nlh)
> > {
> > 	struct genlmsghdr *hdr = nlmsg_data(nlh);
> > 
> > 	if (nlh->nlmsglen < nlmsg_msg_sizeo(GENL_HDRLEN))
> > 		return -EINVAL;
> > 
> > 	return hdr->cmd;
> > }
> 
> Unless I'm mistaken, people are already multiplexing commands inside genl 
> commands (and if so, why even bother with registerable ops?).
> 
> 
> I'll look at it in more detail soon.
> 
>