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

Function sctp_bind

freebsd/netinet/sctp_usrreq.c:493–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493static int
494sctp_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
514void

Callers

nothing calls this directly

Calls 1

sctp_inpcb_bindFunction · 0.85

Tested by

no test coverage detected