summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/netlink-types.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-06-23 11:07:59 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-06-24 13:45:47 +0200
commit435bbb0233018bbafc6d80d2935adb151d187d97 (patch)
tree4576573588a996a0493f11ee6b2c2ca4a6f7e275 /src/libsystemd/sd-netlink/netlink-types.h
parent817d1cd824bedba8feeef24c9724ec8bd160a7b2 (diff)
sd-netlink: make NLTypeSystem internal
Same as NLType, move NLTypeSystem into netlink-types.c and hide it from the outside. Provide an accessor function for the 'max' field that is used to allocate suitable array sizes. Note that this will probably be removed later on, anyway. Once we support bigger type-systems, it just seems impractical to allocate such big arrays for each container entry. An RBTree would probably do just fine.
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-types.h')
-rw-r--r--src/libsystemd/sd-netlink/netlink-types.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-types.h b/src/libsystemd/sd-netlink/netlink-types.h
index cb6a78fb3e..c11bdbdf4c 100644
--- a/src/libsystemd/sd-netlink/netlink-types.h
+++ b/src/libsystemd/sd-netlink/netlink-types.h
@@ -53,15 +53,12 @@ struct NLTypeSystemUnion {
const NLTypeSystem *type_systems;
};
-struct NLTypeSystem {
- uint16_t max;
- const NLType *types;
-};
-
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);
void type_get_type_system_union(const NLType *type, const NLTypeSystemUnion **ret);
+
+uint16_t type_system_get_max(const NLTypeSystem *type_system);
int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, uint16_t type);
int type_system_get_type_system(const NLTypeSystem *type_system, const NLTypeSystem **ret, uint16_t type);
int type_system_get_type_system_union(const NLTypeSystem *type_system, const NLTypeSystemUnion **ret, uint16_t type);