| 491 | } |
| 492 | |
| 493 | static int |
| 494 | sctp_bind(struct socket *so, struct sockaddr *addr, struct thread *p) |
| 495 | { |
| 496 | struct sctp_inpcb *inp; |
| 497 | |
| 498 | inp = (struct sctp_inpcb *)so->so_pcb; |
| 499 | if (inp == NULL) { |
| 500 | SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); |
| 501 | return (EINVAL); |
| 502 | } |
| 503 | if (addr != NULL) { |
| 504 | if ((addr->sa_family != AF_INET) || |
| 505 | (addr->sa_len != sizeof(struct sockaddr_in))) { |
| 506 | SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); |
| 507 | return (EINVAL); |
| 508 | } |
| 509 | } |
| 510 | return (sctp_inpcb_bind(so, addr, NULL, p)); |
| 511 | } |
| 512 | |
| 513 | #endif |
| 514 | void |
nothing calls this directly
no test coverage detected