FreeBSD/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
/*
 * Drop a SDP socket, reporting
 * the specified error.  If connection is synchronized,
 * then send a RST to peer.
 */
Drop a SDP socket, reporting
the specified error.  If connection is synchronized,
then send a RST to peer.
Drop a SDP socket reporting the specified error . If connection is synchronized then send a RST to peer .
static struct sdp_sock *
sdp_drop(struct sdp_sock *ssk, int errno)
{
	struct socket *so;
	SDP_WLOCK_ASSERT(ssk);
	so = ssk->socket;
	if (TCPS_HAVERCVDSYN(ssk->state))
		sdp_output_reset(ssk);
	if (errno == ETIMEDOUT && ssk->softerror)
		errno = ssk->softerror;
	so->so_error = errno;
	return (sdp_closed(ssk));
}
static struct sdp_sock * sdp_drop ( struct sdp_sock * ssk , int errno ) { struct socket * so ; SDP_WLOCK_ASSERT ( ssk ) ; so = ssk -> socket ; if ( TCPS_HAVERCVDSYN ( ssk -> state ) ) sdp_output_reset ( ssk ) ; if ( errno == ETIMEDOUT && ssk -> softerror ) errno = ssk -> softerror ; so -> so_error = errno ; return ( sdp_closed ( ssk ) ) ; }
Drop a SDP socket, reporting
 the specified error.
Drop a SDP socket reporting the specified error .