genetlink: add iterator for walking family ops
authorJakub Kicinski <kuba@kernel.org>
Fri, 4 Nov 2022 19:13:39 +0000 (12:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2022 12:30:16 +0000 (12:30 +0000)
commit6557461cd27843213ca19a7918bbaa8c3b7c5f5c
tree5981b06b33f96671141efb67223071f7066d9a31
parent8d84322ae6d7921c461b6a5ef39be0b48c177b8a
genetlink: add iterator for walking family ops

Subsequent changes will expose split op structures to users,
so walking the family ops with just an index will get harder.
Add a structured iterator, convert the simple cases.
Policy dumping needs more careful conversion.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/genetlink.c