From 76682299a865e916c9f106b167da8e88caa86fa3 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 22 Oct 2009 17:43:33 +0100 Subject: 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 Signed-off-by: Anthony Liguori --- net.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'net.c') diff --git a/net.c b/net.c index 75a01d2..acddb97 100644 --- a/net.c +++ b/net.c @@ -46,7 +46,7 @@ #include #endif #ifdef __linux__ -#include +#include "tap-linux.h" #endif #include #include @@ -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 */ } }, -- cgit v1.1