Lines Matching full:entry
36 * netlbl_af4list_search - Search for a matching IPv4 address entry
41 * Searches the IPv4 address list given by @head. If a matching address entry
59 * netlbl_af4list_search_exact - Search for an exact IPv4 address entry
86 * netlbl_af6list_search - Search for a matching IPv6 address entry
91 * Searches the IPv6 address list given by @head. If a matching address entry
110 * netlbl_af6list_search_exact - Search for an exact IPv6 address entry
138 * netlbl_af4list_add - Add a new IPv4 address entry to a list
139 * @entry: address entry
143 * Add a new address entry to the list pointed to by @head. On success zero is
148 int netlbl_af4list_add(struct netlbl_af4list *entry, struct list_head *head) in netlbl_af4list_add() argument
152 iter = netlbl_af4list_search(entry->addr, head); in netlbl_af4list_add()
154 iter->addr == entry->addr && iter->mask == entry->mask) in netlbl_af4list_add()
159 * address mask such that the entry with the widest mask (smallest in netlbl_af4list_add()
163 ntohl(entry->mask) > ntohl(iter->mask)) { in netlbl_af4list_add()
164 __list_add_rcu(&entry->list, in netlbl_af4list_add()
169 list_add_tail_rcu(&entry->list, head); in netlbl_af4list_add()
175 * netlbl_af6list_add - Add a new IPv6 address entry to a list
176 * @entry: address entry
180 * Add a new address entry to the list pointed to by @head. On success zero is
185 int netlbl_af6list_add(struct netlbl_af6list *entry, struct list_head *head) in netlbl_af6list_add() argument
189 iter = netlbl_af6list_search(&entry->addr, head); in netlbl_af6list_add()
191 ipv6_addr_equal(&iter->addr, &entry->addr) && in netlbl_af6list_add()
192 ipv6_addr_equal(&iter->mask, &entry->mask)) in netlbl_af6list_add()
197 * address mask such that the entry with the widest mask (smallest in netlbl_af6list_add()
201 ipv6_addr_cmp(&entry->mask, &iter->mask) > 0) { in netlbl_af6list_add()
202 __list_add_rcu(&entry->list, in netlbl_af6list_add()
207 list_add_tail_rcu(&entry->list, head); in netlbl_af6list_add()
213 * netlbl_af4list_remove_entry - Remove an IPv4 address entry
214 * @entry: address entry
217 * Remove the specified IP address entry. The caller is responsible for
221 void netlbl_af4list_remove_entry(struct netlbl_af4list *entry) in netlbl_af4list_remove_entry() argument
223 entry->valid = 0; in netlbl_af4list_remove_entry()
224 list_del_rcu(&entry->list); in netlbl_af4list_remove_entry()
228 * netlbl_af4list_remove - Remove an IPv4 address entry
234 * Remove an IP address entry from the list pointed to by @head. Returns the
235 * entry on success, NULL on failure. The caller is responsible for calling
242 struct netlbl_af4list *entry; in netlbl_af4list_remove() local
244 entry = netlbl_af4list_search_exact(addr, mask, head); in netlbl_af4list_remove()
245 if (entry == NULL) in netlbl_af4list_remove()
247 netlbl_af4list_remove_entry(entry); in netlbl_af4list_remove()
248 return entry; in netlbl_af4list_remove()
253 * netlbl_af6list_remove_entry - Remove an IPv6 address entry
254 * @entry: address entry
257 * Remove the specified IP address entry. The caller is responsible for
261 void netlbl_af6list_remove_entry(struct netlbl_af6list *entry) in netlbl_af6list_remove_entry() argument
263 entry->valid = 0; in netlbl_af6list_remove_entry()
264 list_del_rcu(&entry->list); in netlbl_af6list_remove_entry()
268 * netlbl_af6list_remove - Remove an IPv6 address entry
274 * Remove an IP address entry from the list pointed to by @head. Returns the
275 * entry on success, NULL on failure. The caller is responsible for calling
283 struct netlbl_af6list *entry; in netlbl_af6list_remove() local
285 entry = netlbl_af6list_search_exact(addr, mask, head); in netlbl_af6list_remove()
286 if (entry == NULL) in netlbl_af6list_remove()
288 netlbl_af6list_remove_entry(entry); in netlbl_af6list_remove()
289 return entry; in netlbl_af6list_remove()