Lines Matching refs:allowedips_node

19 static void copy_and_assign_cidr(struct allowedips_node *node, const u8 *src,  in copy_and_assign_cidr()
34 static void push_rcu(struct allowedips_node **stack, in push_rcu()
35 struct allowedips_node __rcu *p, unsigned int *len) in push_rcu()
45 struct allowedips_node *node, *stack[128] = { in root_free_rcu()
46 container_of(rcu, struct allowedips_node, rcu) }; in root_free_rcu()
56 static void root_remove_peer_lists(struct allowedips_node *root) in root_remove_peer_lists()
58 struct allowedips_node *node, *stack[128] = { root }; in root_remove_peer_lists()
69 static void walk_remove_by_peer(struct allowedips_node __rcu **top, in walk_remove_by_peer()
79 struct allowedips_node __rcu **stack[128], **nptr; in walk_remove_by_peer()
80 struct allowedips_node *node, *prev; in walk_remove_by_peer()
128 static u8 common_bits(const struct allowedips_node *node, const u8 *key, in common_bits()
140 static bool prefix_matches(const struct allowedips_node *node, const u8 *key, in prefix_matches()
152 static struct allowedips_node *find_node(struct allowedips_node *trie, u8 bits, in find_node()
155 struct allowedips_node *node = trie, *found = NULL; in find_node()
168 static struct wg_peer *lookup(struct allowedips_node __rcu *root, u8 bits, in lookup()
173 struct allowedips_node *node; in lookup()
190 static bool node_placement(struct allowedips_node __rcu *trie, const u8 *key, in node_placement()
191 u8 cidr, u8 bits, struct allowedips_node **rnode, in node_placement()
194 struct allowedips_node *node = rcu_dereference_protected(trie, in node_placement()
196 struct allowedips_node *parent = NULL; in node_placement()
212 static int add(struct allowedips_node __rcu **trie, u8 bits, const u8 *key, in add()
215 struct allowedips_node *node, *parent, *down, *newnode; in add()
292 struct allowedips_node __rcu *old4 = table->root4, *old6 = table->root6; in wg_allowedips_free()
298 struct allowedips_node *node = rcu_dereference_protected(old4, in wg_allowedips_free()
305 struct allowedips_node *node = rcu_dereference_protected(old6, in wg_allowedips_free()
343 int wg_allowedips_read_node(struct allowedips_node *node, u8 ip[16], u8 *cidr) in wg_allowedips_read_node()