]> git.proxmox.com Git - qemu.git/blobdiff - net/tap-solaris.c
qemu_ram_ptr_length: take ram_addr_t as arguments
[qemu.git] / net / tap-solaris.c
index 3f48e573289e9cabc024f65169ef8d5556e0ec9e..c216d282676113108ce7cf2f103cbd33dba7fe10 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "net/tap.h"
+#include "sysemu.h"
 
 #include <sys/stat.h>
 #include <sys/ethernet.h>
@@ -37,6 +38,7 @@
 #include <net/if.h>
 #include <syslog.h>
 #include <stropts.h>
+#include "qemu-error.h"
 
 ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen)
 {
@@ -180,6 +182,17 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
        return -1;
     }
     pstrcpy(ifname, ifname_size, dev);
+    if (*vnet_hdr) {
+        /* Solaris doesn't have IFF_VNET_HDR */
+        *vnet_hdr = 0;
+
+        if (vnet_hdr_required && !*vnet_hdr) {
+            error_report("vnet_hdr=1 requested, but no kernel "
+                         "support for IFF_VNET_HDR available");
+            close(fd);
+            return -1;
+        }
+    }
     fcntl(fd, F_SETFL, O_NONBLOCK);
     return fd;
 }
@@ -193,3 +206,22 @@ int tap_probe_vnet_hdr(int fd)
 {
     return 0;
 }
+
+int tap_probe_has_ufo(int fd)
+{
+    return 0;
+}
+
+int tap_probe_vnet_hdr_len(int fd, int len)
+{
+    return 0;
+}
+
+void tap_fd_set_vnet_hdr_len(int fd, int len)
+{
+}
+
+void tap_fd_set_offload(int fd, int csum, int tso4,
+                        int tso6, int ecn, int ufo)
+{
+}