size_t slirp_socket_can_recv(Slirp *slirp, struct in_addr guest_addr,

                             int guest_port)

{

	struct iovec iov[2];

	struct socket *so;



	so = slirp_find_ctl_socket(slirp, guest_addr, guest_port);



	if (!so || so->so_state & SS_NOFDREF)

		return 0;



	if (!CONN_CANFRCV(so) || so->so_snd.sb_cc >= (so->so_snd.sb_datalen/2))

		return 0;



	return sopreprbuf(so, iov, NULL);

}

size_t slirp_socket_can_recv(Slirp *slirp, struct in_addr guest_addr,

                             int guest_port)

{

	struct iovec iov[2];

	struct socket *so;



	so = slirp_find_ctl_socket(slirp, guest_addr, guest_port);



	if (!so || so->so_state & SS_NOFDREF)

		return 0;



	if (!CONN_CANFRCV(so) || so->so_snd.sb_cc >= (so->so_snd.sb_datalen/2))

		return 0;



	return sopreprbuf(so, iov, NULL);

}

size_t FUNC_0(Slirp *slirp, struct in_addr guest_addr,

                             int guest_port)

{

	struct iovec VAR_0[2];

	struct socket *VAR_1;



	VAR_1 = slirp_find_ctl_socket(slirp, guest_addr, guest_port);



	if (!VAR_1 || VAR_1->so_state & SS_NOFDREF)

		return 0;



	if (!CONN_CANFRCV(VAR_1) || VAR_1->so_snd.sb_cc >= (VAR_1->so_snd.sb_datalen/2))

		return 0;



	return sopreprbuf(VAR_1, VAR_0, NULL);

}

size_t FUNC_0(Slirp *slirp, struct in_addr guest_addr,
int guest_port)
{ struct iovec VAR_0[2]; struct socket *VAR_1; VAR_1 = slirp_find_ctl_socket(slirp, guest_addr, guest_port); if (!VAR_1 || VAR_1->so_state & SS_NOFDREF)
return 0; if (!CONN_CANFRCV(VAR_1) || VAR_1->so_snd.sb_cc >= (VAR_1->so_snd.sb_datalen/2))
return 0; return sopreprbuf(VAR_1, VAR_0, NULL); }