Skip to contentSkip to conversation

vdeq patch

Qemu-devel Iain McFarlane 2 participants 2 messages Nov 17, 2005 – Nov 18, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

For those using vdeq the following patch allows it to work with the new network options

You will still have to add a -net nic,vlan=0 to your normal qemu options and vdeq will add -net tap,vlan=0,fd=X

Regards,

Iain

vdeq.c 2005-11-17 22:30:58.000000000 +0000 renamed from vdeq.c.orig 2005-11-17 21:44:05.000000000 +0000 +4 -10
@@ -208,18 +208,12 @@
 
   newargv[0]=filename;
   for (i=0; i<nb_nics; i++) {
-       char numfd[10];
-       sprintf(numfd,"%d",sp[i][0]);
-       newargv[2*i+1]="-tun-fd";
+       char numfd[30];
+       sprintf(numfd,"tap,vlan=0,fd=%d",sp[i][0]);
+       newargv[2*i+1]="-net";
        newargv[2*i+2]=strdup(numfd);
   }
-       {
-               char nnics[10];
-               sprintf(nnics,"%d",nb_nics);
-               newargv[2*nb_nics+1]="-nics";
-               newargv[2*nb_nics+2]=strdup(nnics);
-       }
-  for (i=(2*nb_nics)+3;args<argc;i++,args++) newargv[i]=argv[args];
+  for (i=(2*nb_nics)+1;args<argc;i++,args++) newargv[i]=argv[args];
 
   newargv[i]=0;
#1 lore raw
Quoted 2 lines · Iain McFarlane

For those using vdeq the following patch allows it to work with the new network options

Thank you.

I have already included your patch to the cvs of vde-1.5.10 and vde-2.0.1.

If you install vde from cvs you'll have vdeq for the new syntax as well as vdeoq (o means old) if you need to run an older qemu.

vde-2 includes also vlan support, run-time user interface, fast spanning tree protocol.
It also include a wirefilter with emulation of packet loss, dup, noise, delay, limits to bandwidth, interface speed and channel capacity.

ciao
renzo