diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-10-22 17:43:33 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:29:00 -0500 |
commit | 76682299a865e916c9f106b167da8e88caa86fa3 (patch) | |
tree | f609e6aae591eb207e99aa06e7764a8fc2867ff3 /net.c | |
parent | 1abb817258e3014e89555a85a92d3966f5ae7445 (diff) | |
download | qemu-76682299a865e916c9f106b167da8e88caa86fa3.tar.gz qemu-76682299a865e916c9f106b167da8e88caa86fa3.tar.bz2 qemu-76682299a865e916c9f106b167da8e88caa86fa3.zip |
net: import linux tap ioctl definitions
Making features dependent on the availability of newer versions if_tun.h
is going to get seriously clumsy, so let's just import the definitions
we need. It's only a small handful.
If and when we're comfortable depending on 2.6.30 headers, we can remove
this again.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -46,7 +46,7 @@ #include <net/if_tap.h> #endif #ifdef __linux__ -#include <linux/if_tun.h> +#include "tap-linux.h" #endif #include <arpa/inet.h> #include <dirent.h> @@ -1385,7 +1385,6 @@ static void tap_send(void *opaque) } while (size > 0); } -#ifdef TUNSETSNDBUF /* sndbuf should be set to a value lower than the tx queue * capacity of any destination network interface. * Ethernet NICs generally have txqueuelen=1000, so 1Mb is @@ -1408,12 +1407,6 @@ static int tap_set_sndbuf(TAPState *s, QemuOpts *opts) } return 0; } -#else -static int tap_set_sndbuf(TAPState *s, QemuOpts *opts) -{ - return 0; -} -#endif /* TUNSETSNDBUF */ static void tap_cleanup(VLANClientState *vc) { @@ -2987,12 +2980,10 @@ static struct { .name = "downscript", .type = QEMU_OPT_STRING, .help = "script to shut down the interface", -#ifdef TUNSETSNDBUF }, { .name = "sndbuf", .type = QEMU_OPT_SIZE, .help = "send buffer limit" -#endif }, { /* end of list */ } }, |