aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/socket.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/socket.c b/net/socket.c
index 15b410e8d8..c4b80e9228 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -120,9 +120,9 @@ static ssize_t net_socket_receive_dgram(NetClientState *nc, const uint8_t *buf,
do {
if (s->dgram_dst.sin_family != AF_UNIX) {
- ret = qemu_sendto(s->fd, buf, size, 0,
- (struct sockaddr *)&s->dgram_dst,
- sizeof(s->dgram_dst));
+ ret = sendto(s->fd, buf, size, 0,
+ (struct sockaddr *)&s->dgram_dst,
+ sizeof(s->dgram_dst));
} else {
ret = send(s->fd, buf, size, 0);
}
@@ -163,7 +163,7 @@ static void net_socket_send(void *opaque)
uint8_t buf1[NET_BUFSIZE];
const uint8_t *buf;
- size = qemu_recv(s->fd, buf1, sizeof(buf1), 0);
+ size = recv(s->fd, buf1, sizeof(buf1), 0);
if (size < 0) {
if (errno != EWOULDBLOCK)
goto eoc;
@@ -198,7 +198,7 @@ static void net_socket_send_dgram(void *opaque)
NetSocketState *s = opaque;
int size;
- size = qemu_recv(s->fd, s->rs.buf, sizeof(s->rs.buf), 0);
+ size = recv(s->fd, s->rs.buf, sizeof(s->rs.buf), 0);
if (size < 0)
return;
if (size == 0) {
@@ -246,7 +246,7 @@ static int net_socket_mcast_create(struct sockaddr_in *mcastaddr,
* only on posix systems.
*/
val = 1;
- ret = qemu_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
+ ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
if (ret < 0) {
error_setg_errno(errp, errno,
"can't set socket option SO_REUSEADDR");
@@ -268,8 +268,8 @@ static int net_socket_mcast_create(struct sockaddr_in *mcastaddr,
imr.imr_interface.s_addr = htonl(INADDR_ANY);
}
- ret = qemu_setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
- &imr, sizeof(struct ip_mreq));
+ ret = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+ &imr, sizeof(struct ip_mreq));
if (ret < 0) {
error_setg_errno(errp, errno,
"can't add socket to multicast group %s",
@@ -279,8 +279,8 @@ static int net_socket_mcast_create(struct sockaddr_in *mcastaddr,
/* Force mcast msgs to loopback (eg. several QEMUs in same host */
loop = 1;
- ret = qemu_setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
- &loop, sizeof(loop));
+ ret = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
+ &loop, sizeof(loop));
if (ret < 0) {
error_setg_errno(errp, errno,
"can't force multicast message to loopback");
@@ -289,8 +289,8 @@ static int net_socket_mcast_create(struct sockaddr_in *mcastaddr,
/* If a bind address is given, only send packets from that address */
if (localaddr != NULL) {
- ret = qemu_setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF,
- localaddr, sizeof(*localaddr));
+ ret = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF,
+ localaddr, sizeof(*localaddr));
if (ret < 0) {
error_setg_errno(errp, errno,
"can't set the default network send interface");