| 1632 | } |
| 1633 | |
| 1634 | static void |
| 1635 | udp_close(struct socket *so) |
| 1636 | { |
| 1637 | struct inpcb *inp; |
| 1638 | struct inpcbinfo *pcbinfo; |
| 1639 | |
| 1640 | pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); |
| 1641 | inp = sotoinpcb(so); |
| 1642 | KASSERT(inp != NULL, ("udp_close: inp == NULL")); |
| 1643 | INP_WLOCK(inp); |
| 1644 | if (inp->inp_faddr.s_addr != INADDR_ANY) { |
| 1645 | INP_HASH_WLOCK(pcbinfo); |
| 1646 | in_pcbdisconnect(inp); |
| 1647 | inp->inp_laddr.s_addr = INADDR_ANY; |
| 1648 | INP_HASH_WUNLOCK(pcbinfo); |
| 1649 | soisdisconnected(so); |
| 1650 | } |
| 1651 | INP_WUNLOCK(inp); |
| 1652 | } |
| 1653 | |
| 1654 | static int |
| 1655 | udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) |
nothing calls this directly
no test coverage detected