From 5607c38820366954c38dd702e979499486057481 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 18 Jun 2009 15:14:08 +0200 Subject: Support addr=... in option argument of -net nic Make net_client_init() accept addr=, put the value into struct NICinfo. Use it in pci_nic_init(), and remove arguments bus and devfn. Don't support addr= in third argument of monitor command pci_add, because that clashes with its first argument. Admittedly unelegant. Machines "malta" and "r2d" have a default NIC with a well-known PCI address. Deal with that the same way as the NIC model: make pci_nic_init() take an optional default to be used when the user doesn't specify one. Signed-off-by: Markus Armbruster Signed-off-by: Anthony Liguori --- qemu-options.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'qemu-options.hx') diff --git a/qemu-options.hx b/qemu-options.hx index 9d5e05a..895b248 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -733,7 +733,7 @@ STEXI ETEXI DEF("net", HAS_ARG, QEMU_OPTION_net, - "-net nic[,vlan=n][,macaddr=addr][,model=type][,name=str]\n" + "-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str]\n" " create a new Network Interface Card and connect it to VLAN 'n'\n" #ifdef CONFIG_SLIRP "-net user[,vlan=n][,name=str][,hostname=host]\n" @@ -767,10 +767,11 @@ DEF("net", HAS_ARG, QEMU_OPTION_net, "-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") STEXI -@item -net nic[,vlan=@var{n}][,macaddr=@var{addr}][,model=@var{type}][,name=@var{name}] +@item -net nic[,vlan=@var{n}][,macaddr=@var{mac}][,model=@var{type}][,name=@var{name}][,addr=@var{addr}] Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n} = 0 is the default). The NIC is an ne2k_pci by default on the PC -target. Optionally, the MAC address can be changed to @var{addr} +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. If no @option{-net} option is specified, a single NIC is created. Qemu can emulate several different models of network card. -- cgit v1.1