From patchwork Wed Oct 24 12:58:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 193781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 672A02C008B for ; Thu, 25 Oct 2012 00:40:18 +1100 (EST) Received: from localhost ([::1]:56877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR0Zz-0003L9-3w for incoming@patchwork.ozlabs.org; Wed, 24 Oct 2012 09:01:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR0Zi-0003DV-3f for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:00:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR0ZX-0003Jx-0L for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:00:45 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:51493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR0ZV-0002tO-Hl for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:00:34 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so1143412pbb.4 for ; Wed, 24 Oct 2012 06:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=oRWIkZYCVuj6L8y69JH3NvKcjaVov0mWgTgu3csAP4o=; b=pchhPI7m/aZrOawxi2neOIgWUANdH5785nxkN6Bf/98eCLiJqp4nF/L41CR5duGlhn TIU5UftVa+8Pe80+OVEHaWEBppFSQ+Z3jhjLEzyhphWjES5H8omN4D0pUGnOPnTXUG19 q+MTnRvB3BuoTL9FfNykSEtAcXbliPk9Bz+fYEm/ljD8hw+pOHnztzmx29jf4wbBqkQI PkpqA+2bL8zCpBVhypZQvJifmOXd37843rsFGC+ayCye/rkcNIEq1HLGB//lu5fn/fxb v81LEqH8Rr5B58FebmPOG6n8Dyug1R7ixFUNRcw+oETxbuSrTy2BLYdTm4dhpjhJNswF X4aA== Received: by 10.66.76.162 with SMTP id l2mr14093437paw.36.1351083629113; Wed, 24 Oct 2012 06:00:29 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id n7sm9466138pav.26.2012.10.24.06.00.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Oct 2012 06:00:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 24 Oct 2012 14:58:45 +0200 Message-Id: <1351083542-15272-16-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1351083542-15272-1-git-send-email-pbonzini@redhat.com> References: <1351083542-15272-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: peter.maydell@linaro.org, aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 15/32] net: reorganize headers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Move public headers to include/net, and leave private headers in net/. Put the virtio headers in include/net/tap.h, removing the multiple copies that existed. Leave include/net/tap.h as the interface for NICs, and net/tap_int.h as the interface for OS-specific parts of the tap backend. Signed-off-by: Paolo Bonzini --- hmp.c | 2 +- hw/axis_dev88.c | 2 +- hw/cadence_gem.c | 2 +- hw/dp8393x.c | 2 +- hw/e1000.c | 2 +- hw/eepro100.c | 2 +- hw/etraxfs.h | 2 +- hw/etraxfs_eth.c | 2 +- hw/exynos4_boards.c | 2 +- hw/gumstix.c | 2 +- hw/highbank.c | 2 +- hw/integratorcp.c | 2 +- hw/kzm.c | 2 +- hw/lan9118.c | 2 +- hw/lance.c | 2 +- hw/mainstone.c | 2 +- hw/mcf5208.c | 2 +- hw/mcf_fec.c | 2 +- hw/milkymist-hw.h | 2 +- hw/milkymist-minimac2.c | 2 +- hw/mips_fulong2e.c | 2 +- hw/mips_jazz.c | 2 +- hw/mips_malta.c | 2 +- hw/mips_mipssim.c | 2 +- hw/mips_r4k.c | 2 +- hw/mipsnet.c | 2 +- hw/musicpal.c | 2 +- hw/ne2000-isa.c | 2 +- hw/ne2000.c | 2 +- hw/opencores_eth.c | 2 +- hw/openrisc_sim.c | 2 +- hw/pc.h | 2 +- hw/pc_piix.c | 2 +- hw/pci-hotplug.c | 2 +- hw/pci.c | 2 +- hw/pcnet-pci.c | 2 +- hw/pcnet.c | 2 +- hw/petalogix_ml605_mmu.c | 2 +- hw/petalogix_s3adsp1800_mmu.c | 2 +- hw/ppc440_bamboo.c | 2 +- hw/ppc_newworld.c | 2 +- hw/ppc_oldworld.c | 2 +- hw/ppc_prep.c | 2 +- hw/qdev-properties.c | 3 +-- hw/qdev.c | 2 +- hw/r2d.c | 2 +- hw/realview.c | 2 +- hw/rtl8139.c | 2 +- hw/s390-virtio.c | 2 +- hw/smc91c111.c | 2 +- hw/spapr.c | 2 +- hw/spapr_llan.c | 2 +- hw/stellaris.c | 2 +- hw/stellaris_enet.c | 2 +- hw/sun4m.c | 2 +- hw/sun4u.c | 2 +- hw/usb/dev-network.c | 2 +- hw/versatilepb.c | 2 +- hw/vexpress.c | 2 +- hw/vhost_net.c | 2 +- hw/vhost_net.h | 2 +- hw/virtio-net.c | 2 +- hw/virtio-net.h | 27 --------------------------- hw/virtio.h | 2 +- hw/xen_backend.h | 2 +- hw/xen_nic.c | 2 +- hw/xgmac.c | 2 +- hw/xilinx.h | 2 +- hw/xilinx_axienet.c | 2 +- hw/xilinx_ethlite.c | 2 +- hw/xilinx_zynq.c | 2 +- hw/xtensa_lx60.c | 2 +- {net => include/net}/checksum.h | 0 net.h => include/net/net.h | 3 +++ {net => include/net}/queue.h | 0 {net => include/net}/slirp.h | 0 {net => include/net}/tap.h | 37 +++++++++++++++++++++++-------------- monitor.c | 2 +- net/clients.h | 2 +- net/hub.c | 2 +- net/hub.h | 2 -- net/net.c | 4 ++-- net/queue.c | 2 +- net/slirp.c | 2 +- net/socket.c | 2 +- net/tap-aix.c | 2 +- net/tap-bsd.c | 2 +- net/tap-haiku.c | 2 +- net/tap-linux.c | 3 ++- net/tap-linux.h | 20 ++------------------ net/tap-solaris.c | 2 +- net/tap-win32.c | 4 ++-- net/tap.c | 6 +++--- net/{tap.h => tap_int.h} | 18 +++--------------- net/util.c | 2 +- net/vde.c | 2 +- savevm.c | 2 +- vl.c | 2 +- 98 files changed, 125 insertions(+), 170 deletions(-) rename {net => include/net}/checksum.h (100%) rename net.h => include/net/net.h (98%) rename {net => include/net}/queue.h (100%) rename {net => include/net}/slirp.h (100%) copy {net => include/net}/tap.h (69%) rename net/{tap.h => tap_int.h} (77%) diff --git a/hmp.c b/hmp.c index 264f226..313233f 100644 --- a/hmp.c +++ b/hmp.c @@ -14,7 +14,7 @@ */ #include "hmp.h" -#include "net.h" +#include "net/net.h" #include "qemu-char.h" #include "qemu-option.h" #include "qemu-timer.h" diff --git a/hw/axis_dev88.c b/hw/axis_dev88.c index 2fd7356..b5d8882 100644 --- a/hw/axis_dev88.c +++ b/hw/axis_dev88.c @@ -23,7 +23,7 @@ */ #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "flash.h" #include "boards.h" #include "etraxfs.h" diff --git a/hw/cadence_gem.c b/hw/cadence_gem.c index 967f625..0460e37 100644 --- a/hw/cadence_gem.c +++ b/hw/cadence_gem.c @@ -25,7 +25,7 @@ #include /* For crc32 */ #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "net/checksum.h" #ifdef CADENCE_GEM_ERR_DEBUG diff --git a/hw/dp8393x.c b/hw/dp8393x.c index 4fa6ecc..7ee3672 100644 --- a/hw/dp8393x.c +++ b/hw/dp8393x.c @@ -19,7 +19,7 @@ #include "hw.h" #include "qemu-timer.h" -#include "net.h" +#include "net/net.h" #include "mips.h" //#define DEBUG_SONIC diff --git a/hw/e1000.c b/hw/e1000.c index 63fee10..071d077 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -27,7 +27,7 @@ #include "hw.h" #include "pci.h" -#include "net.h" +#include "net/net.h" #include "net/checksum.h" #include "loader.h" #include "sysemu.h" diff --git a/hw/eepro100.c b/hw/eepro100.c index 5b23116..0375fc8 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -43,7 +43,7 @@ #include /* offsetof */ #include "hw.h" #include "pci.h" -#include "net.h" +#include "net/net.h" #include "eeprom93xx.h" #include "sysemu.h" #include "dma.h" diff --git a/hw/etraxfs.h b/hw/etraxfs.h index c62f94b..64f87a5 100644 --- a/hw/etraxfs.h +++ b/hw/etraxfs.h @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "net.h" +#include "net/net.h" #include "etraxfs_dma.h" qemu_irq *cris_pic_init_cpu(CPUCRISState *env); diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c index b124f5b..8a77c98 100644 --- a/hw/etraxfs_eth.c +++ b/hw/etraxfs_eth.c @@ -24,7 +24,7 @@ #include #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "etraxfs.h" #define D(x) diff --git a/hw/exynos4_boards.c b/hw/exynos4_boards.c index 4951064..7eb004f 100644 --- a/hw/exynos4_boards.c +++ b/hw/exynos4_boards.c @@ -23,7 +23,7 @@ #include "sysemu.h" #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "arm-misc.h" #include "exec-memory.h" #include "exynos4210.h" diff --git a/hw/gumstix.c b/hw/gumstix.c index 4103a88..545b92f 100644 --- a/hw/gumstix.c +++ b/hw/gumstix.c @@ -36,7 +36,7 @@ #include "hw.h" #include "pxa.h" -#include "net.h" +#include "net/net.h" #include "flash.h" #include "devices.h" #include "boards.h" diff --git a/hw/highbank.c b/hw/highbank.c index 15036b6..7b97de0 100644 --- a/hw/highbank.c +++ b/hw/highbank.c @@ -21,7 +21,7 @@ #include "arm-misc.h" #include "devices.h" #include "loader.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "sysbus.h" diff --git a/hw/integratorcp.c b/hw/integratorcp.c index ac0ea83..df68105 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -11,7 +11,7 @@ #include "devices.h" #include "boards.h" #include "arm-misc.h" -#include "net.h" +#include "net/net.h" #include "exec-memory.h" #include "sysemu.h" diff --git a/hw/kzm.c b/hw/kzm.c index 687daf3..a27ecbb 100644 --- a/hw/kzm.c +++ b/hw/kzm.c @@ -18,7 +18,7 @@ #include "hw.h" #include "arm-misc.h" #include "devices.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "serial.h" diff --git a/hw/lan9118.c b/hw/lan9118.c index ceaf96f..cf33af1 100644 --- a/hw/lan9118.c +++ b/hw/lan9118.c @@ -11,7 +11,7 @@ */ #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "devices.h" #include "sysemu.h" #include "ptimer.h" diff --git a/hw/lance.c b/hw/lance.c index 9b98bb8..d0e055c 100644 --- a/hw/lance.c +++ b/hw/lance.c @@ -36,7 +36,7 @@ */ #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "qemu-timer.h" #include "qemu_socket.h" #include "sun4m.h" diff --git a/hw/mainstone.c b/hw/mainstone.c index c0d6034..1315a29 100644 --- a/hw/mainstone.c +++ b/hw/mainstone.c @@ -14,7 +14,7 @@ #include "hw.h" #include "pxa.h" #include "arm-misc.h" -#include "net.h" +#include "net/net.h" #include "devices.h" #include "boards.h" #include "flash.h" diff --git a/hw/mcf5208.c b/hw/mcf5208.c index 688bc3c..60b311a 100644 --- a/hw/mcf5208.c +++ b/hw/mcf5208.c @@ -10,7 +10,7 @@ #include "qemu-timer.h" #include "ptimer.h" #include "sysemu.h" -#include "net.h" +#include "net/net.h" #include "boards.h" #include "loader.h" #include "elf.h" diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c index 2fec5bc..0e23f0a 100644 --- a/hw/mcf_fec.c +++ b/hw/mcf_fec.c @@ -6,7 +6,7 @@ * This code is licensed under the GPL */ #include "hw.h" -#include "net.h" +#include "net/net.h" #include "mcf.h" /* For crc32 */ #include diff --git a/hw/milkymist-hw.h b/hw/milkymist-hw.h index b293152..9144379 100644 --- a/hw/milkymist-hw.h +++ b/hw/milkymist-hw.h @@ -3,7 +3,7 @@ #include "qdev.h" #include "qdev-addr.h" -#include "net.h" +#include "net/net.h" static inline DeviceState *milkymist_uart_create(target_phys_addr_t base, qemu_irq irq) diff --git a/hw/milkymist-minimac2.c b/hw/milkymist-minimac2.c index b483a02..dbcbaa0 100644 --- a/hw/milkymist-minimac2.c +++ b/hw/milkymist-minimac2.c @@ -25,7 +25,7 @@ #include "hw.h" #include "sysbus.h" #include "trace.h" -#include "net.h" +#include "net/net.h" #include "qemu-error.h" #include "qdev-addr.h" diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index 5fcf900..cc31bb7 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -22,7 +22,7 @@ #include "pc.h" #include "serial.h" #include "fdc.h" -#include "net.h" +#include "net/net.h" #include "boards.h" #include "smbus.h" #include "block.h" diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c index 6bd231d..4509cb4 100644 --- a/hw/mips_jazz.c +++ b/hw/mips_jazz.c @@ -32,7 +32,7 @@ #include "sysemu.h" #include "arch_init.h" #include "boards.h" -#include "net.h" +#include "net/net.h" #include "esp.h" #include "mips-bios.h" #include "loader.h" diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 22ec8b9..e26caff 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -26,7 +26,7 @@ #include "pc.h" #include "serial.h" #include "fdc.h" -#include "net.h" +#include "net/net.h" #include "boards.h" #include "smbus.h" #include "block.h" diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c index a95a3c1..484e2f7 100644 --- a/hw/mips_mipssim.c +++ b/hw/mips_mipssim.c @@ -29,7 +29,7 @@ #include "mips_cpudevs.h" #include "serial.h" #include "isa.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "mips-bios.h" diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index 539577b..b84ca64 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -13,7 +13,7 @@ #include "pc.h" #include "serial.h" #include "isa.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "flash.h" diff --git a/hw/mipsnet.c b/hw/mipsnet.c index 28063b1..19b562c 100644 --- a/hw/mipsnet.c +++ b/hw/mipsnet.c @@ -1,5 +1,5 @@ #include "hw.h" -#include "net.h" +#include "net/net.h" #include "trace.h" #include "sysbus.h" diff --git a/hw/musicpal.c b/hw/musicpal.c index 159d3c3..4551c25 100644 --- a/hw/musicpal.c +++ b/hw/musicpal.c @@ -12,7 +12,7 @@ #include "sysbus.h" #include "arm-misc.h" #include "devices.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "serial.h" diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c index 69982a9..99477a4 100644 --- a/hw/ne2000-isa.c +++ b/hw/ne2000-isa.c @@ -25,7 +25,7 @@ #include "pc.h" #include "isa.h" #include "qdev.h" -#include "net.h" +#include "net/net.h" #include "ne2000.h" #include "exec-memory.h" diff --git a/hw/ne2000.c b/hw/ne2000.c index 15605c4..72a2e32 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -23,7 +23,7 @@ */ #include "hw.h" #include "pci.h" -#include "net.h" +#include "net/net.h" #include "ne2000.h" #include "loader.h" #include "sysemu.h" diff --git a/hw/opencores_eth.c b/hw/opencores_eth.c index 8c15969..2bb10e8 100644 --- a/hw/opencores_eth.c +++ b/hw/opencores_eth.c @@ -33,7 +33,7 @@ #include "hw.h" #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "trace.h" diff --git a/hw/openrisc_sim.c b/hw/openrisc_sim.c index 7327740..e0e487c 100644 --- a/hw/openrisc_sim.c +++ b/hw/openrisc_sim.c @@ -22,7 +22,7 @@ #include "boards.h" #include "elf.h" #include "serial.h" -#include "net.h" +#include "net/net.h" #include "loader.h" #include "exec-memory.h" #include "sysemu.h" diff --git a/hw/pc.h b/hw/pc.h index 6cba7ce..e9aa0ea 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -6,7 +6,7 @@ #include "ioport.h" #include "isa.h" #include "fdc.h" -#include "net.h" +#include "net/net.h" #include "memory.h" #include "ioapic.h" diff --git a/hw/pc_piix.c b/hw/pc_piix.c index bf04a42..ea63fa1 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -30,7 +30,7 @@ #include "pci.h" #include "pci_ids.h" #include "usb.h" -#include "net.h" +#include "net/net.h" #include "boards.h" #include "ide.h" #include "kvm.h" diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index e7fb780..1be8263 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -25,7 +25,7 @@ #include "hw.h" #include "boards.h" #include "pci.h" -#include "net.h" +#include "net/net.h" #include "pc.h" #include "monitor.h" #include "scsi.h" diff --git a/hw/pci.c b/hw/pci.c index 7eeaac0..f6ac1c4 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -26,7 +26,7 @@ #include "pci_bridge.h" #include "pci_internals.h" #include "monitor.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "loader.h" #include "range.h" diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c index 48fd447..ea4cabb 100644 --- a/hw/pcnet-pci.c +++ b/hw/pcnet-pci.c @@ -28,7 +28,7 @@ */ #include "pci.h" -#include "net.h" +#include "net/net.h" #include "loader.h" #include "qemu-timer.h" #include "dma.h" diff --git a/hw/pcnet.c b/hw/pcnet.c index 40820b3..7fedf13 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -36,7 +36,7 @@ */ #include "qdev.h" -#include "net.h" +#include "net/net.h" #include "qemu-timer.h" #include "qemu_socket.h" #include "sysemu.h" diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c index 5b45809..787abee 100644 --- a/hw/petalogix_ml605_mmu.c +++ b/hw/petalogix_ml605_mmu.c @@ -27,7 +27,7 @@ #include "sysbus.h" #include "hw.h" -#include "net.h" +#include "net/net.h" #include "flash.h" #include "sysemu.h" #include "devices.h" diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c index 71c32ce..b2e2dd7 100644 --- a/hw/petalogix_s3adsp1800_mmu.c +++ b/hw/petalogix_s3adsp1800_mmu.c @@ -25,7 +25,7 @@ #include "sysbus.h" #include "hw.h" -#include "net.h" +#include "net/net.h" #include "flash.h" #include "sysemu.h" #include "devices.h" diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index 5616a26..6a525c8 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -13,7 +13,7 @@ #include "config.h" #include "qemu-common.h" -#include "net.h" +#include "net/net.h" #include "hw.h" #include "pci.h" #include "boards.h" diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c index a265445..bf309a7 100644 --- a/hw/ppc_newworld.c +++ b/hw/ppc_newworld.c @@ -53,7 +53,7 @@ #include "mac_dbdma.h" #include "nvram.h" #include "pci.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "fw_cfg.h" diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index de33408..f3b75cd 100644 --- a/hw/ppc_oldworld.c +++ b/hw/ppc_oldworld.c @@ -30,7 +30,7 @@ #include "mac_dbdma.h" #include "nvram.h" #include "sysemu.h" -#include "net.h" +#include "net/net.h" #include "isa.h" #include "pci.h" #include "boards.h" diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index a0d1c3d..7ad3b17 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -26,7 +26,7 @@ #include "pc.h" #include "serial.h" #include "fdc.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "isa.h" #include "pci.h" diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index fab3888..877ee09 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -1,9 +1,8 @@ -#include "net.h" +#include "net/net.h" #include "qdev.h" #include "qerror.h" #include "blockdev.h" #include "hw/block-common.h" -#include "net/hub.h" #include "qemu-char.h" void *qdev_get_prop_ptr(DeviceState *dev, Property *prop) diff --git a/hw/qdev.c b/hw/qdev.c index 9b9aba3..bc20417 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -25,7 +25,7 @@ inherit from a particular bus (e.g. PCI or I2C) rather than this API directly. */ -#include "net.h" +#include "net/net.h" #include "qdev.h" #include "sysemu.h" #include "error.h" diff --git a/hw/r2d.c b/hw/r2d.c index 3cb6942..d002f05 100644 --- a/hw/r2d.c +++ b/hw/r2d.c @@ -30,7 +30,7 @@ #include "sysemu.h" #include "boards.h" #include "pci.h" -#include "net.h" +#include "net/net.h" #include "sh7750_regs.h" #include "ide.h" #include "loader.h" diff --git a/hw/realview.c b/hw/realview.c index 8dc4be6..68df94e 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -12,7 +12,7 @@ #include "primecell.h" #include "devices.h" #include "pci.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "i2c.h" diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 6b28fea..3ab9895 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -55,7 +55,7 @@ #include "pci.h" #include "dma.h" #include "qemu-timer.h" -#include "net.h" +#include "net/net.h" #include "loader.h" #include "sysemu.h" #include "iov.h" diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index 39ff178..9a145df 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -21,7 +21,7 @@ #include "block.h" #include "blockdev.h" #include "sysemu.h" -#include "net.h" +#include "net/net.h" #include "boards.h" #include "monitor.h" #include "loader.h" diff --git a/hw/smc91c111.c b/hw/smc91c111.c index d6ef302..b5b041d 100644 --- a/hw/smc91c111.c +++ b/hw/smc91c111.c @@ -8,7 +8,7 @@ */ #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include "devices.h" /* For crc32 */ #include diff --git a/hw/spapr.c b/hw/spapr.c index 637b3fb..5ebc542 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -27,7 +27,7 @@ #include "sysemu.h" #include "hw.h" #include "elf.h" -#include "net.h" +#include "net/net.h" #include "blockdev.h" #include "cpus.h" #include "kvm.h" diff --git a/hw/spapr_llan.c b/hw/spapr_llan.c index bd3f131..0cadeac 100644 --- a/hw/spapr_llan.c +++ b/hw/spapr_llan.c @@ -25,7 +25,7 @@ * */ #include "hw.h" -#include "net.h" +#include "net/net.h" #include "hw/qdev.h" #include "hw/spapr.h" #include "hw/spapr_vio.h" diff --git a/hw/stellaris.c b/hw/stellaris.c index bfb18b0..24a9b41 100644 --- a/hw/stellaris.c +++ b/hw/stellaris.c @@ -13,7 +13,7 @@ #include "devices.h" #include "qemu-timer.h" #include "i2c.h" -#include "net.h" +#include "net/net.h" #include "boards.h" #include "exec-memory.h" diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c index bc97280..4c7e31a 100644 --- a/hw/stellaris_enet.c +++ b/hw/stellaris_enet.c @@ -7,7 +7,7 @@ * This code is licensed under the GPL. */ #include "sysbus.h" -#include "net.h" +#include "net/net.h" #include //#define DEBUG_STELLARIS_ENET 1 diff --git a/hw/sun4m.c b/hw/sun4m.c index dbe93f9..980908d 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -28,7 +28,7 @@ #include "sparc32_dma.h" #include "fdc.h" #include "sysemu.h" -#include "net.h" +#include "net/net.h" #include "boards.h" #include "firmware_abi.h" #include "esp.h" diff --git a/hw/sun4u.c b/hw/sun4u.c index eeb6496..a922046 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -28,7 +28,7 @@ #include "serial.h" #include "nvram.h" #include "fdc.h" -#include "net.h" +#include "net/net.h" #include "qemu-timer.h" #include "sysemu.h" #include "boards.h" diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index df8a3bb..81142b7 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -26,7 +26,7 @@ #include "qemu-common.h" #include "hw/usb.h" #include "hw/usb/desc.h" -#include "net.h" +#include "net/net.h" #include "qemu-queue.h" #include "qemu-config.h" #include "sysemu.h" diff --git a/hw/versatilepb.c b/hw/versatilepb.c index 756ec29..ad1e730 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -10,7 +10,7 @@ #include "sysbus.h" #include "arm-misc.h" #include "devices.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "pci.h" #include "i2c.h" diff --git a/hw/vexpress.c b/hw/vexpress.c index 36503d6..6f1f0c9 100644 --- a/hw/vexpress.c +++ b/hw/vexpress.c @@ -25,7 +25,7 @@ #include "arm-misc.h" #include "primecell.h" #include "devices.h" -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "boards.h" #include "exec-memory.h" diff --git a/hw/vhost_net.c b/hw/vhost_net.c index df2c4a3..2962b4d 100644 --- a/hw/vhost_net.c +++ b/hw/vhost_net.c @@ -13,7 +13,7 @@ * GNU GPL, version 2 or (at your option) any later version. */ -#include "net.h" +#include "net/net.h" #include "net/tap.h" #include "virtio-net.h" diff --git a/hw/vhost_net.h b/hw/vhost_net.h index a9db234..012aba4 100644 --- a/hw/vhost_net.h +++ b/hw/vhost_net.h @@ -1,7 +1,7 @@ #ifndef VHOST_NET_H #define VHOST_NET_H -#include "net.h" +#include "net/net.h" struct vhost_net; typedef struct vhost_net VHostNetState; diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 50ba728..b3dbe78 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -13,7 +13,7 @@ #include "iov.h" #include "virtio.h" -#include "net.h" +#include "net/net.h" #include "net/checksum.h" #include "net/tap.h" #include "qemu-error.h" diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 58661d9..a25fca2 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -73,33 +73,6 @@ struct virtio_net_config uint16_t status; } QEMU_PACKED; -/* This is the first element of the scatter-gather list. If you don't - * specify GSO or CSUM features, you can simply ignore the header. */ -struct virtio_net_hdr -{ -#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset -#define VIRTIO_NET_HDR_F_DATA_VALID 2 // Csum is valid - uint8_t flags; -#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame -#define VIRTIO_NET_HDR_GSO_TCPV4 1 // GSO frame, IPv4 TCP (TSO) -#define VIRTIO_NET_HDR_GSO_UDP 3 // GSO frame, IPv4 UDP (UFO) -#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP -#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set - uint8_t gso_type; - uint16_t hdr_len; - uint16_t gso_size; - uint16_t csum_start; - uint16_t csum_offset; -}; - -/* This is the version of the header to use when the MRG_RXBUF - * feature has been negotiated. */ -struct virtio_net_hdr_mrg_rxbuf -{ - struct virtio_net_hdr hdr; - uint16_t num_buffers; /* Number of merged rx buffers */ -}; - /* * Control virtqueue data structures * diff --git a/hw/virtio.h b/hw/virtio.h index 80de375..257018a 100644 --- a/hw/virtio.h +++ b/hw/virtio.h @@ -15,7 +15,7 @@ #define _QEMU_VIRTIO_H #include "hw.h" -#include "net.h" +#include "net/net.h" #include "qdev.h" #include "sysemu.h" #include "event_notifier.h" diff --git a/hw/xen_backend.h b/hw/xen_backend.h index 3305630..92ab501 100644 --- a/hw/xen_backend.h +++ b/hw/xen_backend.h @@ -3,7 +3,7 @@ #include "xen_common.h" #include "sysemu.h" -#include "net.h" +#include "net/net.h" /* ------------------------------------------------------------- */ diff --git a/hw/xen_nic.c b/hw/xen_nic.c index dadacb1..dc12110 100644 --- a/hw/xen_nic.c +++ b/hw/xen_nic.c @@ -36,7 +36,7 @@ #include #include "hw.h" -#include "net.h" +#include "net/net.h" #include "net/checksum.h" #include "net/util.h" #include "xen_backend.h" diff --git a/hw/xgmac.c b/hw/xgmac.c index a91ef60..55f0b4f 100644 --- a/hw/xgmac.c +++ b/hw/xgmac.c @@ -27,7 +27,7 @@ #include "sysbus.h" #include "qemu-char.h" #include "qemu-log.h" -#include "net.h" +#include "net/net.h" #include "net/checksum.h" #ifdef DEBUG_XGMAC diff --git a/hw/xilinx.h b/hw/xilinx.h index 9830047..2036abc 100644 --- a/hw/xilinx.h +++ b/hw/xilinx.h @@ -1,6 +1,6 @@ #include "stream.h" #include "qemu-common.h" -#include "net.h" +#include "net/net.h" static inline DeviceState * xilinx_intc_create(target_phys_addr_t base, qemu_irq irq, int kind_of_intr) diff --git a/hw/xilinx_axienet.c b/hw/xilinx_axienet.c index c680187..9282801 100644 --- a/hw/xilinx_axienet.c +++ b/hw/xilinx_axienet.c @@ -24,7 +24,7 @@ #include "sysbus.h" #include "qemu-log.h" -#include "net.h" +#include "net/net.h" #include "net/checksum.h" #include "stream.h" diff --git a/hw/xilinx_ethlite.c b/hw/xilinx_ethlite.c index 56ca620..79682d4 100644 --- a/hw/xilinx_ethlite.c +++ b/hw/xilinx_ethlite.c @@ -24,7 +24,7 @@ #include "sysbus.h" #include "hw.h" -#include "net.h" +#include "net/net.h" #define D(x) #define R_TX_BUF0 0 diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index c55dafb..491a9a9 100644 --- a/hw/xilinx_zynq.c +++ b/hw/xilinx_zynq.c @@ -17,7 +17,7 @@ #include "sysbus.h" #include "arm-misc.h" -#include "net.h" +#include "net/net.h" #include "exec-memory.h" #include "sysemu.h" #include "boards.h" diff --git a/hw/xtensa_lx60.c b/hw/xtensa_lx60.c index dc2f7ce..ba0d3d7 100644 --- a/hw/xtensa_lx60.c +++ b/hw/xtensa_lx60.c @@ -32,7 +32,7 @@ #include "memory.h" #include "exec-memory.h" #include "serial.h" -#include "net.h" +#include "net/net.h" #include "sysbus.h" #include "flash.h" #include "blockdev.h" diff --git a/net/checksum.h b/include/net/checksum.h similarity index 100% rename from net/checksum.h rename to include/net/checksum.h diff --git a/net.h b/include/net/net.h similarity index 98% rename from net.h rename to include/net/net.h index 1d0816b..9ff9305 100644 --- a/net.h +++ b/include/net/net.h @@ -147,6 +147,9 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict); void netdev_add(QemuOpts *opts, Error **errp); int qmp_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret); +int net_hub_id_for_client(NetClientState *nc, int *id); +NetClientState *net_hub_port_find(int hub_id); + #define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" #define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown" #define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper" diff --git a/net/queue.h b/include/net/queue.h similarity index 100% rename from net/queue.h rename to include/net/queue.h diff --git a/net/slirp.h b/include/net/slirp.h similarity index 100% rename from net/slirp.h rename to include/net/slirp.h diff --git a/net/tap.h b/include/net/tap.h similarity index 69% copy from net/tap.h copy to include/net/tap.h index d44d83a..bb7efb5 100644 --- a/net/tap.h +++ b/include/net/tap.h @@ -29,13 +29,6 @@ #include "qemu-common.h" #include "qapi-types.h" -#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" -#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown" - -int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required); - -ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen); - int tap_has_ufo(NetClientState *nc); int tap_has_vnet_hdr(NetClientState *nc); int tap_has_vnet_hdr_len(NetClientState *nc, int len); @@ -43,16 +36,32 @@ void tap_using_vnet_hdr(NetClientState *nc, int using_vnet_hdr); void tap_set_offload(NetClientState *nc, int csum, int tso4, int tso6, int ecn, int ufo); void tap_set_vnet_hdr_len(NetClientState *nc, int len); -int tap_set_sndbuf(int fd, const NetdevTapOptions *tap); -int tap_probe_vnet_hdr(int fd); -int tap_probe_vnet_hdr_len(int fd, int len); -int tap_probe_has_ufo(int fd); -void tap_fd_set_offload(int fd, int csum, int tso4, int tso6, int ecn, int ufo); -void tap_fd_set_vnet_hdr_len(int fd, int len); - int tap_get_fd(NetClientState *nc); struct vhost_net; struct vhost_net *tap_get_vhost_net(NetClientState *nc); +struct virtio_net_hdr +{ +#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset +#define VIRTIO_NET_HDR_F_DATA_VALID 2 // Csum is valid + uint8_t flags; +#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame +#define VIRTIO_NET_HDR_GSO_TCPV4 1 // GSO frame, IPv4 TCP (TSO) +#define VIRTIO_NET_HDR_GSO_UDP 3 // GSO frame, IPv4 UDP (UFO) +#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP +#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set + uint8_t gso_type; + uint16_t hdr_len; + uint16_t gso_size; + uint16_t csum_start; + uint16_t csum_offset; +}; + +struct virtio_net_hdr_mrg_rxbuf +{ + struct virtio_net_hdr hdr; + uint16_t num_buffers; /* Number of merged rx buffers */ +}; + #endif /* QEMU_NET_TAP_H */ diff --git a/monitor.c b/monitor.c index 5129bb1..cd8870b 100644 --- a/monitor.c +++ b/monitor.c @@ -31,7 +31,7 @@ #include "hw/watchdog.h" #include "hw/loader.h" #include "gdbstub.h" -#include "net.h" +#include "net/net.h" #include "net/slirp.h" #include "qemu-char.h" #include "ui/qemu-spice.h" diff --git a/net/clients.h b/net/clients.h index c58cc60..7793294 100644 --- a/net/clients.h +++ b/net/clients.h @@ -24,7 +24,7 @@ #ifndef QEMU_NET_CLIENTS_H #define QEMU_NET_CLIENTS_H -#include "net.h" +#include "net/net.h" #include "qapi-types.h" int net_init_dump(const NetClientOptions *opts, const char *name, diff --git a/net/hub.c b/net/hub.c index be41301..8508ecf 100644 --- a/net/hub.c +++ b/net/hub.c @@ -13,7 +13,7 @@ */ #include "monitor.h" -#include "net.h" +#include "net/net.h" #include "clients.h" #include "hub.h" #include "iov.h" diff --git a/net/hub.h b/net/hub.h index 4cbfdb1..583ada8 100644 --- a/net/hub.h +++ b/net/hub.h @@ -20,8 +20,6 @@ NetClientState *net_hub_add_port(int hub_id, const char *name); NetClientState *net_hub_find_client_by_name(int hub_id, const char *name); void net_hub_info(Monitor *mon); -int net_hub_id_for_client(NetClientState *nc, int *id); void net_hub_check_clients(void); -NetClientState *net_hub_port_find(int hub_id); #endif /* NET_HUB_H */ diff --git a/net/net.c b/net/net.c index 317e258..8b8ba12 100644 --- a/net/net.c +++ b/net/net.c @@ -23,10 +23,10 @@ */ #include "config-host.h" -#include "net.h" +#include "net/net.h" #include "clients.h" #include "hub.h" -#include "slirp.h" +#include "net/slirp.h" #include "util.h" #include "monitor.h" diff --git a/net/queue.c b/net/queue.c index 254f280..542c549 100644 --- a/net/queue.c +++ b/net/queue.c @@ -23,7 +23,7 @@ #include "net/queue.h" #include "qemu-queue.h" -#include "net.h" +#include "net/net.h" /* The delivery handler may only return zero if it will call * qemu_net_queue_flush() when it determines that it is once again able diff --git a/net/slirp.c b/net/slirp.c index 422a3a4..27b6cc6 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -29,7 +29,7 @@ #include #include #endif -#include "net.h" +#include "net/net.h" #include "clients.h" #include "hub.h" #include "monitor.h" diff --git a/net/socket.c b/net/socket.c index c9019eb..f7bc51b 100644 --- a/net/socket.c +++ b/net/socket.c @@ -23,7 +23,7 @@ */ #include "config-host.h" -#include "net.h" +#include "net/net.h" #include "clients.h" #include "monitor.h" #include "qemu-common.h" diff --git a/net/tap-aix.c b/net/tap-aix.c index f27c177..aff6c52 100644 --- a/net/tap-aix.c +++ b/net/tap-aix.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "net/tap.h" +#include "tap_int.h" #include int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required) diff --git a/net/tap-bsd.c b/net/tap-bsd.c index a3b717d..a1c55ad 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "net/tap.h" +#include "tap_int.h" #include "qemu-common.h" #include "sysemu.h" #include "qemu-error.h" diff --git a/net/tap-haiku.c b/net/tap-haiku.c index 34739d1..08cc034 100644 --- a/net/tap-haiku.c +++ b/net/tap-haiku.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "net/tap.h" +#include "tap_int.h" #include int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required) diff --git a/net/tap-linux.c b/net/tap-linux.c index c6521be..377df2e 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -23,8 +23,9 @@ * THE SOFTWARE. */ +#include "tap_int.h" +#include "tap-linux.h" #include "net/tap.h" -#include "net/tap-linux.h" #include #include diff --git a/net/tap-linux.h b/net/tap-linux.h index 659e981..cb2a6d4 100644 --- a/net/tap-linux.h +++ b/net/tap-linux.h @@ -13,8 +13,8 @@ * GNU General Public License for more details. */ -#ifndef QEMU_TAP_H -#define QEMU_TAP_H +#ifndef QEMU_TAP_LINUX_H +#define QEMU_TAP_LINUX_H #include #ifdef __linux__ @@ -44,20 +44,4 @@ #define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ #define TUN_F_UFO 0x10 /* I can handle UFO packets */ -struct virtio_net_hdr -{ - uint8_t flags; - uint8_t gso_type; - uint16_t hdr_len; - uint16_t gso_size; - uint16_t csum_start; - uint16_t csum_offset; -}; - -struct virtio_net_hdr_mrg_rxbuf -{ - struct virtio_net_hdr hdr; - uint16_t num_buffers; /* Number of merged rx buffers */ -}; - #endif /* QEMU_TAP_H */ diff --git a/net/tap-solaris.c b/net/tap-solaris.c index 5d6ac42..f228fff 100644 --- a/net/tap-solaris.c +++ b/net/tap-solaris.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "net/tap.h" +#include "tap_int.h" #include "sysemu.h" #include diff --git a/net/tap-win32.c b/net/tap-win32.c index 22dad3f..b2a6e73 100644 --- a/net/tap-win32.c +++ b/net/tap-win32.c @@ -26,11 +26,11 @@ * distribution); if not, see . */ -#include "tap.h" +#include "tap_int.h" #include "qemu-common.h" #include "clients.h" /* net_init_tap */ -#include "net.h" +#include "net/net.h" #include "sysemu.h" #include "qemu-error.h" #include diff --git a/net/tap.c b/net/tap.c index 0230ae5..cb35db6 100644 --- a/net/tap.c +++ b/net/tap.c @@ -23,7 +23,7 @@ * THE SOFTWARE. */ -#include "tap.h" +#include "tap_int.h" #include "config-host.h" @@ -33,14 +33,14 @@ #include #include -#include "net.h" +#include "net/net.h" #include "clients.h" #include "monitor.h" #include "sysemu.h" #include "qemu-common.h" #include "qemu-error.h" -#include "net/tap-linux.h" +#include "net/tap.h" #include "hw/vhost_net.h" diff --git a/net/tap.h b/net/tap_int.h similarity index 77% rename from net/tap.h rename to net/tap_int.h index d44d83a..1dffe12 100644 --- a/net/tap.h +++ b/net/tap_int.h @@ -23,8 +23,8 @@ * THE SOFTWARE. */ -#ifndef QEMU_NET_TAP_H -#define QEMU_NET_TAP_H +#ifndef QEMU_TAP_H +#define QEMU_TAP_H #include "qemu-common.h" #include "qapi-types.h" @@ -36,13 +36,6 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen); -int tap_has_ufo(NetClientState *nc); -int tap_has_vnet_hdr(NetClientState *nc); -int tap_has_vnet_hdr_len(NetClientState *nc, int len); -void tap_using_vnet_hdr(NetClientState *nc, int using_vnet_hdr); -void tap_set_offload(NetClientState *nc, int csum, int tso4, int tso6, int ecn, int ufo); -void tap_set_vnet_hdr_len(NetClientState *nc, int len); - int tap_set_sndbuf(int fd, const NetdevTapOptions *tap); int tap_probe_vnet_hdr(int fd); int tap_probe_vnet_hdr_len(int fd, int len); @@ -50,9 +43,4 @@ int tap_probe_has_ufo(int fd); void tap_fd_set_offload(int fd, int csum, int tso4, int tso6, int ecn, int ufo); void tap_fd_set_vnet_hdr_len(int fd, int len); -int tap_get_fd(NetClientState *nc); - -struct vhost_net; -struct vhost_net *tap_get_vhost_net(NetClientState *nc); - -#endif /* QEMU_NET_TAP_H */ +#endif /* QEMU_TAP_H */ diff --git a/net/util.c b/net/util.c index 1e9afbc..7e95076 100644 --- a/net/util.c +++ b/net/util.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "net/util.h" +#include "util.h" #include #include diff --git a/net/vde.c b/net/vde.c index cc5a07d..52d4f19 100644 --- a/net/vde.c +++ b/net/vde.c @@ -25,7 +25,7 @@ #include -#include "net.h" +#include "net/net.h" #include "clients.h" #include "qemu-common.h" #include "qemu-option.h" diff --git a/savevm.c b/savevm.c index 7176424..5e69585 100644 --- a/savevm.c +++ b/savevm.c @@ -72,7 +72,7 @@ #include "qemu-common.h" #include "hw/hw.h" #include "hw/qdev.h" -#include "net.h" +#include "net/net.h" #include "monitor.h" #include "sysemu.h" #include "qemu-timer.h" diff --git a/vl.c b/vl.c index 5d73a55..88880f6 100644 --- a/vl.c +++ b/vl.c @@ -127,7 +127,7 @@ int main(int argc, char **argv) #include "hw/qdev.h" #include "hw/loader.h" #include "bt-host.h" -#include "net.h" +#include "net/net.h" #include "net/slirp.h" #include "monitor.h" #include "console.h"