| 2460 | } |
| 2461 | |
| 2462 | static struct unpcb * |
| 2463 | fptounp(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 | |
| 2476 | static void |
| 2477 | unp_discard(struct file *fp) |
no outgoing calls
no test coverage detected