summaryrefslogtreecommitdiff
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-09-11 18:26:23 +0200
commit2961d0601c7d168eed5bbe8e95f80a642f9cb4b5 (patch)
tree940c64d4ab3be5613752b36d78f027e28291324c /lib/ns.h
parentb5fde6fd5c41b99ff205b1139490db49acab1667 (diff)
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 0dfd977429..286ff5b295 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);