]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-netlink: add CTRL_ATTR_MCAST_GROUPS
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 Jul 2019 05:31:23 +0000 (14:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 Jul 2019 08:11:14 +0000 (17:11 +0900)
src/libsystemd/sd-netlink/netlink-types.c

index 0ac3d1664b2ded813aaa758f31e95214d6667b70..68507739776df0a350f4f951912973fd52db4cdf 100644 (file)
@@ -785,9 +785,20 @@ static const NLTypeSystem genl_wireguard_type_system = {
         .types = genl_wireguard_cmds,
 };
 
+static const NLType genl_mcast_group_types[] = {
+        [CTRL_ATTR_MCAST_GRP_NAME]  = { .type = NETLINK_TYPE_STRING },
+        [CTRL_ATTR_MCAST_GRP_ID]    = { .type = NETLINK_TYPE_U32 },
+};
+
+static const NLTypeSystem genl_mcast_group_type_system = {
+        .count = ELEMENTSOF(genl_mcast_group_types),
+        .types = genl_mcast_group_types,
+};
+
 static const NLType genl_get_family_types[] = {
-        [CTRL_ATTR_FAMILY_NAME] = { .type = NETLINK_TYPE_STRING },
-        [CTRL_ATTR_FAMILY_ID] = { .type = NETLINK_TYPE_U16 },
+        [CTRL_ATTR_FAMILY_NAME]  = { .type = NETLINK_TYPE_STRING },
+        [CTRL_ATTR_FAMILY_ID]    = { .type = NETLINK_TYPE_U16 },
+        [CTRL_ATTR_MCAST_GROUPS] = { .type = NETLINK_TYPE_NESTED, .type_system = &genl_mcast_group_type_system },
 };
 
 static const NLTypeSystem genl_get_family_type_system = {