summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-07-04 14:31:23 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-07-04 17:11:14 +0900
commit8fab27472b1e7554da32ccf287d356c0b7c621cd (patch)
tree4fa6343ea5ecf4169ddc8747497c49b9f38a9be6 /src/libsystemd/sd-netlink
parent620fd5d4331537824c364dea9f554e51496888f5 (diff)
downloadsystemd-8fab27472b1e7554da32ccf287d356c0b7c621cd.tar.gz
systemd-8fab27472b1e7554da32ccf287d356c0b7c621cd.tar.bz2
systemd-8fab27472b1e7554da32ccf287d356c0b7c621cd.zip
sd-netlink: add CTRL_ATTR_MCAST_GROUPS
Diffstat (limited to 'src/libsystemd/sd-netlink')
-rw-r--r--src/libsystemd/sd-netlink/netlink-types.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
index 0ac3d1664b..6850773977 100644
--- a/src/libsystemd/sd-netlink/netlink-types.c
+++ b/src/libsystemd/sd-netlink/netlink-types.c
@@ -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 = {