summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2011-04-10 08:22:27 (GMT)
committerThomas Graf <tgraf@suug.ch>2011-04-10 08:22:27 (GMT)
commit23c27b473825f1c7a3651c9aa24afb685a6183a7 (patch)
treeb95a20765ecc57ca9a6a9455978f6c015b754c38 /lib
parentef327ffd44dbef02446255fe370d91e256ad927b (diff)
downloadlibnl-23c27b473825f1c7a3651c9aa24afb685a6183a7.zip
libnl-23c27b473825f1c7a3651c9aa24afb685a6183a7.tar.gz
libnl-23c27b473825f1c7a3651c9aa24afb685a6183a7.tar.bz2
Provide nl_cache_set_arg{1,2}() to specify cache args
Added based on a RFE. This is required if allocation and (re)filling is to be splitted.
Diffstat (limited to 'lib')
-rw-r--r--lib/cache.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/cache.c b/lib/cache.c
index ece354c..7afa42e 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -463,6 +463,32 @@ void nl_cache_remove(struct nl_object *obj)
*/
/**
+ * Set synchronization arg1 of cache
+ * @arg cache Cache
+ * @arg arg argument
+ *
+ * Synchronization arguments are used to specify filters when
+ * requesting dumps from the kernel.
+ */
+void nl_cache_set_arg1(struct nl_cache *cache, int arg)
+{
+ cache->c_iarg1 = arg;
+}
+
+/**
+ * Set synchronization arg2 of cache
+ * @arg cache Cache
+ * @arg arg argument
+ *
+ * Synchronization arguments are used to specify filters when
+ * requesting dumps from the kernel.
+ */
+void nl_cache_set_arg2(struct nl_cache *cache, int arg)
+{
+ cache->c_iarg2 = arg;
+}
+
+/**
* Invoke the request-update operation
* @arg sk Netlink socket.
* @arg cache Cache