summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2012-08-30 13:19:56 +0200
committerThomas Graf <tgraf@redhat.com>2012-08-30 13:19:56 +0200
commitb377ab1bbd5098cf018ecc595d894330563b6af2 (patch)
tree91c6e341047489f3425f8138088f26b144bce889
parent717fabc4692790e46059a0d2e65899ca8eda5fe8 (diff)
downloadlibnl-b377ab1bbd5098cf018ecc595d894330563b6af2.tar.gz
route: Document ROUTE_CACHE_CONTENT flag
Signed-off-by: Thomas Graf <tgraf@suug.ch>
-rw-r--r--include/netlink/route/route.h9
-rw-r--r--lib/route/route.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/include/netlink/route/route.h b/include/netlink/route/route.h
index 5729cd7..d3543af 100644
--- a/include/netlink/route/route.h
+++ b/include/netlink/route/route.h
@@ -6,7 +6,7 @@
* License as published by the Free Software Foundation version 2.1
* of the License.
*
- * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
+ * Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch>
*/
#ifndef NETLINK_ROUTE_H_
@@ -24,7 +24,12 @@
extern "C" {
#endif
-/* flags */
+/**
+ * @ingroup route
+ * When passed to rtnl_route_alloc_cache() the cache will
+ * correspond to the contents of the routing cache instead
+ * of the actual routes.
+ */
#define ROUTE_CACHE_CONTENT 1
struct rtnl_route;
diff --git a/lib/route/route.c b/lib/route/route.c
index f684f96..2218a60 100644
--- a/lib/route/route.c
+++ b/lib/route/route.c
@@ -69,6 +69,10 @@ static int route_request_update(struct nl_cache *c, struct nl_sock *h)
* Allocates a new cache, initializes it properly and updates it to
* contain all routes currently configured in the kernel.
*
+ * Valid flags:
+ * * ROUTE_CACHE_CONTENT - Cache will contain contents of routing cache
+ * instead of actual routes.
+ *
* @note The caller is responsible for destroying and freeing the
* cache after using it.
* @return 0 on success or a negative error code.