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:46:48 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-06-24 13:45:47 +0200
commitc1df8dee2811e76ec2f7306f13b7559044a88842 (patch)
tree8c348058b27cca9b24c6f23431da452fcc4bcd34 /src/libsystemd/sd-netlink/netlink-types.h
parent6c14ad61db68e24932329c4137198ef7f46e35e8 (diff)
sd-netlink: turn 'max' into 'count' to support empty type-systems
Right now we store the maximum type-ID of a type-system. This prevents us from creating empty type-systems. Store the "count" instead, which should be treated as max+1. Note that type_system_union_protocol_get_type_system() currently has a nasty hack to treat empty type-systems as invalid. This might need some modification later on as well.
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-types.h')
-rw-r--r--src/libsystemd/sd-netlink/netlink-types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-types.h b/src/libsystemd/sd-netlink/netlink-types.h
index c11bdbdf4c..91f6a1d1c2 100644
--- a/src/libsystemd/sd-netlink/netlink-types.h
+++ b/src/libsystemd/sd-netlink/netlink-types.h
@@ -58,7 +58,7 @@ 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);
+uint16_t type_system_get_count(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);