From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo74F-0004GQ-2p for qemu-devel@nongnu.org; Mon, 19 Oct 2015 05:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo74B-0001ai-1b for qemu-devel@nongnu.org; Mon, 19 Oct 2015 05:49:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo74A-0001ac-Rv for qemu-devel@nongnu.org; Mon, 19 Oct 2015 05:49:18 -0400 Date: Mon, 19 Oct 2015 12:49:15 +0300 From: Victor Kaplansky Message-ID: <1445248129-22483-1-git-send-email-victork@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] qemu-options: add documentation for using UDP unicast network backend. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jasowang@redhat.com, mlspirat42@gmail.com, mst@redhat.com For a long time QEMU has had support for UDP unicast network backend, but manual was missing description and usage examples. This patch adds some more documentation and an example. Signed-off-by: Victor Kaplansky --- qemu-options.hx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 2485b94..342bb14 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1855,6 +1855,8 @@ qemu-system-i386 linux.img \ -net socket,connect=127.0.0.1:1234 @end example + + @item -netdev socket,id=@var{id}[,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]] @itemx -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]] @@ -1907,6 +1909,27 @@ qemu-system-i386 linux.img \ -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4 @end example +@item -netdev socket,id=@var{id}[,fd=@var{h}][,udp=@var{rhost}:@var{rport}[,localaddr=@var{lhost}:@var{lport}]] +@itemx -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,udp=@var{host}:@var{rport}[,localaddr=@var{host}:@var{lport}]] + +Connect a VLAN @var{n} to a remote VLAN in another QEMU virtual +machine using a UDP tunnel. Use lport as local port and rport as +remote port of the tunnel. The two QEMU can be running on +different hosts. Use @option{fd=h} to specify an already opened +UDP socket. + +Example: +@example +# launch one QEMU instance +qemu-system-i386 linux.img \ + -device virtio-net-pci,netdev=net0 \ + -netdev socket,id=net0,udp=127.0.0.1:4444,localaddr=127.0.0.1:5555 +# launch second QEMU instance sharing the network with the first one +qemu-system-i386 linux.img \ + -device virtio-net-pci,netdev=net0 \ + -netdev socket,id=net0,udp=127.0.0.1:5555,localaddr=127.0.0.1:4444 +@end example + @item -netdev l2tpv3,id=@var{id},src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}] @itemx -net l2tpv3[,vlan=@var{n}][,name=@var{name}],src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}] Connect VLAN @var{n} to L2TPv3 pseudowire. L2TPv3 (RFC3391) is a popular -- --Victor