summaryrefslogtreecommitdiffstats
path: root/lib/ns.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-12-20 17:51:37 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2020-05-18 14:11:03 +0200
commitc4d466c830083e8ba58881d7ad03a90f6baf0754 (patch)
tree456bc18dd349493771699855e2ad2ba7de36aab1 /lib/ns.h
parentzebra: local mac entries populated in correct netnamespace (diff)
downloadfrr-c4d466c830083e8ba58881d7ad03a90f6baf0754.tar.xz
frr-c4d466c830083e8ba58881d7ad03a90f6baf0754.zip
lib, zebra: reuse and adapt ns_list walk functionality
the walk routine is used by vxlan service to identify some contexts in each specific network namespace, when vrf netns backend is used. that walk mechanism is extended with some additional paramters to the walk routine. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/ns.h')
-rw-r--r--lib/ns.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/ns.h b/lib/ns.h
index 0dfd97742..286ff5b29 100644
--- a/lib/ns.h
+++ b/lib/ns.h
@@ -76,8 +76,6 @@ struct ns {
RB_HEAD(ns_head, ns);
RB_PROTOTYPE(ns_head, ns, entry, ns_compare)
-extern struct ns_head ns_tree;
-
/*
* API for managing NETNS. eg from zebra daemon
* one want to manage the list of NETNS, etc...
@@ -127,7 +125,14 @@ int ns_socket(int domain, int type, int protocol, ns_id_t ns_id);
extern char *ns_netns_pathname(struct vty *vty, const char *name);
/* Parse and execute a function on all the NETNS */
-extern void ns_walk_func(int (*func)(struct ns *));
+#define NS_WALK_CONTINUE 0
+#define NS_WALK_STOP 1
+
+extern void ns_walk_func(int (*func)(struct ns *,
+ void *,
+ void **),
+ void *param_in,
+ void **param_out);
/* API to get the NETNS name, from the ns pointer */
extern const char *ns_get_name(struct ns *ns);