summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-08-24 15:51:33 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-08-29 18:01:26 +0900
commit9a9c8f3fcc9654b1e211bf4d4b0d895381649a41 (patch)
tree393025b3ffed60a62fe6d7170284533989de1d62
parent1370925bc770d94ce27533fbf5dc2e7595c7c54a (diff)
downloadsystemd-9a9c8f3fcc9654b1e211bf4d4b0d895381649a41.tar.gz
sd-netlink: add several missing attributes
-rw-r--r--src/libsystemd/sd-netlink/netlink-types-genl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-types-genl.c b/src/libsystemd/sd-netlink/netlink-types-genl.c
index 4af1c71c2f..c39db47b19 100644
--- a/src/libsystemd/sd-netlink/netlink-types-genl.c
+++ b/src/libsystemd/sd-netlink/netlink-types-genl.c
@@ -25,10 +25,29 @@ static const NLTypeSystem genl_ctrl_mcast_group_type_system = {
.types = genl_ctrl_mcast_group_types,
};
+static const NLType genl_ctrl_ops_types[] = {
+ [CTRL_ATTR_OP_ID] = { .type = NETLINK_TYPE_U32 },
+ [CTRL_ATTR_OP_FLAGS] = { .type = NETLINK_TYPE_U32 },
+};
+
+static const NLTypeSystem genl_ctrl_ops_type_system = {
+ .count = ELEMENTSOF(genl_ctrl_ops_types),
+ .types = genl_ctrl_ops_types,
+};
+
static const NLType genl_ctrl_types[] = {
[CTRL_ATTR_FAMILY_ID] = { .type = NETLINK_TYPE_U16 },
[CTRL_ATTR_FAMILY_NAME] = { .type = NETLINK_TYPE_STRING },
+ [CTRL_ATTR_VERSION] = { .type = NETLINK_TYPE_U32 },
+ [CTRL_ATTR_HDRSIZE] = { .type = NETLINK_TYPE_U32 },
+ [CTRL_ATTR_MAXATTR] = { .type = NETLINK_TYPE_U32 },
+ [CTRL_ATTR_OPS] = { .type = NETLINK_TYPE_NESTED, .type_system = &genl_ctrl_ops_type_system },
[CTRL_ATTR_MCAST_GROUPS] = { .type = NETLINK_TYPE_NESTED, .type_system = &genl_ctrl_mcast_group_type_system },
+ /*
+ [CTRL_ATTR_POLICY] = { .type = NETLINK_TYPE_NESTED, },
+ [CTRL_ATTR_OP_POLICY] = { .type = NETLINK_TYPE_NESTED, }
+ */
+ [CTRL_ATTR_OP] = { .type = NETLINK_TYPE_U32 },
};
static const NLTypeSystem genl_ctrl_type_system = {