Commit c4a7060cf70e2e72f44a98307f453eba07e09bea
1 parent
7f75ffd3
New option -net nic,model=? (Mark Glines)
Network documentation update (Mark Glines) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2880 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
7 changed files
with
26 additions
and
4 deletions
hw/integratorcp.c
@@ -500,6 +500,9 @@ static void integratorcp_init(int ram_size, int vga_ram_size, int boot_device, | @@ -500,6 +500,9 @@ static void integratorcp_init(int ram_size, int vga_ram_size, int boot_device, | ||
500 | if (nd_table[0].model == NULL | 500 | if (nd_table[0].model == NULL |
501 | || strcmp(nd_table[0].model, "smc91c111") == 0) { | 501 | || strcmp(nd_table[0].model, "smc91c111") == 0) { |
502 | smc91c111_init(&nd_table[0], 0xc8000000, pic[27]); | 502 | smc91c111_init(&nd_table[0], 0xc8000000, pic[27]); |
503 | + } else if (strcmp(nd_table[0].model, "?") == 0) { | ||
504 | + fprintf(stderr, "qemu: Supported NICs: smc91c111\n"); | ||
505 | + exit (1); | ||
503 | } else { | 506 | } else { |
504 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model); | 507 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model); |
505 | exit (1); | 508 | exit (1); |
hw/mips_r4k.c
@@ -227,6 +227,9 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, | @@ -227,6 +227,9 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, | ||
227 | if (nd_table[0].model == NULL | 227 | if (nd_table[0].model == NULL |
228 | || strcmp(nd_table[0].model, "ne2k_isa") == 0) { | 228 | || strcmp(nd_table[0].model, "ne2k_isa") == 0) { |
229 | isa_ne2000_init(0x300, i8259[9], &nd_table[0]); | 229 | isa_ne2000_init(0x300, i8259[9], &nd_table[0]); |
230 | + } else if (strcmp(nd_table[0].model, "?") == 0) { | ||
231 | + fprintf(stderr, "qemu: Supported NICs: ne2k_isa\n"); | ||
232 | + exit (1); | ||
230 | } else { | 233 | } else { |
231 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model); | 234 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model); |
232 | exit (1); | 235 | exit (1); |
hw/pc.c
@@ -865,7 +865,12 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device, | @@ -865,7 +865,12 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device, | ||
865 | if (strcmp(nd->model, "ne2k_isa") == 0) { | 865 | if (strcmp(nd->model, "ne2k_isa") == 0) { |
866 | pc_init_ne2k_isa(nd, i8259); | 866 | pc_init_ne2k_isa(nd, i8259); |
867 | } else if (pci_enabled) { | 867 | } else if (pci_enabled) { |
868 | + if (strcmp(nd->model, "?") == 0) | ||
869 | + fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n"); | ||
868 | pci_nic_init(pci_bus, nd, -1); | 870 | pci_nic_init(pci_bus, nd, -1); |
871 | + } else if (strcmp(nd->model, "?") == 0) { | ||
872 | + fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n"); | ||
873 | + exit(1); | ||
869 | } else { | 874 | } else { |
870 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model); | 875 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model); |
871 | exit(1); | 876 | exit(1); |
hw/pci.c
@@ -588,6 +588,10 @@ void pci_nic_init(PCIBus *bus, NICInfo *nd, int devfn) | @@ -588,6 +588,10 @@ void pci_nic_init(PCIBus *bus, NICInfo *nd, int devfn) | ||
588 | pci_rtl8139_init(bus, nd, devfn); | 588 | pci_rtl8139_init(bus, nd, devfn); |
589 | } else if (strcmp(nd->model, "pcnet") == 0) { | 589 | } else if (strcmp(nd->model, "pcnet") == 0) { |
590 | pci_pcnet_init(bus, nd, devfn); | 590 | pci_pcnet_init(bus, nd, devfn); |
591 | + } else if (strcmp(nd->model, "?") == 0) { | ||
592 | + fprintf(stderr, "qemu: Supported PCI NICs: i82551 i82557b i82559er" | ||
593 | + " ne2k_pci pcnet rtl8139\n"); | ||
594 | + exit (1); | ||
591 | } else { | 595 | } else { |
592 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model); | 596 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model); |
593 | exit (1); | 597 | exit (1); |
hw/ppc_prep.c
@@ -626,6 +626,9 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, int boot_device, | @@ -626,6 +626,9 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, int boot_device, | ||
626 | if (nd_table[0].model == NULL | 626 | if (nd_table[0].model == NULL |
627 | || strcmp(nd_table[0].model, "ne2k_isa") == 0) { | 627 | || strcmp(nd_table[0].model, "ne2k_isa") == 0) { |
628 | isa_ne2000_init(ne2000_io[i], i8259[ne2000_irq[i]], &nd_table[i]); | 628 | isa_ne2000_init(ne2000_io[i], i8259[ne2000_irq[i]], &nd_table[i]); |
629 | + } else if (strcmp(nd_table[0].model, "?") == 0) { | ||
630 | + fprintf(stderr, "qemu: Supported NICs: ne2k_isa\n"); | ||
631 | + exit (1); | ||
629 | } else { | 632 | } else { |
630 | /* Why ? */ | 633 | /* Why ? */ |
631 | cpu_abort(env, "qemu: Unsupported NIC: %s\n", nd_table[0].model); | 634 | cpu_abort(env, "qemu: Unsupported NIC: %s\n", nd_table[0].model); |
hw/sun4m.c
@@ -353,6 +353,9 @@ static void sun4m_hw_init(const struct hwdef *hwdef, int ram_size, | @@ -353,6 +353,9 @@ static void sun4m_hw_init(const struct hwdef *hwdef, int ram_size, | ||
353 | if (nd_table[0].model == NULL | 353 | if (nd_table[0].model == NULL |
354 | || strcmp(nd_table[0].model, "lance") == 0) { | 354 | || strcmp(nd_table[0].model, "lance") == 0) { |
355 | lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq); | 355 | lance_init(&nd_table[0], hwdef->le_base, ledma, *ledma_irq); |
356 | + } else if (strcmp(nd_table[0].model, "?") == 0) { | ||
357 | + fprintf(stderr, "qemu: Supported NICs: lance\n"); | ||
358 | + exit (1); | ||
356 | } else { | 359 | } else { |
357 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model); | 360 | fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model); |
358 | exit (1); | 361 | exit (1); |
qemu-doc.texi
@@ -153,7 +153,7 @@ PS/2 mouse and keyboard | @@ -153,7 +153,7 @@ PS/2 mouse and keyboard | ||
153 | @item | 153 | @item |
154 | Floppy disk | 154 | Floppy disk |
155 | @item | 155 | @item |
156 | -NE2000 PCI network adapters | 156 | +PCI/ISA PCI network adapters |
157 | @item | 157 | @item |
158 | Serial ports | 158 | Serial ports |
159 | @item | 159 | @item |
@@ -355,7 +355,7 @@ Network options: | @@ -355,7 +355,7 @@ Network options: | ||
355 | 355 | ||
356 | @item -net nic[,vlan=n][,macaddr=addr][,model=type] | 356 | @item -net nic[,vlan=n][,macaddr=addr][,model=type] |
357 | Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n} | 357 | Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n} |
358 | -= 0 is the default). The NIC is currently an NE2000 on the PC | 358 | += 0 is the default). The NIC is an ne2k_pci by default on the PC |
359 | target. Optionally, the MAC address can be changed. If no | 359 | target. Optionally, the MAC address can be changed. If no |
360 | @option{-net} option is specified, a single NIC is created. | 360 | @option{-net} option is specified, a single NIC is created. |
361 | Qemu can emulate several different models of network card. | 361 | Qemu can emulate several different models of network card. |
@@ -363,7 +363,8 @@ Valid values for @var{type} are | @@ -363,7 +363,8 @@ Valid values for @var{type} are | ||
363 | @code{i82551}, @code{i82557b}, @code{i82559er}, | 363 | @code{i82551}, @code{i82557b}, @code{i82559er}, |
364 | @code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139}, | 364 | @code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139}, |
365 | @code{smc91c111} and @code{lance}. | 365 | @code{smc91c111} and @code{lance}. |
366 | -Not all devices are supported on all targets. | 366 | +Not all devices are supported on all targets. Use -net nic,model=? |
367 | +for a list of available devices for your target. | ||
367 | 368 | ||
368 | @item -net user[,vlan=n][,hostname=name] | 369 | @item -net user[,vlan=n][,hostname=name] |
369 | Use the user mode network stack which requires no administrator | 370 | Use the user mode network stack which requires no administrator |
@@ -1208,7 +1209,7 @@ What you should @emph{never} do: | @@ -1208,7 +1209,7 @@ What you should @emph{never} do: | ||
1208 | @node pcsys_network | 1209 | @node pcsys_network |
1209 | @section Network emulation | 1210 | @section Network emulation |
1210 | 1211 | ||
1211 | -QEMU can simulate several networks cards (NE2000 boards on the PC | 1212 | +QEMU can simulate several networks cards (PCI or ISA cards on the PC |
1212 | target) and can connect them to an arbitrary number of Virtual Local | 1213 | target) and can connect them to an arbitrary number of Virtual Local |
1213 | Area Networks (VLANs). Host TAP devices can be connected to any QEMU | 1214 | Area Networks (VLANs). Host TAP devices can be connected to any QEMU |
1214 | VLAN. VLAN can be connected between separate instances of QEMU to | 1215 | VLAN. VLAN can be connected between separate instances of QEMU to |