--- qemu-options.hx | 120 ++++++++----------------------------------------------- 1 files changed, 17 insertions(+), 103 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx index d1d2272..1cf2bf2 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -956,24 +956,24 @@ DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL) #endif DEF("net", HAS_ARG, QEMU_OPTION_net, - "-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\n" - " create a new Network Interface Card and connect it to VLAN 'n'\n" + "-net nic[,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\n" + " create a new Network Interface Card\n" #ifdef CONFIG_SLIRP - "-net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=y|n]\n" + "-net user[,name=str][,net=addr[/mask]][,host=addr][,restrict=y|n]\n" " [,hostname=host][,dhcpstart=addr][,dns=addr][,tftp=dir][,bootfile=f]\n" " [,hostfwd=rule][,guestfwd=rule]" #ifndef _WIN32 "[,smb=dir[,smbserver=addr]]\n" #endif - " connect the user mode network stack to VLAN 'n', configure its\n" + " create an user mode network stack, configure its\n" " DHCP server and enabled optional services\n" #endif #ifdef _WIN32 - "-net tap[,vlan=n][,name=str],ifname=name\n" - " connect the host TAP network interface to VLAN 'n'\n" + "-net tap[,name=str],ifname=name\n" + " create a host TAP network interface\n" #else - "-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h]\n" - " connect the host TAP network interface to VLAN 'n' and use the\n" + "-net tap[,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h]\n" + " create a host TAP network interface and use the\n" " network scripts 'file' (default=" DEFAULT_NETWORK_SCRIPT ")\n" " and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n" " use '[down]script=no' to disable script execution\n" @@ -985,19 +985,13 @@ DEF("net", HAS_ARG, QEMU_OPTION_net, " use vhost=on to enable experimental in kernel accelerator\n" " use 'vhostfd=h' to connect to an already opened vhost net device\n" #endif - "-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port]\n" - " connect the vlan 'n' to another VLAN using a socket connection\n" - "-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port]\n" - " connect the vlan 'n' to multicast maddr and port\n" #ifdef CONFIG_VDE - "-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n" - " connect the vlan 'n' to port 'n' of a vde switch running\n" + "-net vde[,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n" + " connect port 'n' of a vde switch running\n" " on host and listening for incoming connections on 'socketpath'.\n" " Use group 'groupname' and mode 'octalmode' to change default\n" " ownership and permissions for communication port.\n" #endif - "-net dump[,vlan=n][,file=f][,len=n]\n" - " dump traffic on vlan 'n' to file 'f' (max n bytes per packet)\n" "-net none use it alone to have zero network devices. If no -net option\n" " is provided, the default is '-net nic -net user'\n", QEMU_ARCH_ALL) DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, @@ -1011,10 +1005,9 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, #endif "socket],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL) STEXI -...@item -net nic[,vl...@var{n}][,macad...@var{mac}][,mod...@var{type}] [,na...@var{name}][,ad...@var{addr}][,vecto...@var{v}] +...@item -net nic[,macad...@var{mac}][,mod...@var{type}] [,na...@var{name}][,ad...@var{addr}][,vecto...@var{v}] @findex -net -Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n} -= 0 is the default). The NIC is an e1000 by default on the PC +Create a new Network Interface Card. The NIC is an e1000 by default on the PC target. Optionally, the MAC address can be changed to @var{mac}, the device address set to @var{addr} (PCI cards only), and a @var{name} can be assigned for use in monitor commands. @@ -1034,8 +1027,6 @@ Use the user mode network stack which requires no administrator privilege to run. Valid options are: @table @option -...@item vl...@var{n} -Connect user mode stack to VLAN @var{n} (@var{n} = 0 is the default). @item na...@var{name} Assign symbolic name for use in monitor commands. @@ -1142,8 +1133,8 @@ processed and applied to -net user. Mixing them with the new configuration syntax gives undefined results. Their use for new applications is discouraged as they will be removed from future versions. -...@item -net tap[,vl...@var{n}][,na...@var{name}][,f...@var{h}][,ifna...@var{name}] [,scri...@var{file}][,downscri...@var{dfile}] -Connect the host TAP network interface @var{name} to VLAN @var{n}, use +...@item -net tap[,na...@var{name}][,f...@var{h}][,ifna...@var{name}] [,scri...@var{file}][,downscri...@var{dfile}] +Create a host TAP network interface, use the network script @var{file} to configure it and the network script @var{dfile} to deconfigure it. If @var{name} is not provided, the OS automatically provides one. @option{f...@var{h} can be used to specify @@ -1152,78 +1143,8 @@ configure script is @file{/etc/qemu-ifup} and the default network deconfigure script is @file{/etc/qemu-ifdown}. Use @option{script=no} or @option{downscript=no} to disable script execution. Example: -...@example -qemu linux.img -net nic -net tap -...@end example - -More complicated example (two NICs, each one connected to a TAP device) -...@example -qemu linux.img -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \ - -net nic,vlan=1 -net tap,vlan=1,ifname=tap1 -...@end example - -...@item -net socket[,vl...@var{n}][,na...@var{name}][,f...@var{h}] [,liste...@var{host}]:@var{port}][,conne...@var{host}:@var{port}] - -Connect the VLAN @var{n} to a remote VLAN in another QEMU virtual -machine using a TCP socket connection. If @option{listen} is -specified, QEMU waits for incoming connections on @var{port} -(@var{host} is optional). @option{connect} is used to connect to -another QEMU instance using the @option{listen} option. @option{f...@var{h} -specifies an already opened TCP socket. - -Example: -...@example -# launch a first QEMU instance -qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \ - -net socket,listen=:1234 -# connect the VLAN 0 of this instance to the VLAN 0 -# of the first instance -qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \ - -net socket,connect=127.0.0.1:1234 -...@end example - -...@item -net socket[,vl...@var{n}][,na...@var{name}][,f...@var{h}] [,mca...@var{maddr}:@var{port}] - -Create a VLAN @var{n} shared with another QEMU virtual -machines using a UDP multicast socket, effectively making a bus for -every QEMU with same multicast address @var{maddr} and @var{port}. -NOTES: -...@enumerate -...@item -Several QEMU can be running on different hosts and share same bus (assuming -correct multicast setup for these hosts). -...@item -mcast support is compatible with User Mode Linux (argument @option{...@var{n}=mcast}), see -...@url{http://user-mode-linux.sf.net}. -...@item -Use @option{fd=h} to specify an already opened UDP multicast socket. -...@end enumerate - -Example: -...@example -# launch one QEMU instance -qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \ - -net socket,mcast=230.0.0.1:1234 -# launch another QEMU instance on same "bus" -qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \ - -net socket,mcast=230.0.0.1:1234 -# launch yet another QEMU instance on same "bus" -qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \ - -net socket,mcast=230.0.0.1:1234 -...@end example - -Example (User Mode Linux compat.): -...@example -# launch QEMU instance (note mcast address selected -# is UML's default) -qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \ - -net socket,mcast=239.192.168.1:1102 -# launch UML -/path/to/linux ubd0=/path/to/root_fs eth0=mcast -...@end example - -...@item -net vde[,vl...@var{n}][,na...@var{name}][,so...@var{socketpath}] [,po...@var{n}][,gro...@var{groupname}][,mo...@var{octalmode}] -Connect VLAN @var{n} to PORT @var{n} of a vde switch running on host and +...@item -net vde[,na...@var{name}][,so...@var{socketpath}] [,po...@var{n}][,gro...@var{groupname}][,mo...@var{octalmode}] +Connect PORT @var{n} of a vde switch running on host and listening for incoming connections on @var{socketpath}. Use GROUP @var{groupname} and MODE @var{octalmode} to change default ownership and permissions for communication port. This option is available only if QEMU has been compiled @@ -1237,11 +1158,6 @@ vde_switch -F -sock /tmp/myswitch qemu linux.img -net nic -net vde,sock=/tmp/myswitch @end example -...@item -net dump[,vl...@var{n}][,fi...@var{file}][,l...@var{len}] -Dump network traffic on VLAN @var{n} to file @var{file} (@file{qemu-vlan0.pcap} by default). -At most @var{len} bytes (64k by default) per packet are stored. The file format is -libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. - @item -net none Indicate that no network devices should be configured. It is used to override the default configuration (@option{-net nic -net user}) which @@ -1526,9 +1442,7 @@ capable systems like Linux. @item -bt hci[,vl...@var{n}] Add a virtual, standard HCI that will participate in the Bluetooth -scatternet @var{n} (default @code{0}). Similarly to @option{-net} -VLANs, devices inside a bluetooth network @var{n} can only communicate -with other devices in the same network (scatternet). +scatternet @var{n} (default @code{0}). @end table @item -bt vhci[,vl...@var{n}] -- 1.7.1