summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-06-29 10:06:08 (GMT)
committerThomas Haller <thaller@redhat.com>2016-07-08 10:02:07 (GMT)
commitfa2b73183bbb5bb13117ff3cfe9f87d22416692a (patch)
tree7a83e2d1f474e9289542ef811ecd893b981ff4b9
parentd62f1960fe76fd68072f9479a78f59118e25603c (diff)
downloadlibnl-fa2b73183bbb5bb13117ff3cfe9f87d22416692a.zip
libnl-fa2b73183bbb5bb13117ff3cfe9f87d22416692a.tar.gz
libnl-fa2b73183bbb5bb13117ff3cfe9f87d22416692a.tar.bz2
hashtable: remove internal data structures from public API
Hide the internal data structures for hashtable from public header "hashtable.h". Note that we just recently broke ABI/API by modifying these structs. Maybe the entire hashtable API should be private. Anyway, that seems to late now. Fixes: c6f89ed02f04ac4984be34418774a7b06ff54f79 Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--include/netlink-private/cache-api.h12
-rw-r--r--include/netlink/hashtable.h13
2 files changed, 14 insertions, 11 deletions
diff --git a/include/netlink-private/cache-api.h b/include/netlink-private/cache-api.h
index 0b39bfa..7ab4bc7 100644
--- a/include/netlink-private/cache-api.h
+++ b/include/netlink-private/cache-api.h
@@ -276,6 +276,18 @@ struct nl_cache_ops
struct nl_msgtype co_msgtypes[];
};
+struct nl_hash_node {
+ uint32_t key;
+ uint32_t key_size;
+ struct nl_object *obj;
+ struct nl_list_head list;
+};
+
+struct nl_hash_table {
+ int size;
+ struct nl_hash_node **nodes;
+};
+
/** @} */
#ifdef __cplusplus
diff --git a/include/netlink/hashtable.h b/include/netlink/hashtable.h
index c52f6e1..c0c0f2c 100644
--- a/include/netlink/hashtable.h
+++ b/include/netlink/hashtable.h
@@ -16,17 +16,8 @@
extern "C" {
#endif
-typedef struct nl_hash_node {
- uint32_t key;
- uint32_t key_size;
- struct nl_object * obj;
- struct nl_list_head list;
-} nl_hash_node_t;
-
-typedef struct nl_hash_table {
- int size;
- nl_hash_node_t ** nodes;
-} nl_hash_table_t;
+typedef struct nl_hash_node nl_hash_node_t;
+typedef struct nl_hash_table nl_hash_table_t;
/* Default hash table size */
#define NL_MAX_HASH_ENTRIES 1024