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

Function fptounp

freebsd/kern/uipc_usrreq.c:2462–2474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2460}
2461
2462static struct unpcb *
2463fptounp(struct file *fp)
2464{
2465 struct socket *so;
2466
2467 if (fp->f_type != DTYPE_SOCKET)
2468 return (NULL);
2469 if ((so = fp->f_data) == NULL)
2470 return (NULL);
2471 if (so->so_proto->pr_domain != &localdomain)
2472 return (NULL);
2473 return sotounpcb(so);
2474}
2475
2476static void
2477unp_discard(struct file *fp)

Callers 4

unp_internalize_fpFunction · 0.85
unp_externalize_fpFunction · 0.85
unp_remove_dead_refFunction · 0.85
unp_restore_undead_refFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected