summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorroopa <roopa@cumulusnetworks.com>2012-11-09 14:41:33 -0800
committerThomas Graf <tgraf@redhat.com>2012-11-10 00:12:44 +0100
commit55c0e036b04b567a81cca441117b4e2ce5e22ef2 (patch)
treeddfde923c8b6fb5a0492546429f049cf29b5b956 /include
parentc6f89ed02f04ac4984be34418774a7b06ff54f79 (diff)
downloadlibnl-55c0e036b04b567a81cca441117b4e2ce5e22ef2.tar.gz
Add hash support in cache mngr
This patch adds support to create, delete modify hash table for a cache Signed-off-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'include')
-rw-r--r--include/netlink-types.h2
-rw-r--r--include/netlink/cache-api.h3
-rw-r--r--include/netlink/cache.h2
3 files changed, 7 insertions, 0 deletions
diff --git a/include/netlink-types.h b/include/netlink-types.h
index 23930b8..0be58d1 100644
--- a/include/netlink-types.h
+++ b/include/netlink-types.h
@@ -30,6 +30,7 @@
struct nl_cache_ops;
struct nl_sock;
struct nl_object;
+struct nl_hash_table;
struct nl_cb
{
@@ -78,6 +79,7 @@ struct nl_cache
int c_nitems;
int c_iarg1;
int c_iarg2;
+ struct nl_hash_table * hashtable;
struct nl_cache_ops * c_ops;
};
diff --git a/include/netlink/cache-api.h b/include/netlink/cache-api.h
index 390cbea..aa5eeb6 100644
--- a/include/netlink/cache-api.h
+++ b/include/netlink/cache-api.h
@@ -186,6 +186,9 @@ struct nl_cache_ops
/** Netlink protocol */
int co_protocol;
+ /** cache object hash size **/
+ int co_hash_size;
+
/** Group definition */
struct nl_af_group * co_groups;
diff --git a/include/netlink/cache.h b/include/netlink/cache.h
index fd137e1..c919e6b 100644
--- a/include/netlink/cache.h
+++ b/include/netlink/cache.h
@@ -71,6 +71,8 @@ extern void nl_cache_set_arg2(struct nl_cache *, int);
extern int nl_cache_is_empty(struct nl_cache *);
extern struct nl_object * nl_cache_search(struct nl_cache *,
struct nl_object *);
+extern struct nl_object * nl_cache_lookup(struct nl_cache *,
+ struct nl_object *);
extern void nl_cache_mark_all(struct nl_cache *);
/* Dumping */