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

Function encap_detach

freebsd/netinet/ip_encap.c:272–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272static int
273encap_detach(struct encaptab_head *head, const struct encaptab *cookie)
274{
275 struct encaptab *ep;
276
277 ENCAP_WLOCK();
278 CK_LIST_FOREACH(ep, head, chain) {
279 if (ep == cookie) {
280 CK_LIST_REMOVE(ep, chain);
281 ENCAP_WUNLOCK();
282 ENCAP_WAIT();
283 free(ep, M_NETADDR);
284 return (0);
285 }
286 }
287 ENCAP_WUNLOCK();
288 return (EINVAL);
289}
290
291static int
292encap_input(struct encaptab_head *head, struct mbuf *m, int off, int proto)

Callers 2

ip_encap_detachFunction · 0.85
ip6_encap_detachFunction · 0.85

Calls 1

freeFunction · 0.50

Tested by

no test coverage detected