diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-10-05 20:04:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-06 15:44:47 +0200 |
commit | bf813b0afeae2f012f0e527a526c1b78ca21ad82 (patch) | |
tree | cb945bf09a72f1f0c686c434d27de3b50639ba83 /include/net | |
parent | c10e6cf85e7d984a156052daeedaf20a1f38824f (diff) | |
download | linux-bf813b0afeae2f012f0e527a526c1b78ca21ad82.tar.bz2 |
net: genetlink: parse attrs and store in contect info struct during dumpit
Extend the dumpit info struct for attrs. Instead of existing attribute
validation do parse them and save in the info struct. Caller can benefit
from this and does not have to do parse itself. In order to properly
free attrs, genl_family pointer needs to be added to dumpit info struct
as well.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/genetlink.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index fb838f4b0089..922dcc9348b1 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -129,10 +129,14 @@ enum genl_validate_flags { /** * struct genl_info - info that is available during dumpit op call + * @family: generic netlink family - for internal genl code usage * @ops: generic netlink ops - for internal genl code usage + * @attrs: netlink attributes */ struct genl_dumpit_info { + const struct genl_family *family; const struct genl_ops *ops; + struct nlattr **attrs; }; static inline const struct genl_dumpit_info * |