Lines Matching defs:so
164 struct socket *so = inp->inp_socket;
168 if (so->so_usecount == 0) {
185 struct socket *so = inp->inp_socket;
189 int wild = 0, reuseport = (so->so_options & SO_REUSEPORT);
199 if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0)
201 socket_unlock(so, 0); /* keep reference */
209 socket_lock(so, 0);
217 socket_lock(so, 0);
225 socket_lock(so, 0);
240 if (so->so_options & SO_REUSEADDR)
248 socket_lock(so, 0);
265 socket_lock(so, 0);
284 socket_lock(so, 0);
290 if (kauth_cred_getuid(so->so_cred) &&
300 (kauth_cred_getuid(so->so_cred) !=
304 socket_lock(so, 0);
316 (kauth_cred_getuid(so->so_cred) !=
320 INP_SOCKAF(so) ==
324 socket_lock(so, 0);
333 socket_lock(so, 0);
348 INP_SOCKAF(so) ==
351 socket_lock(so, 0);
359 socket_lock(so, 0);
378 sflt_notify(so, sock_evt_bound, NULL);
504 * even in the error case, so make sure that it's released
584 struct socket *so = inp->inp_socket;
594 printf("in6_pcbdetach so=%p can't be marked dead ok\n", so);
598 if ((so->so_flags & SOF_PCBCLEARING) == 0) {
603 so->so_flags |= SOF_PCBCLEARING;
679 * in struct pr_usrreqs, so that protocols can just reference then directly
682 * except through a kernel programming error, so it is acceptable to panic
688 struct socket *so,
695 inp = sotoinpcb(so);
710 struct socket *so,
717 inp = sotoinpcb(so);
731 in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam)
733 struct inpcb *inp = sotoinpcb(so);
739 error = in_setsockaddr(so, nam);
744 error = in6_setsockaddr(so, nam);
750 in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam)
752 struct inpcb *inp = sotoinpcb(so);
758 error = in_setpeeraddr(so, nam);
763 error = in6_setpeeraddr(so, nam);