From patchwork Thu Mar 24 23:34:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 8666511 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3E1DDC0553 for ; Thu, 24 Mar 2016 23:34:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E612C202B8 for ; Thu, 24 Mar 2016 23:34:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9EDD201EF for ; Thu, 24 Mar 2016 23:34:33 +0000 (UTC) Received: from localhost ([::1]:53336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajElt-0002la-BG for patchwork-qemu-devel@patchwork.kernel.org; Thu, 24 Mar 2016 19:34:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajElf-0002ia-B3 for qemu-devel@nongnu.org; Thu, 24 Mar 2016 19:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajElc-0002DO-JJ for qemu-devel@nongnu.org; Thu, 24 Mar 2016 19:34:19 -0400 Received: from domu-toccata.ens-lyon.fr ([140.77.166.138]:58479 helo=sonata.ens-lyon.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajElc-0002D7-8s for qemu-devel@nongnu.org; Thu, 24 Mar 2016 19:34:16 -0400 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id B3EFF200C4; Fri, 25 Mar 2016 00:34:15 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vb8A52tGKXrj; Fri, 25 Mar 2016 00:34:15 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (LFbn-1-6757-94.w90-120.abo.wanadoo.fr [90.120.189.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 43F2820114; Fri, 25 Mar 2016 00:34:15 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.86_2) (envelope-from ) id 1ajElZ-0008G9-0P; Fri, 25 Mar 2016 00:34:12 +0100 From: Samuel Thibault To: qemu-devel@nongnu.org Date: Fri, 25 Mar 2016 00:34:10 +0100 Message-Id: <1458862451-31703-2-git-send-email-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1458862451-31703-1-git-send-email-samuel.thibault@ens-lyon.org> References: <1458862451-31703-1-git-send-email-samuel.thibault@ens-lyon.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 140.77.166.138 Cc: thuth@redhat.com, jan.kiszka@siemens.com, jasowang@redhat.com, armbru@redhat.com, Samuel Thibault Subject: [Qemu-devel] [PATCHv4 1/2] Rework ipv6 options 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rename the recently-added ip6-foo options into ipv6-foo options, to make them coherent with other ipv6 options. Also rework the documentation. Signed-off-by: Samuel Thibault Reviewed-by: Eric Blake --- net/slirp.c | 6 +++--- qapi-schema.json | 25 ++++++++++++++++--------- qemu-options.hx | 18 ++++++++++-------- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index 95239bc..0013c27 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -828,10 +828,10 @@ int net_init_slirp(const NetClientOptions *opts, const char *name, net_init_slirp_configs(user->guestfwd, 0); ret = net_slirp_init(peer, "user", name, user->q_restrict, vnet, - user->host, user->ip6_prefix, user->ip6_prefixlen, - user->ip6_host, user->hostname, user->tftp, + user->host, user->ipv6_prefix, user->ipv6_prefixlen, + user->ipv6_host, user->hostname, user->tftp, user->bootfile, user->dhcpstart, - user->dns, user->ip6_dns, user->smb, + user->dns, user->ipv6_dns, user->smb, user->smbserver, dnssearch); while (slirp_configs) { diff --git a/qapi-schema.json b/qapi-schema.json index 88f9b81..e1dd7e1 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2427,7 +2427,10 @@ # # @ip: #optional legacy parameter, use net= instead # -# @net: #optional IP address and optional netmask +# @net: #optional IP network address that the guest will see, in the +# form addr[/netmask] The netmask is optional, and can be +# either in the form a.b.c.d or as a number of valid top-most +# bits. Default is 10.0.2.0/24. # # @host: #optional guest-visible address of the host # @@ -2443,13 +2446,17 @@ # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option # to the guest # -# @ip6-prefix: #optional IPv6 network prefix (default is fec0::) (since 2.6) +# @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since +# 2.6). The network prefix is given in the usual +# hexadecimal IPv6 address notation. # -# @ip6-prefixlen: #optional IPv6 network prefix length (default is 64) (since 2.6) +# @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64) +# (since 2.6) # -# @ip6-host: #optional guest-visible IPv6 address of the host (since 2.6) +# @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6) # -# @ip6-dns: #optional guest-visible IPv6 address of the virtual nameserver (since 2.6) +# @ipv6-dns: #optional guest-visible IPv6 address of the virtual +# nameserver (since 2.6) # # @smb: #optional root directory of the built-in SMB server # @@ -2474,10 +2481,10 @@ '*dhcpstart': 'str', '*dns': 'str', '*dnssearch': ['String'], - '*ip6-prefix': 'str', - '*ip6-prefixlen': 'int', - '*ip6-host': 'str', - '*ip6-dns': 'str', + '*ipv6-prefix': 'str', + '*ipv6-prefixlen': 'int', + '*ipv6-host': 'str', + '*ipv6-dns': 'str', '*smb': 'str', '*smbserver': 'str', '*hostfwd': ['String'], diff --git a/qemu-options.hx b/qemu-options.hx index 732ed8c..5654ce3 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1560,9 +1560,9 @@ DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL) DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, #ifdef CONFIG_SLIRP - "-netdev user,id=str[,net=addr[/mask]][,host=addr][,ip6-net=addr[/int]]\n" - " [,ip6-host=addr][,restrict=on|off][,hostname=host][,dhcpstart=addr]\n" - " [,dns=addr][,ip6-dns=addr][,dnssearch=domain][,tftp=dir]\n" + "-netdev user,id=str[,net=addr[/mask]][,host=addr][,ipv6-net=addr[/int]]\n" + " [,ipv6-host=addr][,restrict=on|off][,hostname=host][,dhcpstart=addr]\n" + " [,dns=addr][,ipv6-dns=addr][,dnssearch=domain][,tftp=dir]\n" " [,bootfile=f][,hostfwd=rule][,guestfwd=rule]" #ifndef _WIN32 "[,smb=dir[,smbserver=addr]]\n" @@ -1719,11 +1719,13 @@ either in the form a.b.c.d or as number of valid top-most bits. Default is Specify the guest-visible address of the host. Default is the 2nd IP in the guest network, i.e. x.x.x.2. -@item ip6-net=@var{addr}[/@var{int}] -Set IPv6 network address the guest will see. Optionally specify the prefix -size, as number of valid top-most bits. Default is fec0::/64. +@item ipv6-net=@var{addr}[/@var{int}] +Set IPv6 network address the guest will see (default is fec0::/64). The +network prefix is given in the usual hexadecimal IPv6 address +notation. The prefix size is optional, and is given as the number of +valid top-most bits (default is 64). -@item ip6-host=@var{addr} +@item ipv6-host=@var{addr} Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 in the guest network, i.e. xxxx::2. @@ -1744,7 +1746,7 @@ Specify the guest-visible address of the virtual nameserver. The address must be different from the host address. Default is the 3rd IP in the guest network, i.e. x.x.x.3. -@item ip6-dns=@var{addr} +@item ipv6-dns=@var{addr} Specify the guest-visible address of the IPv6 virtual nameserver. The address must be different from the host address. Default is the 3rd IP in the guest network, i.e. xxxx::3.