aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/netfront.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-04-23 12:19:14 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-04-23 12:19:14 +0100
commit82ed447498424443f9ea1585bfa5dcfb95f1ab3a (patch)
tree9238b5b3bd79627b33dee56498658836db225e89 /extras/mini-os/netfront.c
parent5bacab31726fb8e4dbedeba2eb737541b13b0aab (diff)
downloadxen-82ed447498424443f9ea1585bfa5dcfb95f1ab3a.tar.gz
xen-82ed447498424443f9ea1585bfa5dcfb95f1ab3a.tar.bz2
xen-82ed447498424443f9ea1585bfa5dcfb95f1ab3a.zip
stubdom: drop lwip support
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'] Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/netfront.c')
-rw-r--r--extras/mini-os/netfront.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c
index 824c42a737..a235769377 100644
--- a/extras/mini-os/netfront.c
+++ b/extras/mini-os/netfront.c
@@ -306,11 +306,16 @@ struct netfront_dev *init_netfront(char *_nodename, void (*thenetif_rx)(unsigned
int retry=0;
int i;
char* msg;
- char* nodename = _nodename ? _nodename : "device/vif/0";
-
+ char nodename[256];
+ char path[256];
struct netfront_dev *dev;
+ static int netfrontends = 0;
- char path[strlen(nodename) + 1 + 10 + 1];
+ if (!_nodename)
+ snprintf(nodename, sizeof(nodename), "device/vif/%d", netfrontends);
+ else
+ strncpy(nodename, _nodename, strlen(nodename));
+ netfrontends++;
if (!thenetif_rx)
thenetif_rx = netif_rx;