aboutsummaryrefslogtreecommitdiff
path: root/net/tap-bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tap-bsd.c')
-rw-r--r--net/tap-bsd.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index b4c8444..bbf84d1 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -98,7 +98,12 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
return -1;
}
}
- g_unix_set_fd_nonblocking(fd, true, NULL);
+
+ if (!qemu_set_blocking(fd, false, errp)) {
+ close(fd);
+ return -1;
+ }
+
return fd;
}
@@ -189,7 +194,10 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
goto error;
}
- g_unix_set_fd_nonblocking(fd, true, NULL);
+ if (!qemu_set_blocking(fd, false, errp)) {
+ goto error;
+ }
+
return fd;
error:
@@ -217,6 +225,11 @@ int tap_probe_has_uso(int fd)
return 0;
}
+bool tap_probe_has_tunnel(int fd)
+{
+ return false;
+}
+
void tap_fd_set_vnet_hdr_len(int fd, int len)
{
}
@@ -231,8 +244,7 @@ int tap_fd_set_vnet_be(int fd, int is_be)
return -EINVAL;
}
-void tap_fd_set_offload(int fd, int csum, int tso4,
- int tso6, int ecn, int ufo, int uso4, int uso6)
+void tap_fd_set_offload(int fd, const NetOffloads *ol)
{
}