summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-08 19:31:46 +0100
committerTom Gundersen <teg@jklm.no>2015-02-08 20:15:37 +0100
commitc149ae08ccbc63279c0b2d146b6879163dfffce3 (patch)
tree3d0310cd5ed6b05878cbc9a486e3df869e2d1dce
parent4af7b60d428765c2d2c66c46f416f6dae55e9ddb (diff)
sd-rtnl: add support for IFLA_INET6_*
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-types.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
index 4ef698a7f5..f2d5c8d167 100644
--- a/src/libsystemd/sd-rtnl/rtnl-types.c
+++ b/src/libsystemd/sd-rtnl/rtnl-types.c
@@ -265,6 +265,30 @@ static const NLTypeSystemUnion rtnl_prot_info_type_system_union = {
.match_type = NL_MATCH_PROTOCOL,
};
+static const struct NLType rtnl_af_spec_inet6_types[IFLA_INET6_MAX + 1] = {
+ [IFLA_INET6_FLAGS] = { .type = NLA_U32 },
+/*
+ IFLA_INET6_CONF,
+ IFLA_INET6_STATS,
+ IFLA_INET6_MCAST,
+ IFLA_INET6_CACHEINFO,
+ IFLA_INET6_ICMP6STATS,
+*/
+ [IFLA_INET6_TOKEN] = { .type = NLA_IN_ADDR },
+ [IFLA_INET6_ADDR_GEN_MODE] = { .type = NLA_U8 },
+};
+
+static const NLTypeSystem rtnl_af_spec_type_systems[AF_MAX] = {
+ [AF_INET6] = { .max = ELEMENTSOF(rtnl_af_spec_inet6_types) - 1,
+ .types = rtnl_af_spec_inet6_types },
+};
+
+static const NLTypeSystemUnion rtnl_af_spec_type_system_union = {
+ .num = AF_MAX,
+ .type_systems = rtnl_af_spec_type_systems,
+ .match_type = NL_MATCH_PROTOCOL,
+};
+
static const NLType rtnl_link_types[IFLA_MAX + 1 ] = {
[IFLA_ADDRESS] = { .type = NLA_ETHER_ADDR, },
[IFLA_BROADCAST] = { .type = NLA_ETHER_ADDR, },
@@ -298,7 +322,9 @@ static const NLType rtnl_link_types[IFLA_MAX + 1 ] = {
[IFLA_STATS64],
[IFLA_VF_PORTS] = { .type = NLA_NESTED },
[IFLA_PORT_SELF] = { .type = NLA_NESTED },
- [IFLA_AF_SPEC] = { .type = NLA_NESTED },
+*/
+ [IFLA_AF_SPEC] = { .type = NLA_NESTED, .type_system_union = &rtnl_af_spec_type_system_union },
+/*
[IFLA_VF_PORTS],
[IFLA_PORT_SELF],
[IFLA_AF_SPEC],