MCPcopy Create free account
hub / github.com/F-Stack/f-stack / encap_unregister_srcaddr

Function encap_unregister_srcaddr

freebsd/netinet/ip_encap.c:215–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215static int
216encap_unregister_srcaddr(struct srcaddrtab_head *head,
217 const struct srcaddrtab *cookie)
218{
219 struct srcaddrtab *p;
220
221 SRCADDR_WLOCK();
222 CK_LIST_FOREACH(p, head, chain) {
223 if (p == cookie) {
224 CK_LIST_REMOVE(p, chain);
225 SRCADDR_WUNLOCK();
226 SRCADDR_WAIT();
227 free(p, M_NETADDR);
228 return (0);
229 }
230 }
231 SRCADDR_WUNLOCK();
232 return (EINVAL);
233}
234
235static struct encaptab *
236encap_attach(struct encaptab_head *head, const struct encap_config *cfg,

Callers 2

Calls 1

freeFunction · 0.50

Tested by

no test coverage detected