summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/netlink-types.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-06-23 12:10:38 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-06-24 13:46:11 +0200
commit846a6b3d89aaf4ee2cece0f10148f675c4796841 (patch)
tree4a732c8e281a9dcc58691d4db9008c011c920242 /src/libsystemd/sd-netlink/netlink-types.h
parente7de105cf67dc8e4936043c4093c7b4119c9fc55 (diff)
sd-netlink: don't treat NULL as root type-system
Explicitly export the root type-system to the type-system callers. This avoids treating NULL as root, which for one really looks backwards (NULL is usually a leaf, not root), and secondly prevents us from properly debugging calling into non-nested types. Also rename the root to "type_system_root". Once we support more than rtnl, well will have to revisit that, anyway.
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-types.h')
-rw-r--r--src/libsystemd/sd-netlink/netlink-types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-types.h b/src/libsystemd/sd-netlink/netlink-types.h
index d642295464..b1ef7af421 100644
--- a/src/libsystemd/sd-netlink/netlink-types.h
+++ b/src/libsystemd/sd-netlink/netlink-types.h
@@ -52,6 +52,8 @@ struct NLTypeSystemUnion {
const NLTypeSystem *type_systems;
};
+extern const NLTypeSystem type_system_root;
+
uint16_t type_get_type(const NLType *type);
size_t type_get_size(const NLType *type);
void type_get_type_system(const NLType *type, const NLTypeSystem **ret);