qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] patch: allow defining MAC address etc


From: jamal
Subject: [Qemu-devel] patch: allow defining MAC address etc
Date: Sat, 20 Aug 2005 20:36:12 -0400

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.

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.

c) In addition to receiving the tun device name as $1, the
net setup script now receives $2 as the ID value and $3 as the
guest MAC address.
I was thinking instead of passing the guest MAC, to allow the user
to specify the IP address of the host side if needed but then
figured that maybe introducing too many parameters around. The user can
instead write a script which will configure the host side IP based
on the ID passed. Also i could get rid of passing the MAC if deemed
unneeded.

cheers,
jamal

Attachment: qemu_p
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]