[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150615.151354.2277595107897040931.davem@davemloft.net>
Date: Mon, 15 Jun 2015 15:13:54 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dh.herrmann@...il.com
Cc: netdev@...r.kernel.org, tgraf@...g.ch, herbert@...dor.apana.org.au,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netlink: add API to retrieve all group memberships
From: David Herrmann <dh.herrmann@...il.com>
Date: Fri, 12 Jun 2015 18:15:38 +0200
> This patch adds getsockopt(SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS) to
> retrieve all groups a socket is a member of. Currently, we have to use
> getsockname() and look at the nl.nl_groups bitmask. However, this mask is
> limited to 32 groups. Hence, similar to NETLINK_ADD_MEMBERSHIP and
> NETLINK_DROP_MEMBERSHIP, this adds a separate sockopt to manager higher
> groups IDs than 32.
>
> This new NETLINK_LIST_MEMBERSHIPS option takes a pointer to __u32 and the
> size of the array. The array is filled with the full membership-set of the
> socket, and the required array size is returned in optlen. Hence,
> user-space can retry with a properly sized array in case it was too small.
>
> Signed-off-by: David Herrmann <dh.herrmann@...il.com>
This does not apply to the current net-next tree, please respin.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists