On Thu, 2006-09-02 at 03:40 +0300, Alexey Kuznetsov wrote:
> Hello!
>
> > BTW, Alexey - if you have a chance can you look at the breakage of
> > sendmsg() in relation to multicast that exists today?
>
> If it is is about groups > 31, which cannot be mapped to nl_groups,
> it is possible just to add setsockopt(), setting dst_group. It is just
> to complete the API.
>
Thats one way to do it (and may infact resolve things)- but not exactly
the way it is at the moment:
netlink_sendmsg() has changed such that even if libnetlink user call
specified more than one target group, in the kernel it will only got to
the first one; you should really take a look at the whole of
netlink_sendmsg() but here is a sample snippet:
---
if (msg->msg_namelen) {
if (addr->nl_family != AF_NETLINK)
return -EINVAL;
dst_pid = addr->nl_pid;
dst_group = ffs(addr->nl_groups);
if (dst_group && !netlink_capable(sock,
NL_NONROOT_SEND))
return -EPERM;
} else {
dst_pid = nlk->dst_pid;
dst_group = nlk->dst_group;
}
-----
which used to be:
-----
if (msg->msg_namelen) {
if (addr->nl_family != AF_NETLINK)
return -EINVAL;
dst_pid = addr->nl_pid;
dst_groups = addr->nl_groups;
if (dst_groups && !netlink_capable(sock, NL_NONROOT_SEND))
return -EPERM;
} else {
dst_pid = nlk->dst_pid;
dst_groups = nlk->dst_groups;
}
---
note: there is no "groups" anymore.
> Do something use this? I do not think so.
>
I am not aware of anyone using it but desktop people want > 32 mcast
groups.
>
> > (libnetlink assumes its existence). I can explain more if what i said
> > didnt make sense.
>
> Please...
>
Basically I have an app that sent to multi groups by using one of the
calls in libnetlink [rtnl_talk()] with say groups = 0x3; which
translates to 0x1 and 0x2 in the kernel and such a message will be
delivered to two listeners one subscribed to 0x1 and another to 0x2. -
Now it will only get delivered to the socket listening on 0x1.
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