Lines Matching defs:so
162 static void udp_detach(struct socket *so);
192 * so that future changes to add, for example, per-CPU stats support won't
235 struct socket *so;
313 so = inp->inp_socket;
314 SOCKBUF_LOCK(&so->so_rcv);
315 if (sbappendaddr_locked(&so->so_rcv, append_sa, n, opts) == 0) {
316 soroverflow_locked(so);
322 sorwakeup_locked(so);
679 * Notify a udp user of an asynchronous error; just wake up so that they can
862 udp_ctloutput(struct socket *so, struct sockopt *sopt)
869 isudplite = (so->so_proto->pr_protocol == IPPROTO_UDPLITE) ? 1 : 0;
870 inp = sotoinpcb(so);
873 if (sopt->sopt_level != so->so_proto->pr_protocol) {
875 if (INP_CHECK_SOCKAF(so, AF_INET6)) {
877 error = ip6_ctloutput(so, sopt);
886 error = ip_ctloutput(so, sopt);
899 if (INP_SOCKAF(so) == AF_INET) {
909 if (INP_SOCKAF(so) == AF_INET6) {
935 inp = sotoinpcb(so);
963 if (INP_SOCKAF(so) == AF_INET) {
973 if (INP_SOCKAF(so) == AF_INET6) {
1071 udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
1092 inp = sotoinpcb(so);
1270 * Jail may rewrite the destination address, so let it do
1493 udp_abort(struct socket *so)
1498 pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
1499 inp = sotoinpcb(so);
1506 soisdisconnected(so);
1512 udp_attach(struct socket *so, int proto, struct thread *td)
1520 pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
1521 inp = sotoinpcb(so);
1523 error = soreserve(so, udp_sendspace, udp_recvspace);
1526 error = in_pcballoc(so, pcbinfo);
1530 inp = sotoinpcb(so);
1543 udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f, udp_tun_icmp_t i, void *ctx)
1548 KASSERT(so->so_type == SOCK_DGRAM,
1550 inp = sotoinpcb(so);
1568 udp_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
1575 pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
1576 inp = sotoinpcb(so);
1602 udp_close(struct socket *so)
1607 pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
1608 inp = sotoinpcb(so);
1615 soisdisconnected(so);
1621 udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
1629 pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
1630 inp = sotoinpcb(so);
1655 soisconnected(so);
1661 udp_detach(struct socket *so)
1665 inp = sotoinpcb(so);
1674 udp_disconnect(struct socket *so)
1679 pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
1680 inp = sotoinpcb(so);
1690 SOCK_LOCK(so);
1691 so->so_state &= ~SS_ISCONNECTED; /* XXX */
1692 SOCK_UNLOCK(so);
1699 udp_shutdown(struct socket *so, enum shutdown_how how)
1703 SOCK_LOCK(so);
1704 if (!(so->so_state & SS_ISCONNECTED))
1721 SOCK_UNLOCK(so);
1725 sorflush(so);
1728 sorflush(so);
1731 socantsendmore(so);