From 2b82b1ccdc2619459d31f963e4af662fd2978e20 Mon Sep 17 00:00:00 2001
From: Maxime Bizon <mbizon@freebox.fr>
Date: Tue, 22 Oct 2019 13:47:23 +0200
Subject: [PATCH 1/3] export cache dump

---
 include/netlink/cache.h | 2 ++
 lib/cache.c             | 4 ++--
 libnl-3.sym             | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/netlink/cache.h b/include/netlink/cache.h
index c0797d0..89b9857 100644
--- a/include/netlink/cache.h
+++ b/include/netlink/cache.h
@@ -69,6 +69,8 @@ extern void			nl_cache_free(struct nl_cache *);
 extern void			nl_cache_put(struct nl_cache *cache);
 
 /* Cache modification */
+extern int			nl_cache_request_full_dump(struct nl_sock *,
+							   struct nl_cache *);
 extern int			nl_cache_add(struct nl_cache *,
 					     struct nl_object *);
 extern int			nl_cache_parse_and_add(struct nl_cache *,
diff --git a/lib/cache.c b/lib/cache.c
index 4bb10d1..61c1536 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -642,8 +642,8 @@ void nl_cache_set_flags(struct nl_cache *cache, unsigned int flags)
  * of co_request_update() return a positive number on success that is
  * the number of bytes sent. Treat any non-negative number as success too.
  */
-static int nl_cache_request_full_dump(struct nl_sock *sk,
-				      struct nl_cache *cache)
+int nl_cache_request_full_dump(struct nl_sock *sk,
+			       struct nl_cache *cache)
 {
 	if (sk->s_proto != cache->c_ops->co_protocol)
 		return -NLE_PROTO_MISMATCH;
diff --git a/libnl-3.sym b/libnl-3.sym
index 82d2f07..aaf7bb3 100644
--- a/libnl-3.sym
+++ b/libnl-3.sym
@@ -100,6 +100,7 @@ global:
 	nl_cache_put;
 	nl_cache_refill;
 	nl_cache_remove;
+	nl_cache_request_full_dump;
 	nl_cache_resync;
 	nl_cache_search;
 	nl_cache_set_arg1;
-- 
2.17.1

