]> xenbits.xen.org Git - xenclient/ioemu.git/commitdiff
drop lwip network support in stubdoms
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 23 Apr 2009 15:35:09 +0000 (16:35 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 23 Apr 2009 15:35:09 +0000 (16:35 +0100)
in order to simplify network support in ioemu stubdoms, I am dropping
lwip based networking.
Network support is still provided the same way: using the tap
interface, created in qemu using netfront.
The lwip stack is still available to avoid additional compilation
issues.
However the stubdom is not going to have its own vif anymore,
this means that the only vnc server supported is the one in dom0.
You can still enable the vnc server in a stubdom at compile time, if
you want so.

Probably the most important change caused by this patch to xen users is
that you don't have to specify two vif in the stubdom config file
anymore, but just one:

-vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
+vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34']

this is the qemu part of the patch: we do not need to hard code 1 as the
starting vif for the tap interface anymore.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
net.c

diff --git a/net.c b/net.c
index 52603693da7d2a2320d4d4cb9cb78c7a6bc26413..720027c3b26fe70f86ed5f377f251cdb7e165317 100644 (file)
--- a/net.c
+++ b/net.c
@@ -981,10 +981,7 @@ static int tap_open(char *ifname, int ifname_size)
 #include <netfront.h>
 static int tap_open(char *ifname, int ifname_size)
 {
-    char nodename[64];
-    static int num = 1; // 0 is for our own TCP/IP networking
-    snprintf(nodename, sizeof(nodename), "device/vif/%d", num++);
-    return netfront_tap_open(nodename);
+    return netfront_tap_open(NULL);
 }
 
 #undef DEFAULT_NETWORK_SCRIPT