Lines Matching defs:so

211 static int udp_detach(struct socket *so);
427 panic("udp_input: bad so back ptr inp=%p\n", inp);
861 * just wake up so that they can collect error status.
916 udp_ctloutput(struct socket *so, struct sockopt *sopt)
924 return (ip_ctloutput(so, sopt));
927 inp = sotoinpcb(so);
1309 struct socket *so = inp->inp_socket;
1322 flowadv = (so->so_state & SS_ISCONNECTED) ? 1 : 0;
1384 (so->so_state & SS_ISCONNECTED)) {
1390 soevent(so,
1440 * so it's not an issue if the input runs at the same time we do this.
1555 set_packet_service_class(m, so, msc, 0);
1570 socket_unlock(so, 0);
1573 socket_lock(so, 0);
1683 udp_abort(struct socket *so)
1687 inp = sotoinpcb(so);
1689 panic("udp_abort: so=%p null inp\n", so); /* ??? possible? panic instead? */
1690 soisdisconnected(so);
1696 udp_attach(struct socket *so, __unused int proto, struct proc *p)
1701 inp = sotoinpcb(so);
1703 panic ("udp_attach so=%p inp=%p\n", so, inp);
1705 error = in_pcballoc(so, &udbinfo, p);
1708 error = soreserve(so, udp_sendspace, udp_recvspace);
1711 inp = (struct inpcb *)so->so_pcb;
1720 udp_bind(struct socket *so, struct sockaddr *nam, struct proc *p)
1729 inp = sotoinpcb(so);
1737 udp_connect(struct socket *so, struct sockaddr *nam, struct proc *p)
1742 inp = sotoinpcb(so);
1749 soisconnected(so);
1757 udp_detach(struct socket *so)
1761 inp = sotoinpcb(so);
1763 panic("udp_detach: so=%p null inp\n", so); /* ??? possible? panic instead? */
1770 udp_disconnect(struct socket *so)
1774 inp = sotoinpcb(so);
1786 so->so_state &= ~SS_ISCONNECTED; /* XXX */
1792 udp_send(struct socket *so, __unused int flags, struct mbuf *m, struct sockaddr *addr,
1797 inp = sotoinpcb(so);
1807 udp_shutdown(struct socket *so)
1811 inp = sotoinpcb(so);
1814 socantsendmore(so);
1828 udp_lock(struct socket *so, int refcount, void *debug)
1837 if (so->so_pcb) {
1838 lck_mtx_assert(&((struct inpcb *)so->so_pcb)->inpcb_mtx,
1840 lck_mtx_lock(&((struct inpcb *)so->so_pcb)->inpcb_mtx);
1842 panic("udp_lock: so=%p NO PCB! lr=%p lrh= %s\n",
1843 so, lr_saved, solockhistory_nr(so));
1847 so->so_usecount++;
1849 so->lock_lr[so->next_lock_lr] = lr_saved;
1850 so->next_lock_lr = (so->next_lock_lr+1) % SO_LCKDBG_MAX;
1855 udp_unlock(struct socket *so, int refcount, void *debug)
1865 so->so_usecount--;
1867 if (so->so_pcb == NULL) {
1868 panic("udp_unlock: so=%p NO PCB! lr=%p lrh= %s\n",
1869 so, lr_saved, solockhistory_nr(so));
1872 lck_mtx_assert(&((struct inpcb *)so->so_pcb)->inpcb_mtx,
1874 so->unlock_lr[so->next_unlock_lr] = lr_saved;
1875 so->next_unlock_lr = (so->next_unlock_lr+1) % SO_LCKDBG_MAX;
1876 lck_mtx_unlock(&((struct inpcb *)so->so_pcb)->inpcb_mtx);
1884 udp_getlock(struct socket *so, __unused int locktype)
1886 struct inpcb *inp = sotoinpcb(so);
1889 if (so->so_pcb)
1892 panic("udp_getlock: so=%p NULL so_pcb lrh= %s\n",
1893 so, solockhistory_nr(so));
1894 return (so->so_proto->pr_domain->dom_mtx);
1902 struct socket *so;
1921 so = inp->inp_socket;
1925 if (so->so_usecount == 0) {
1928 if (INP_CHECK_SOCKAF(so, AF_INET6))