From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E6eQP-0006qx-AG for qemu-devel@nongnu.org; Sat, 20 Aug 2005 21:15:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E6eQJ-0006oI-23 for qemu-devel@nongnu.org; Sat, 20 Aug 2005 21:14:55 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E6eQH-0006kY-Sy for qemu-devel@nongnu.org; Sat, 20 Aug 2005 21:14:53 -0400 Received: from [65.74.133.11] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1E6eIE-0002tL-Sk for qemu-devel@nongnu.org; Sat, 20 Aug 2005 21:06:45 -0400 From: Paul Brook Subject: Re: [Qemu-devel] patch: allow defining MAC address etc Date: Sun, 21 Aug 2005 02:04:31 +0100 References: <1124584572.6521.38.camel@localhost.localdomain> In-Reply-To: <1124584572.6521.38.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508210204.32388.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, hadi@cyberus.ca On Sunday 21 August 2005 01:36, jamal wrote: > This attached patch is intended for allowing automated clever scripting > for networking (tuntap only). Please read and apply if possible. > > It does the following: > a) allow for specifying the guest netdevice interface MAC address > (in addition to keeping the old functionality of specifying just > the first one and letting qemu decide what subsequent ones should be) > So now you can say something along the lines of: > "-nics 2 -macaddr0 00:11:a:0:2:19 -macaddr1 00:11:a:0:1:19" > We allow upto 6 such MAC addresses to be specified. Maybe theres > a more clever way to achieve this. Maybe a comma separated list of MAC addresses. e.g. "-nics 2 macaddr 00:11:a:0:2:19,00:11:a:0:1:19" Whatever you do, you should really support up to MAX_NICS addresses. > b) allows to specify an opaque integer to be passed to the host script. > Such an integer is useful if you are creating many NICs and you want > to do different things depending on what this extra parameter is; > example you may wanna add/del a route for one but not other > syntax is of the form: "-ID1 1 -ID2 2" > The IDs are mapped to the NICs. i.e ID1 maps to the first NIC > and ID2 to the second etc. If you dont specify an ID, a 0 is used. > Just like NICS/MACs we allow upto 6 such IDs to be specified. Wouldn't it make more sense to just pass the mac address and/or the NIC number? Introducing yet another value seems unnecessarily complicated. Paul