static void tcp6_usr_accept(netmsg_t msg) { struct socket *so = msg->accept.base.nm_so; struct sockaddr **nam = msg->accept.nm_nam; int error = 0; struct inpcb *inp; struct tcpcb *tp = NULL; TCPDEBUG0; inp = so->so_pcb; if (so->so_state & SS_ISDISCONNECTED) { error = ECONNABORTED; goto out; } if (inp == 0) { error = EINVAL; goto out; } tp = intotcpcb(inp); TCPDEBUG1(); in6_mapped_peeraddr(so, nam); COMMON_END(PRU_ACCEPT); }
static int tcp6_usr_accept(struct socket *so, struct sockaddr **nam) { int s = splnet(); int error = 0; struct inpcb *inp = sotoinpcb(so); struct tcpcb *tp = NULL; TCPDEBUG0; if (so->so_state & SS_ISDISCONNECTED) { error = ECONNABORTED; goto out; } if (inp == 0) { splx(s); return (EINVAL); } tp = intotcpcb(inp); TCPDEBUG1(); in6_mapped_peeraddr(so, nam); COMMON_END(PRU_ACCEPT); }