| 1528 | } |
| 1529 | |
| 1530 | static void |
| 1531 | udp_abort(struct socket *so) |
| 1532 | { |
| 1533 | struct inpcb *inp; |
| 1534 | struct inpcbinfo *pcbinfo; |
| 1535 | |
| 1536 | pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); |
| 1537 | inp = sotoinpcb(so); |
| 1538 | KASSERT(inp != NULL, ("udp_abort: inp == NULL")); |
| 1539 | INP_WLOCK(inp); |
| 1540 | if (inp->inp_faddr.s_addr != INADDR_ANY) { |
| 1541 | INP_HASH_WLOCK(pcbinfo); |
| 1542 | in_pcbdisconnect(inp); |
| 1543 | inp->inp_laddr.s_addr = INADDR_ANY; |
| 1544 | INP_HASH_WUNLOCK(pcbinfo); |
| 1545 | soisdisconnected(so); |
| 1546 | } |
| 1547 | INP_WUNLOCK(inp); |
| 1548 | } |
| 1549 | |
| 1550 | static int |
| 1551 | udp_attach(struct socket *so, int proto, struct thread *td) |
nothing calls this directly
no test coverage detected