summaryrefslogtreecommitdiffstats
path: root/include/netlink
diff options
context:
space:
mode:
authorAndreas Fett <a.fett@gmx.de>2010-09-22 18:10:26 (GMT)
committerThomas Graf <tgraf@suug.ch>2010-10-13 11:41:57 (GMT)
commit4ab22ccd47319e7d9a972bcf018e1a03870f64f0 (patch)
treeceeb38a56218b4d17e297b21fd43fe7d76dcd720 /include/netlink
parent86b6f6f6291eaaec542a2f4028087fa823122082 (diff)
downloadlibnl-4ab22ccd47319e7d9a972bcf018e1a03870f64f0.zip
libnl-4ab22ccd47319e7d9a972bcf018e1a03870f64f0.tar.gz
libnl-4ab22ccd47319e7d9a972bcf018e1a03870f64f0.tar.bz2
add user data to change_func_t for caches
the patch below adds the possibility to pass user data to callbacks of type change_func_t when using the nl_cache_mngr_* family of functions. If there is any better way to do this, without duplicating the code in cache_mngr.c please let me know.
Diffstat (limited to 'include/netlink')
-rw-r--r--include/netlink/cache.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/netlink/cache.h b/include/netlink/cache.h
index f4db3b9..c752920 100644
--- a/include/netlink/cache.h
+++ b/include/netlink/cache.h
@@ -24,7 +24,7 @@ extern "C" {
struct nl_cache;
-typedef void (*change_func_t)(struct nl_cache *, struct nl_object *, int);
+typedef void (*change_func_t)(struct nl_cache *, struct nl_object *, int, void *);
/* Access Functions */
extern int nl_cache_nitems(struct nl_cache *);
@@ -59,10 +59,12 @@ extern int nl_cache_pickup(struct nl_sock *,
struct nl_cache *);
extern int nl_cache_resync(struct nl_sock *,
struct nl_cache *,
- change_func_t);
+ change_func_t,
+ void *);
extern int nl_cache_include(struct nl_cache *,
struct nl_object *,
- change_func_t);
+ change_func_t,
+ void *);
/* General */
extern int nl_cache_is_empty(struct nl_cache *);
@@ -112,6 +114,7 @@ extern int nl_cache_mngr_alloc(struct nl_sock *,
extern int nl_cache_mngr_add(struct nl_cache_mngr *,
const char *,
change_func_t,
+ void *,
struct nl_cache **);
extern int nl_cache_mngr_get_fd(struct nl_cache_mngr *);
extern int nl_cache_mngr_poll(struct nl_cache_mngr *,