get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/808762/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 808762,
    "url": "http://patchwork.ozlabs.org/api/patches/808762/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901153758.8628-23-armbru@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170901153758.8628-23-armbru@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-01T15:37:33",
    "name": "[PULL,v2,22/47] qapi-schema: Collect net device stuff in qapi/net.json",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7d5b32ea2df6a1a9e67295670bbdef3054b8e885",
    "submitter": {
        "id": 2645,
        "url": "http://patchwork.ozlabs.org/api/people/2645/?format=api",
        "name": "Markus Armbruster",
        "email": "armbru@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901153758.8628-23-armbru@redhat.com/mbox/",
    "series": [
        {
            "id": 1049,
            "url": "http://patchwork.ozlabs.org/api/series/1049/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1049",
            "date": "2017-09-01T15:37:14",
            "name": "[PULL,v2,01/47] qapi: Fix error handling code on alternate conflict",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/1049/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808762/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808762/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=armbru@redhat.com"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkP740XRxz9t3p\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 01:58:56 +1000 (AEST)",
            "from localhost ([::1]:46576 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnoLO-0001nI-3o\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 11:58:54 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:51810)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dno1X-0006pV-QZ\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:32 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dno1O-0001ml-Ut\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:23 -0400",
            "from mx1.redhat.com ([209.132.183.28]:51352)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <armbru@redhat.com>) id 1dno1O-0001lc-GT\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:14 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7B76CC057FA1\n\tfor <qemu-devel@nongnu.org>; Fri,  1 Sep 2017 15:38:13 +0000 (UTC)",
            "from blackfin.pond.sub.org (ovpn-116-75.ams2.redhat.com\n\t[10.36.116.75])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 111C878437;\n\tFri,  1 Sep 2017 15:38:09 +0000 (UTC)",
            "by blackfin.pond.sub.org (Postfix, from userid 1000)\n\tid 833ED113855F; Fri,  1 Sep 2017 17:37:58 +0200 (CEST)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 7B76CC057FA1",
        "From": "Markus Armbruster <armbru@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Fri,  1 Sep 2017 17:37:33 +0200",
        "Message-Id": "<20170901153758.8628-23-armbru@redhat.com>",
        "In-Reply-To": "<20170901153758.8628-1-armbru@redhat.com>",
        "References": "<20170901153758.8628-1-armbru@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tFri, 01 Sep 2017 15:38:13 +0000 (UTC)",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "209.132.183.28",
        "Subject": "[Qemu-devel] [PULL v2 22/47] qapi-schema: Collect net device stuff\n\tin qapi/net.json",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "Jason Wang <jasowang@redhat.com>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Cc: Jason Wang <jasowang@redhat.com>\nSigned-off-by: Markus Armbruster <armbru@redhat.com>\nMessage-Id: <1503602048-12268-8-git-send-email-armbru@redhat.com>\nReviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>\n---\n MAINTAINERS      |   1 +\n Makefile         |   1 +\n qapi-schema.json | 675 +---------------------------------------------------\n qapi/event.json  |  24 --\n qapi/net.json    | 706 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 5 files changed, 709 insertions(+), 698 deletions(-)\n create mode 100644 qapi/net.json",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 6a808d33ba..aecde6585e 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1356,6 +1356,7 @@ S: Maintained\n F: net/\n F: include/net/\n T: git git://github.com/jasowang/qemu.git net\n+F: qapi/net.json\n \n Netmap network backend\n M: Luigi Rizzo <rizzo@iet.unipi.it>\ndiff --git a/Makefile b/Makefile\nindex 59ef46cc3e..75f3ffedd7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -413,6 +413,7 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \\\n                $(SRC_PATH)/qapi/char.json \\\n                $(SRC_PATH)/qapi/crypto.json \\\n                $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \\\n+               $(SRC_PATH)/qapi/net.json \\\n                $(SRC_PATH)/qapi/rocker.json \\\n                $(SRC_PATH)/qapi/run-state.json \\\n                $(SRC_PATH)/qapi/sockets.json \\\ndiff --git a/qapi-schema.json b/qapi-schema.json\nindex 4f30d21340..e9b61ebf12 100644\n--- a/qapi-schema.json\n+++ b/qapi-schema.json\n@@ -84,6 +84,7 @@\n { 'include': 'qapi/crypto.json' }\n { 'include': 'qapi/block.json' }\n { 'include': 'qapi/char.json' }\n+{ 'include': 'qapi/net.json' }\n { 'include': 'qapi/rocker.json' }\n { 'include': 'qapi/event.json' }\n { 'include': 'qapi/trace.json' }\n@@ -2276,33 +2277,6 @@\n { 'command': 'inject-nmi' }\n \n ##\n-# @set_link:\n-#\n-# Sets the link status of a virtual network adapter.\n-#\n-# @name: the device name of the virtual network adapter\n-#\n-# @up: true to set the link status to be up\n-#\n-# Returns: Nothing on success\n-#          If @name is not a valid network device, DeviceNotFound\n-#\n-# Since: 0.14.0\n-#\n-# Notes: Not all network adapters support setting link status.  This command\n-#        will succeed even if the network adapter does not support link status\n-#        notification.\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"set_link\",\n-#      \"arguments\": { \"name\": \"e1000.0\", \"up\": false } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }\n-\n-##\n # @balloon:\n #\n # Request the balloon driver to change its balloon size.\n@@ -3272,60 +3246,6 @@\n   'data': { 'filename': 'str' } }\n \n ##\n-# @netdev_add:\n-#\n-# Add a network backend.\n-#\n-# @type: the type of network backend.  Current valid values are 'user', 'tap',\n-#        'vde', 'socket', 'dump' and 'bridge'\n-#\n-# @id: the name of the new network backend\n-#\n-# Additional arguments depend on the type.\n-#\n-# TODO: This command effectively bypasses QAPI completely due to its\n-# \"additional arguments\" business.  It shouldn't have been added to\n-# the schema in this form.  It should be qapified properly, or\n-# replaced by a properly qapified command.\n-#\n-# Since: 0.14.0\n-#\n-# Returns: Nothing on success\n-#          If @type is not a valid network backend, DeviceNotFound\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"netdev_add\",\n-#      \"arguments\": { \"type\": \"user\", \"id\": \"netdev1\",\n-#                     \"dnssearch\": \"example.org\" } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'netdev_add',\n-  'data': {'type': 'str', 'id': 'str'},\n-  'gen': false }                # so we can get the additional arguments\n-\n-##\n-# @netdev_del:\n-#\n-# Remove a network backend.\n-#\n-# @id: the name of the network backend to remove\n-#\n-# Returns: Nothing on success\n-#          If @id is not a valid network backend, DeviceNotFound\n-#\n-# Since: 0.14.0\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"netdev_del\", \"arguments\": { \"id\": \"netdev1\" } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'netdev_del', 'data': {'id': 'str'} }\n-\n-##\n # @object-add:\n #\n # Create a QOM object.\n@@ -3373,491 +3293,6 @@\n { 'command': 'object-del', 'data': {'id': 'str'} }\n \n ##\n-# @NetdevNoneOptions:\n-#\n-# Use it alone to have zero network devices.\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevNoneOptions',\n-  'data': { } }\n-\n-##\n-# @NetLegacyNicOptions:\n-#\n-# Create a new Network Interface Card.\n-#\n-# @netdev: id of -netdev to connect to\n-#\n-# @macaddr: MAC address\n-#\n-# @model: device model (e1000, rtl8139, virtio etc.)\n-#\n-# @addr: PCI device address\n-#\n-# @vectors: number of MSI-x vectors, 0 to disable MSI-X\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetLegacyNicOptions',\n-  'data': {\n-    '*netdev':  'str',\n-    '*macaddr': 'str',\n-    '*model':   'str',\n-    '*addr':    'str',\n-    '*vectors': 'uint32' } }\n-\n-##\n-# @NetdevUserOptions:\n-#\n-# Use the user mode network stack which requires no administrator privilege to\n-# run.\n-#\n-# @hostname: client hostname reported by the builtin DHCP server\n-#\n-# @restrict: isolate the guest from the host\n-#\n-# @ipv4: whether to support IPv4, default true for enabled\n-#        (since 2.6)\n-#\n-# @ipv6: whether to support IPv6, default true for enabled\n-#        (since 2.6)\n-#\n-# @ip: legacy parameter, use net= instead\n-#\n-# @net: IP network address that the guest will see, in the\n-#       form addr[/netmask] The netmask is optional, and can be\n-#       either in the form a.b.c.d or as a number of valid top-most\n-#       bits. Default is 10.0.2.0/24.\n-#\n-# @host: guest-visible address of the host\n-#\n-# @tftp: root directory of the built-in TFTP server\n-#\n-# @bootfile: BOOTP filename, for use with tftp=\n-#\n-# @dhcpstart: the first of the 16 IPs the built-in DHCP server can\n-#             assign\n-#\n-# @dns: guest-visible address of the virtual nameserver\n-#\n-# @dnssearch: list of DNS suffixes to search, passed as DHCP option\n-#             to the guest\n-#\n-# @ipv6-prefix: IPv6 network prefix (default is fec0::) (since\n-#               2.6). The network prefix is given in the usual\n-#               hexadecimal IPv6 address notation.\n-#\n-# @ipv6-prefixlen: IPv6 network prefix length (default is 64)\n-#                  (since 2.6)\n-#\n-# @ipv6-host: guest-visible IPv6 address of the host (since 2.6)\n-#\n-# @ipv6-dns: guest-visible IPv6 address of the virtual\n-#            nameserver (since 2.6)\n-#\n-# @smb: root directory of the built-in SMB server\n-#\n-# @smbserver: IP address of the built-in SMB server\n-#\n-# @hostfwd: redirect incoming TCP or UDP host connections to guest\n-#           endpoints\n-#\n-# @guestfwd: forward guest TCP connections\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevUserOptions',\n-  'data': {\n-    '*hostname':  'str',\n-    '*restrict':  'bool',\n-    '*ipv4':      'bool',\n-    '*ipv6':      'bool',\n-    '*ip':        'str',\n-    '*net':       'str',\n-    '*host':      'str',\n-    '*tftp':      'str',\n-    '*bootfile':  'str',\n-    '*dhcpstart': 'str',\n-    '*dns':       'str',\n-    '*dnssearch': ['String'],\n-    '*ipv6-prefix':      'str',\n-    '*ipv6-prefixlen':   'int',\n-    '*ipv6-host':        'str',\n-    '*ipv6-dns':         'str',\n-    '*smb':       'str',\n-    '*smbserver': 'str',\n-    '*hostfwd':   ['String'],\n-    '*guestfwd':  ['String'] } }\n-\n-##\n-# @NetdevTapOptions:\n-#\n-# Connect the host TAP network interface name to the VLAN.\n-#\n-# @ifname: interface name\n-#\n-# @fd: file descriptor of an already opened tap\n-#\n-# @fds: multiple file descriptors of already opened multiqueue capable\n-# tap\n-#\n-# @script: script to initialize the interface\n-#\n-# @downscript: script to shut down the interface\n-#\n-# @br: bridge name (since 2.8)\n-#\n-# @helper: command to execute to configure bridge\n-#\n-# @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.\n-#\n-# @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface\n-#\n-# @vhost: enable vhost-net network accelerator\n-#\n-# @vhostfd: file descriptor of an already opened vhost net device\n-#\n-# @vhostfds: file descriptors of multiple already opened vhost net\n-# devices\n-#\n-# @vhostforce: vhost on for non-MSIX virtio guests\n-#\n-# @queues: number of queues to be created for multiqueue capable tap\n-#\n-# @poll-us: maximum number of microseconds that could\n-# be spent on busy polling for tap (since 2.7)\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevTapOptions',\n-  'data': {\n-    '*ifname':     'str',\n-    '*fd':         'str',\n-    '*fds':        'str',\n-    '*script':     'str',\n-    '*downscript': 'str',\n-    '*br':         'str',\n-    '*helper':     'str',\n-    '*sndbuf':     'size',\n-    '*vnet_hdr':   'bool',\n-    '*vhost':      'bool',\n-    '*vhostfd':    'str',\n-    '*vhostfds':   'str',\n-    '*vhostforce': 'bool',\n-    '*queues':     'uint32',\n-    '*poll-us':    'uint32'} }\n-\n-##\n-# @NetdevSocketOptions:\n-#\n-# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP\n-# socket connection.\n-#\n-# @fd: file descriptor of an already opened socket\n-#\n-# @listen: port number, and optional hostname, to listen on\n-#\n-# @connect: port number, and optional hostname, to connect to\n-#\n-# @mcast: UDP multicast address and port number\n-#\n-# @localaddr: source address and port for multicast and udp packets\n-#\n-# @udp: UDP unicast address and port number\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevSocketOptions',\n-  'data': {\n-    '*fd':        'str',\n-    '*listen':    'str',\n-    '*connect':   'str',\n-    '*mcast':     'str',\n-    '*localaddr': 'str',\n-    '*udp':       'str' } }\n-\n-##\n-# @NetdevL2TPv3Options:\n-#\n-# Connect the VLAN to Ethernet over L2TPv3 Static tunnel\n-#\n-# @src: source address\n-#\n-# @dst: destination address\n-#\n-# @srcport: source port - mandatory for udp, optional for ip\n-#\n-# @dstport: destination port - mandatory for udp, optional for ip\n-#\n-# @ipv6: force the use of ipv6\n-#\n-# @udp: use the udp version of l2tpv3 encapsulation\n-#\n-# @cookie64: use 64 bit coookies\n-#\n-# @counter: have sequence counter\n-#\n-# @pincounter: pin sequence counter to zero -\n-#              workaround for buggy implementations or\n-#              networks with packet reorder\n-#\n-# @txcookie: 32 or 64 bit transmit cookie\n-#\n-# @rxcookie: 32 or 64 bit receive cookie\n-#\n-# @txsession: 32 bit transmit session\n-#\n-# @rxsession: 32 bit receive session - if not specified\n-#             set to the same value as transmit\n-#\n-# @offset: additional offset - allows the insertion of\n-#          additional application-specific data before the packet payload\n-#\n-# Since: 2.1\n-##\n-{ 'struct': 'NetdevL2TPv3Options',\n-  'data': {\n-    'src':          'str',\n-    'dst':          'str',\n-    '*srcport':     'str',\n-    '*dstport':     'str',\n-    '*ipv6':        'bool',\n-    '*udp':         'bool',\n-    '*cookie64':    'bool',\n-    '*counter':     'bool',\n-    '*pincounter':  'bool',\n-    '*txcookie':    'uint64',\n-    '*rxcookie':    'uint64',\n-    'txsession':    'uint32',\n-    '*rxsession':   'uint32',\n-    '*offset':      'uint32' } }\n-\n-##\n-# @NetdevVdeOptions:\n-#\n-# Connect the VLAN to a vde switch running on the host.\n-#\n-# @sock: socket path\n-#\n-# @port: port number\n-#\n-# @group: group owner of socket\n-#\n-# @mode: permissions for socket\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevVdeOptions',\n-  'data': {\n-    '*sock':  'str',\n-    '*port':  'uint16',\n-    '*group': 'str',\n-    '*mode':  'uint16' } }\n-\n-##\n-# @NetdevDumpOptions:\n-#\n-# Dump VLAN network traffic to a file.\n-#\n-# @len: per-packet size limit (64k default). Understands [TGMKkb]\n-# suffixes.\n-#\n-# @file: dump file path (default is qemu-vlan0.pcap)\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevDumpOptions',\n-  'data': {\n-    '*len':  'size',\n-    '*file': 'str' } }\n-\n-##\n-# @NetdevBridgeOptions:\n-#\n-# Connect a host TAP network interface to a host bridge device.\n-#\n-# @br: bridge name\n-#\n-# @helper: command to execute to configure bridge\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevBridgeOptions',\n-  'data': {\n-    '*br':     'str',\n-    '*helper': 'str' } }\n-\n-##\n-# @NetdevHubPortOptions:\n-#\n-# Connect two or more net clients through a software hub.\n-#\n-# @hubid: hub identifier number\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetdevHubPortOptions',\n-  'data': {\n-    'hubid':     'int32' } }\n-\n-##\n-# @NetdevNetmapOptions:\n-#\n-# Connect a client to a netmap-enabled NIC or to a VALE switch port\n-#\n-# @ifname: Either the name of an existing network interface supported by\n-#          netmap, or the name of a VALE port (created on the fly).\n-#          A VALE port name is in the form 'valeXXX:YYY', where XXX and\n-#          YYY are non-negative integers. XXX identifies a switch and\n-#          YYY identifies a port of the switch. VALE ports having the\n-#          same XXX are therefore connected to the same switch.\n-#\n-# @devname: path of the netmap device (default: '/dev/netmap').\n-#\n-# Since: 2.0\n-##\n-{ 'struct': 'NetdevNetmapOptions',\n-  'data': {\n-    'ifname':     'str',\n-    '*devname':    'str' } }\n-\n-##\n-# @NetdevVhostUserOptions:\n-#\n-# Vhost-user network backend\n-#\n-# @chardev: name of a unix socket chardev\n-#\n-# @vhostforce: vhost on for non-MSIX virtio guests (default: false).\n-#\n-# @queues: number of queues to be created for multiqueue vhost-user\n-#          (default: 1) (Since 2.5)\n-#\n-# Since: 2.1\n-##\n-{ 'struct': 'NetdevVhostUserOptions',\n-  'data': {\n-    'chardev':        'str',\n-    '*vhostforce':    'bool',\n-    '*queues':        'int' } }\n-\n-##\n-# @NetClientDriver:\n-#\n-# Available netdev drivers.\n-#\n-# Since: 2.7\n-##\n-{ 'enum': 'NetClientDriver',\n-  'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',\n-            'bridge', 'hubport', 'netmap', 'vhost-user' ] }\n-\n-##\n-# @Netdev:\n-#\n-# Captures the configuration of a network device.\n-#\n-# @id: identifier for monitor commands.\n-#\n-# @type: Specify the driver used for interpreting remaining arguments.\n-#\n-# Since: 1.2\n-#\n-# 'l2tpv3' - since 2.1\n-##\n-{ 'union': 'Netdev',\n-  'base': { 'id': 'str', 'type': 'NetClientDriver' },\n-  'discriminator': 'type',\n-  'data': {\n-    'none':     'NetdevNoneOptions',\n-    'nic':      'NetLegacyNicOptions',\n-    'user':     'NetdevUserOptions',\n-    'tap':      'NetdevTapOptions',\n-    'l2tpv3':   'NetdevL2TPv3Options',\n-    'socket':   'NetdevSocketOptions',\n-    'vde':      'NetdevVdeOptions',\n-    'dump':     'NetdevDumpOptions',\n-    'bridge':   'NetdevBridgeOptions',\n-    'hubport':  'NetdevHubPortOptions',\n-    'netmap':   'NetdevNetmapOptions',\n-    'vhost-user': 'NetdevVhostUserOptions' } }\n-\n-##\n-# @NetLegacy:\n-#\n-# Captures the configuration of a network device; legacy.\n-#\n-# @vlan: vlan number\n-#\n-# @id: identifier for monitor commands\n-#\n-# @name: identifier for monitor commands, ignored if @id is present\n-#\n-# @opts: device type specific properties (legacy)\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'NetLegacy',\n-  'data': {\n-    '*vlan': 'int32',\n-    '*id':   'str',\n-    '*name': 'str',\n-    'opts':  'NetLegacyOptions' } }\n-\n-##\n-# @NetLegacyOptionsType:\n-#\n-# Since: 1.2\n-##\n-{ 'enum': 'NetLegacyOptionsType',\n-  'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',\n-           'dump', 'bridge', 'netmap', 'vhost-user'] }\n-\n-##\n-# @NetLegacyOptions:\n-#\n-# Like Netdev, but for use only by the legacy command line options\n-#\n-# Since: 1.2\n-##\n-{ 'union': 'NetLegacyOptions',\n-  'base': { 'type': 'NetLegacyOptionsType' },\n-  'discriminator': 'type',\n-  'data': {\n-    'none':     'NetdevNoneOptions',\n-    'nic':      'NetLegacyNicOptions',\n-    'user':     'NetdevUserOptions',\n-    'tap':      'NetdevTapOptions',\n-    'l2tpv3':   'NetdevL2TPv3Options',\n-    'socket':   'NetdevSocketOptions',\n-    'vde':      'NetdevVdeOptions',\n-    'dump':     'NetdevDumpOptions',\n-    'bridge':   'NetdevBridgeOptions',\n-    'netmap':   'NetdevNetmapOptions',\n-    'vhost-user': 'NetdevVhostUserOptions' } }\n-\n-##\n-# @NetFilterDirection:\n-#\n-# Indicates whether a netfilter is attached to a netdev's transmit queue or\n-# receive queue or both.\n-#\n-# @all: the filter is attached both to the receive and the transmit\n-#       queue of the netdev (default).\n-#\n-# @rx: the filter is attached to the receive queue of the netdev,\n-#      where it will receive packets sent to the netdev.\n-#\n-# @tx: the filter is attached to the transmit queue of the netdev,\n-#      where it will receive packets sent by the netdev.\n-#\n-# Since: 2.5\n-##\n-{ 'enum': 'NetFilterDirection',\n-  'data': [ 'all', 'rx', 'tx' ] }\n-\n-##\n # @getfd:\n #\n # Receive a file descriptor via SCM rights and assign it a name\n@@ -4854,114 +4289,6 @@\n \n \n ##\n-# @RxState:\n-#\n-# Packets receiving state\n-#\n-# @normal: filter assigned packets according to the mac-table\n-#\n-# @none: don't receive any assigned packet\n-#\n-# @all: receive all assigned packets\n-#\n-# Since: 1.6\n-##\n-{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }\n-\n-##\n-# @RxFilterInfo:\n-#\n-# Rx-filter information for a NIC.\n-#\n-# @name: net client name\n-#\n-# @promiscuous: whether promiscuous mode is enabled\n-#\n-# @multicast: multicast receive state\n-#\n-# @unicast: unicast receive state\n-#\n-# @vlan: vlan receive state (Since 2.0)\n-#\n-# @broadcast-allowed: whether to receive broadcast\n-#\n-# @multicast-overflow: multicast table is overflowed or not\n-#\n-# @unicast-overflow: unicast table is overflowed or not\n-#\n-# @main-mac: the main macaddr string\n-#\n-# @vlan-table: a list of active vlan id\n-#\n-# @unicast-table: a list of unicast macaddr string\n-#\n-# @multicast-table: a list of multicast macaddr string\n-#\n-# Since: 1.6\n-##\n-{ 'struct': 'RxFilterInfo',\n-  'data': {\n-    'name':               'str',\n-    'promiscuous':        'bool',\n-    'multicast':          'RxState',\n-    'unicast':            'RxState',\n-    'vlan':               'RxState',\n-    'broadcast-allowed':  'bool',\n-    'multicast-overflow': 'bool',\n-    'unicast-overflow':   'bool',\n-    'main-mac':           'str',\n-    'vlan-table':         ['int'],\n-    'unicast-table':      ['str'],\n-    'multicast-table':    ['str'] }}\n-\n-##\n-# @query-rx-filter:\n-#\n-# Return rx-filter information for all NICs (or for the given NIC).\n-#\n-# @name: net client name\n-#\n-# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).\n-#          Returns an error if the given @name doesn't exist, or given\n-#          NIC doesn't support rx-filter querying, or given net client\n-#          isn't a NIC.\n-#\n-# Since: 1.6\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"query-rx-filter\", \"arguments\": { \"name\": \"vnet0\" } }\n-# <- { \"return\": [\n-#         {\n-#             \"promiscuous\": true,\n-#             \"name\": \"vnet0\",\n-#             \"main-mac\": \"52:54:00:12:34:56\",\n-#             \"unicast\": \"normal\",\n-#             \"vlan\": \"normal\",\n-#             \"vlan-table\": [\n-#                 4,\n-#                 0\n-#             ],\n-#             \"unicast-table\": [\n-#             ],\n-#             \"multicast\": \"normal\",\n-#             \"multicast-overflow\": false,\n-#             \"unicast-overflow\": false,\n-#             \"multicast-table\": [\n-#                 \"01:00:5e:00:00:01\",\n-#                 \"33:33:00:00:00:01\",\n-#                 \"33:33:ff:12:34:56\"\n-#             ],\n-#             \"broadcast-allowed\": false\n-#         }\n-#       ]\n-#    }\n-#\n-##\n-{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },\n-  'returns': ['RxFilterInfo'] }\n-\n-##\n # @InputButton:\n #\n # Button of a pointer input device (mouse, tablet).\ndiff --git a/qapi/event.json b/qapi/event.json\nindex b9aa6ed7cf..4b327739d7 100644\n--- a/qapi/event.json\n+++ b/qapi/event.json\n@@ -51,30 +51,6 @@\n   'data': { '*device': 'str', 'path': 'str' } }\n \n ##\n-# @NIC_RX_FILTER_CHANGED:\n-#\n-# Emitted once until the 'query-rx-filter' command is executed, the first event\n-# will always be emitted\n-#\n-# @name: net client name\n-#\n-# @path: device path\n-#\n-# Since: 1.6\n-#\n-# Example:\n-#\n-# <- { \"event\": \"NIC_RX_FILTER_CHANGED\",\n-#      \"data\": { \"name\": \"vnet0\",\n-#                \"path\": \"/machine/peripheral/vnet0/virtio-backend\" },\n-#      \"timestamp\": { \"seconds\": 1368697518, \"microseconds\": 326866 } }\n-#    }\n-#\n-##\n-{ 'event': 'NIC_RX_FILTER_CHANGED',\n-  'data': { '*name': 'str', 'path': 'str' } }\n-\n-##\n # @VNC_CONNECTED:\n #\n # Emitted when a VNC client establishes a connection\ndiff --git a/qapi/net.json b/qapi/net.json\nnew file mode 100644\nindex 0000000000..4beff5d582\n--- /dev/null\n+++ b/qapi/net.json\n@@ -0,0 +1,706 @@\n+# -*- Mode: Python -*-\n+#\n+\n+##\n+# = Net devices\n+##\n+\n+{ 'include': 'common.json' }\n+\n+##\n+# @set_link:\n+#\n+# Sets the link status of a virtual network adapter.\n+#\n+# @name: the device name of the virtual network adapter\n+#\n+# @up: true to set the link status to be up\n+#\n+# Returns: Nothing on success\n+#          If @name is not a valid network device, DeviceNotFound\n+#\n+# Since: 0.14.0\n+#\n+# Notes: Not all network adapters support setting link status.  This command\n+#        will succeed even if the network adapter does not support link status\n+#        notification.\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"set_link\",\n+#      \"arguments\": { \"name\": \"e1000.0\", \"up\": false } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }\n+\n+##\n+# @netdev_add:\n+#\n+# Add a network backend.\n+#\n+# @type: the type of network backend.  Current valid values are 'user', 'tap',\n+#        'vde', 'socket', 'dump' and 'bridge'\n+#\n+# @id: the name of the new network backend\n+#\n+# Additional arguments depend on the type.\n+#\n+# TODO: This command effectively bypasses QAPI completely due to its\n+# \"additional arguments\" business.  It shouldn't have been added to\n+# the schema in this form.  It should be qapified properly, or\n+# replaced by a properly qapified command.\n+#\n+# Since: 0.14.0\n+#\n+# Returns: Nothing on success\n+#          If @type is not a valid network backend, DeviceNotFound\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"netdev_add\",\n+#      \"arguments\": { \"type\": \"user\", \"id\": \"netdev1\",\n+#                     \"dnssearch\": \"example.org\" } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'netdev_add',\n+  'data': {'type': 'str', 'id': 'str'},\n+  'gen': false }                # so we can get the additional arguments\n+\n+##\n+# @netdev_del:\n+#\n+# Remove a network backend.\n+#\n+# @id: the name of the network backend to remove\n+#\n+# Returns: Nothing on success\n+#          If @id is not a valid network backend, DeviceNotFound\n+#\n+# Since: 0.14.0\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"netdev_del\", \"arguments\": { \"id\": \"netdev1\" } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'netdev_del', 'data': {'id': 'str'} }\n+\n+##\n+# @NetdevNoneOptions:\n+#\n+# Use it alone to have zero network devices.\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevNoneOptions',\n+  'data': { } }\n+\n+##\n+# @NetLegacyNicOptions:\n+#\n+# Create a new Network Interface Card.\n+#\n+# @netdev: id of -netdev to connect to\n+#\n+# @macaddr: MAC address\n+#\n+# @model: device model (e1000, rtl8139, virtio etc.)\n+#\n+# @addr: PCI device address\n+#\n+# @vectors: number of MSI-x vectors, 0 to disable MSI-X\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetLegacyNicOptions',\n+  'data': {\n+    '*netdev':  'str',\n+    '*macaddr': 'str',\n+    '*model':   'str',\n+    '*addr':    'str',\n+    '*vectors': 'uint32' } }\n+\n+##\n+# @NetdevUserOptions:\n+#\n+# Use the user mode network stack which requires no administrator privilege to\n+# run.\n+#\n+# @hostname: client hostname reported by the builtin DHCP server\n+#\n+# @restrict: isolate the guest from the host\n+#\n+# @ipv4: whether to support IPv4, default true for enabled\n+#        (since 2.6)\n+#\n+# @ipv6: whether to support IPv6, default true for enabled\n+#        (since 2.6)\n+#\n+# @ip: legacy parameter, use net= instead\n+#\n+# @net: IP network address that the guest will see, in the\n+#       form addr[/netmask] The netmask is optional, and can be\n+#       either in the form a.b.c.d or as a number of valid top-most\n+#       bits. Default is 10.0.2.0/24.\n+#\n+# @host: guest-visible address of the host\n+#\n+# @tftp: root directory of the built-in TFTP server\n+#\n+# @bootfile: BOOTP filename, for use with tftp=\n+#\n+# @dhcpstart: the first of the 16 IPs the built-in DHCP server can\n+#             assign\n+#\n+# @dns: guest-visible address of the virtual nameserver\n+#\n+# @dnssearch: list of DNS suffixes to search, passed as DHCP option\n+#             to the guest\n+#\n+# @ipv6-prefix: IPv6 network prefix (default is fec0::) (since\n+#               2.6). The network prefix is given in the usual\n+#               hexadecimal IPv6 address notation.\n+#\n+# @ipv6-prefixlen: IPv6 network prefix length (default is 64)\n+#                  (since 2.6)\n+#\n+# @ipv6-host: guest-visible IPv6 address of the host (since 2.6)\n+#\n+# @ipv6-dns: guest-visible IPv6 address of the virtual\n+#            nameserver (since 2.6)\n+#\n+# @smb: root directory of the built-in SMB server\n+#\n+# @smbserver: IP address of the built-in SMB server\n+#\n+# @hostfwd: redirect incoming TCP or UDP host connections to guest\n+#           endpoints\n+#\n+# @guestfwd: forward guest TCP connections\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevUserOptions',\n+  'data': {\n+    '*hostname':  'str',\n+    '*restrict':  'bool',\n+    '*ipv4':      'bool',\n+    '*ipv6':      'bool',\n+    '*ip':        'str',\n+    '*net':       'str',\n+    '*host':      'str',\n+    '*tftp':      'str',\n+    '*bootfile':  'str',\n+    '*dhcpstart': 'str',\n+    '*dns':       'str',\n+    '*dnssearch': ['String'],\n+    '*ipv6-prefix':      'str',\n+    '*ipv6-prefixlen':   'int',\n+    '*ipv6-host':        'str',\n+    '*ipv6-dns':         'str',\n+    '*smb':       'str',\n+    '*smbserver': 'str',\n+    '*hostfwd':   ['String'],\n+    '*guestfwd':  ['String'] } }\n+\n+##\n+# @NetdevTapOptions:\n+#\n+# Connect the host TAP network interface name to the VLAN.\n+#\n+# @ifname: interface name\n+#\n+# @fd: file descriptor of an already opened tap\n+#\n+# @fds: multiple file descriptors of already opened multiqueue capable\n+# tap\n+#\n+# @script: script to initialize the interface\n+#\n+# @downscript: script to shut down the interface\n+#\n+# @br: bridge name (since 2.8)\n+#\n+# @helper: command to execute to configure bridge\n+#\n+# @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.\n+#\n+# @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface\n+#\n+# @vhost: enable vhost-net network accelerator\n+#\n+# @vhostfd: file descriptor of an already opened vhost net device\n+#\n+# @vhostfds: file descriptors of multiple already opened vhost net\n+# devices\n+#\n+# @vhostforce: vhost on for non-MSIX virtio guests\n+#\n+# @queues: number of queues to be created for multiqueue capable tap\n+#\n+# @poll-us: maximum number of microseconds that could\n+# be spent on busy polling for tap (since 2.7)\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevTapOptions',\n+  'data': {\n+    '*ifname':     'str',\n+    '*fd':         'str',\n+    '*fds':        'str',\n+    '*script':     'str',\n+    '*downscript': 'str',\n+    '*br':         'str',\n+    '*helper':     'str',\n+    '*sndbuf':     'size',\n+    '*vnet_hdr':   'bool',\n+    '*vhost':      'bool',\n+    '*vhostfd':    'str',\n+    '*vhostfds':   'str',\n+    '*vhostforce': 'bool',\n+    '*queues':     'uint32',\n+    '*poll-us':    'uint32'} }\n+\n+##\n+# @NetdevSocketOptions:\n+#\n+# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP\n+# socket connection.\n+#\n+# @fd: file descriptor of an already opened socket\n+#\n+# @listen: port number, and optional hostname, to listen on\n+#\n+# @connect: port number, and optional hostname, to connect to\n+#\n+# @mcast: UDP multicast address and port number\n+#\n+# @localaddr: source address and port for multicast and udp packets\n+#\n+# @udp: UDP unicast address and port number\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevSocketOptions',\n+  'data': {\n+    '*fd':        'str',\n+    '*listen':    'str',\n+    '*connect':   'str',\n+    '*mcast':     'str',\n+    '*localaddr': 'str',\n+    '*udp':       'str' } }\n+\n+##\n+# @NetdevL2TPv3Options:\n+#\n+# Connect the VLAN to Ethernet over L2TPv3 Static tunnel\n+#\n+# @src: source address\n+#\n+# @dst: destination address\n+#\n+# @srcport: source port - mandatory for udp, optional for ip\n+#\n+# @dstport: destination port - mandatory for udp, optional for ip\n+#\n+# @ipv6: force the use of ipv6\n+#\n+# @udp: use the udp version of l2tpv3 encapsulation\n+#\n+# @cookie64: use 64 bit coookies\n+#\n+# @counter: have sequence counter\n+#\n+# @pincounter: pin sequence counter to zero -\n+#              workaround for buggy implementations or\n+#              networks with packet reorder\n+#\n+# @txcookie: 32 or 64 bit transmit cookie\n+#\n+# @rxcookie: 32 or 64 bit receive cookie\n+#\n+# @txsession: 32 bit transmit session\n+#\n+# @rxsession: 32 bit receive session - if not specified\n+#             set to the same value as transmit\n+#\n+# @offset: additional offset - allows the insertion of\n+#          additional application-specific data before the packet payload\n+#\n+# Since: 2.1\n+##\n+{ 'struct': 'NetdevL2TPv3Options',\n+  'data': {\n+    'src':          'str',\n+    'dst':          'str',\n+    '*srcport':     'str',\n+    '*dstport':     'str',\n+    '*ipv6':        'bool',\n+    '*udp':         'bool',\n+    '*cookie64':    'bool',\n+    '*counter':     'bool',\n+    '*pincounter':  'bool',\n+    '*txcookie':    'uint64',\n+    '*rxcookie':    'uint64',\n+    'txsession':    'uint32',\n+    '*rxsession':   'uint32',\n+    '*offset':      'uint32' } }\n+\n+##\n+# @NetdevVdeOptions:\n+#\n+# Connect the VLAN to a vde switch running on the host.\n+#\n+# @sock: socket path\n+#\n+# @port: port number\n+#\n+# @group: group owner of socket\n+#\n+# @mode: permissions for socket\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevVdeOptions',\n+  'data': {\n+    '*sock':  'str',\n+    '*port':  'uint16',\n+    '*group': 'str',\n+    '*mode':  'uint16' } }\n+\n+##\n+# @NetdevDumpOptions:\n+#\n+# Dump VLAN network traffic to a file.\n+#\n+# @len: per-packet size limit (64k default). Understands [TGMKkb]\n+# suffixes.\n+#\n+# @file: dump file path (default is qemu-vlan0.pcap)\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevDumpOptions',\n+  'data': {\n+    '*len':  'size',\n+    '*file': 'str' } }\n+\n+##\n+# @NetdevBridgeOptions:\n+#\n+# Connect a host TAP network interface to a host bridge device.\n+#\n+# @br: bridge name\n+#\n+# @helper: command to execute to configure bridge\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevBridgeOptions',\n+  'data': {\n+    '*br':     'str',\n+    '*helper': 'str' } }\n+\n+##\n+# @NetdevHubPortOptions:\n+#\n+# Connect two or more net clients through a software hub.\n+#\n+# @hubid: hub identifier number\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetdevHubPortOptions',\n+  'data': {\n+    'hubid':     'int32' } }\n+\n+##\n+# @NetdevNetmapOptions:\n+#\n+# Connect a client to a netmap-enabled NIC or to a VALE switch port\n+#\n+# @ifname: Either the name of an existing network interface supported by\n+#          netmap, or the name of a VALE port (created on the fly).\n+#          A VALE port name is in the form 'valeXXX:YYY', where XXX and\n+#          YYY are non-negative integers. XXX identifies a switch and\n+#          YYY identifies a port of the switch. VALE ports having the\n+#          same XXX are therefore connected to the same switch.\n+#\n+# @devname: path of the netmap device (default: '/dev/netmap').\n+#\n+# Since: 2.0\n+##\n+{ 'struct': 'NetdevNetmapOptions',\n+  'data': {\n+    'ifname':     'str',\n+    '*devname':    'str' } }\n+\n+##\n+# @NetdevVhostUserOptions:\n+#\n+# Vhost-user network backend\n+#\n+# @chardev: name of a unix socket chardev\n+#\n+# @vhostforce: vhost on for non-MSIX virtio guests (default: false).\n+#\n+# @queues: number of queues to be created for multiqueue vhost-user\n+#          (default: 1) (Since 2.5)\n+#\n+# Since: 2.1\n+##\n+{ 'struct': 'NetdevVhostUserOptions',\n+  'data': {\n+    'chardev':        'str',\n+    '*vhostforce':    'bool',\n+    '*queues':        'int' } }\n+\n+##\n+# @NetClientDriver:\n+#\n+# Available netdev drivers.\n+#\n+# Since: 2.7\n+##\n+{ 'enum': 'NetClientDriver',\n+  'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',\n+            'bridge', 'hubport', 'netmap', 'vhost-user' ] }\n+\n+##\n+# @Netdev:\n+#\n+# Captures the configuration of a network device.\n+#\n+# @id: identifier for monitor commands.\n+#\n+# @type: Specify the driver used for interpreting remaining arguments.\n+#\n+# Since: 1.2\n+#\n+# 'l2tpv3' - since 2.1\n+##\n+{ 'union': 'Netdev',\n+  'base': { 'id': 'str', 'type': 'NetClientDriver' },\n+  'discriminator': 'type',\n+  'data': {\n+    'none':     'NetdevNoneOptions',\n+    'nic':      'NetLegacyNicOptions',\n+    'user':     'NetdevUserOptions',\n+    'tap':      'NetdevTapOptions',\n+    'l2tpv3':   'NetdevL2TPv3Options',\n+    'socket':   'NetdevSocketOptions',\n+    'vde':      'NetdevVdeOptions',\n+    'dump':     'NetdevDumpOptions',\n+    'bridge':   'NetdevBridgeOptions',\n+    'hubport':  'NetdevHubPortOptions',\n+    'netmap':   'NetdevNetmapOptions',\n+    'vhost-user': 'NetdevVhostUserOptions' } }\n+\n+##\n+# @NetLegacy:\n+#\n+# Captures the configuration of a network device; legacy.\n+#\n+# @vlan: vlan number\n+#\n+# @id: identifier for monitor commands\n+#\n+# @name: identifier for monitor commands, ignored if @id is present\n+#\n+# @opts: device type specific properties (legacy)\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'NetLegacy',\n+  'data': {\n+    '*vlan': 'int32',\n+    '*id':   'str',\n+    '*name': 'str',\n+    'opts':  'NetLegacyOptions' } }\n+\n+##\n+# @NetLegacyOptionsType:\n+#\n+# Since: 1.2\n+##\n+{ 'enum': 'NetLegacyOptionsType',\n+  'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',\n+           'dump', 'bridge', 'netmap', 'vhost-user'] }\n+\n+##\n+# @NetLegacyOptions:\n+#\n+# Like Netdev, but for use only by the legacy command line options\n+#\n+# Since: 1.2\n+##\n+{ 'union': 'NetLegacyOptions',\n+  'base': { 'type': 'NetLegacyOptionsType' },\n+  'discriminator': 'type',\n+  'data': {\n+    'none':     'NetdevNoneOptions',\n+    'nic':      'NetLegacyNicOptions',\n+    'user':     'NetdevUserOptions',\n+    'tap':      'NetdevTapOptions',\n+    'l2tpv3':   'NetdevL2TPv3Options',\n+    'socket':   'NetdevSocketOptions',\n+    'vde':      'NetdevVdeOptions',\n+    'dump':     'NetdevDumpOptions',\n+    'bridge':   'NetdevBridgeOptions',\n+    'netmap':   'NetdevNetmapOptions',\n+    'vhost-user': 'NetdevVhostUserOptions' } }\n+\n+##\n+# @NetFilterDirection:\n+#\n+# Indicates whether a netfilter is attached to a netdev's transmit queue or\n+# receive queue or both.\n+#\n+# @all: the filter is attached both to the receive and the transmit\n+#       queue of the netdev (default).\n+#\n+# @rx: the filter is attached to the receive queue of the netdev,\n+#      where it will receive packets sent to the netdev.\n+#\n+# @tx: the filter is attached to the transmit queue of the netdev,\n+#      where it will receive packets sent by the netdev.\n+#\n+# Since: 2.5\n+##\n+{ 'enum': 'NetFilterDirection',\n+  'data': [ 'all', 'rx', 'tx' ] }\n+\n+##\n+# @RxState:\n+#\n+# Packets receiving state\n+#\n+# @normal: filter assigned packets according to the mac-table\n+#\n+# @none: don't receive any assigned packet\n+#\n+# @all: receive all assigned packets\n+#\n+# Since: 1.6\n+##\n+{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }\n+\n+##\n+# @RxFilterInfo:\n+#\n+# Rx-filter information for a NIC.\n+#\n+# @name: net client name\n+#\n+# @promiscuous: whether promiscuous mode is enabled\n+#\n+# @multicast: multicast receive state\n+#\n+# @unicast: unicast receive state\n+#\n+# @vlan: vlan receive state (Since 2.0)\n+#\n+# @broadcast-allowed: whether to receive broadcast\n+#\n+# @multicast-overflow: multicast table is overflowed or not\n+#\n+# @unicast-overflow: unicast table is overflowed or not\n+#\n+# @main-mac: the main macaddr string\n+#\n+# @vlan-table: a list of active vlan id\n+#\n+# @unicast-table: a list of unicast macaddr string\n+#\n+# @multicast-table: a list of multicast macaddr string\n+#\n+# Since: 1.6\n+##\n+{ 'struct': 'RxFilterInfo',\n+  'data': {\n+    'name':               'str',\n+    'promiscuous':        'bool',\n+    'multicast':          'RxState',\n+    'unicast':            'RxState',\n+    'vlan':               'RxState',\n+    'broadcast-allowed':  'bool',\n+    'multicast-overflow': 'bool',\n+    'unicast-overflow':   'bool',\n+    'main-mac':           'str',\n+    'vlan-table':         ['int'],\n+    'unicast-table':      ['str'],\n+    'multicast-table':    ['str'] }}\n+\n+##\n+# @query-rx-filter:\n+#\n+# Return rx-filter information for all NICs (or for the given NIC).\n+#\n+# @name: net client name\n+#\n+# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).\n+#          Returns an error if the given @name doesn't exist, or given\n+#          NIC doesn't support rx-filter querying, or given net client\n+#          isn't a NIC.\n+#\n+# Since: 1.6\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"query-rx-filter\", \"arguments\": { \"name\": \"vnet0\" } }\n+# <- { \"return\": [\n+#         {\n+#             \"promiscuous\": true,\n+#             \"name\": \"vnet0\",\n+#             \"main-mac\": \"52:54:00:12:34:56\",\n+#             \"unicast\": \"normal\",\n+#             \"vlan\": \"normal\",\n+#             \"vlan-table\": [\n+#                 4,\n+#                 0\n+#             ],\n+#             \"unicast-table\": [\n+#             ],\n+#             \"multicast\": \"normal\",\n+#             \"multicast-overflow\": false,\n+#             \"unicast-overflow\": false,\n+#             \"multicast-table\": [\n+#                 \"01:00:5e:00:00:01\",\n+#                 \"33:33:00:00:00:01\",\n+#                 \"33:33:ff:12:34:56\"\n+#             ],\n+#             \"broadcast-allowed\": false\n+#         }\n+#       ]\n+#    }\n+#\n+##\n+{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },\n+  'returns': ['RxFilterInfo'] }\n+\n+##\n+# @NIC_RX_FILTER_CHANGED:\n+#\n+# Emitted once until the 'query-rx-filter' command is executed, the first event\n+# will always be emitted\n+#\n+# @name: net client name\n+#\n+# @path: device path\n+#\n+# Since: 1.6\n+#\n+# Example:\n+#\n+# <- { \"event\": \"NIC_RX_FILTER_CHANGED\",\n+#      \"data\": { \"name\": \"vnet0\",\n+#                \"path\": \"/machine/peripheral/vnet0/virtio-backend\" },\n+#      \"timestamp\": { \"seconds\": 1368697518, \"microseconds\": 326866 } }\n+#    }\n+#\n+##\n+{ 'event': 'NIC_RX_FILTER_CHANGED',\n+  'data': { '*name': 'str', 'path': 'str' } }\n",
    "prefixes": [
        "PULL",
        "v2",
        "22/47"
    ]
}