diff options
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-types.c')
-rw-r--r-- | src/libsystemd/sd-netlink/netlink-types.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c index 7715ff8a44..70dbd4f8dc 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -46,6 +46,11 @@ struct NLType { const NLTypeSystemUnion *type_system_union; }; +struct NLTypeSystem { + uint16_t max; + const NLType *types; +}; + static const NLTypeSystem rtnl_link_type_system; static const NLType rtnl_link_info_data_veth_types[VETH_INFO_MAX + 1] = { @@ -495,6 +500,11 @@ void type_get_type_system_union(const NLType *nl_type, const NLTypeSystemUnion * *ret = nl_type->type_system_union; } +uint16_t type_system_get_max(const NLTypeSystem *type_system) { + assert(type_system); + return type_system->max; +} + int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, uint16_t type) { const NLType *nl_type; |