Commit c4a7060cf70e2e72f44a98307f453eba07e09bea

Authored by blueswir1
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
hw/integratorcp.c
... ... @@ -500,6 +500,9 @@ static void integratorcp_init(int ram_size, int vga_ram_size, int boot_device,
500 500 if (nd_table[0].model == NULL
501 501 || strcmp(nd_table[0].model, "smc91c111") == 0) {
502 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 506 } else {
504 507 fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
505 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 227 if (nd_table[0].model == NULL
228 228 || strcmp(nd_table[0].model, "ne2k_isa") == 0) {
229 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 233 } else {
231 234 fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
232 235 exit (1);
... ...
... ... @@ -865,7 +865,12 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
865 865 if (strcmp(nd->model, "ne2k_isa") == 0) {
866 866 pc_init_ne2k_isa(nd, i8259);
867 867 } else if (pci_enabled) {
  868 + if (strcmp(nd->model, "?") == 0)
  869 + fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n");
868 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 874 } else {
870 875 fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model);
871 876 exit(1);
... ...
hw/pci.c
... ... @@ -588,6 +588,10 @@ void pci_nic_init(PCIBus *bus, NICInfo *nd, int devfn)
588 588 pci_rtl8139_init(bus, nd, devfn);
589 589 } else if (strcmp(nd->model, "pcnet") == 0) {
590 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 595 } else {
592 596 fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model);
593 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 626 if (nd_table[0].model == NULL
627 627 || strcmp(nd_table[0].model, "ne2k_isa") == 0) {
628 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 632 } else {
630 633 /* Why ? */
631 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 353 if (nd_table[0].model == NULL
354 354 || strcmp(nd_table[0].model, "lance") == 0) {
355 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 359 } else {
357 360 fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model);
358 361 exit (1);
... ...
qemu-doc.texi
... ... @@ -153,7 +153,7 @@ PS/2 mouse and keyboard
153 153 @item
154 154 Floppy disk
155 155 @item
156   -NE2000 PCI network adapters
  156 +PCI/ISA PCI network adapters
157 157 @item
158 158 Serial ports
159 159 @item
... ... @@ -355,7 +355,7 @@ Network options:
355 355  
356 356 @item -net nic[,vlan=n][,macaddr=addr][,model=type]
357 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 359 target. Optionally, the MAC address can be changed. If no
360 360 @option{-net} option is specified, a single NIC is created.
361 361 Qemu can emulate several different models of network card.
... ... @@ -363,7 +363,8 @@ Valid values for @var{type} are
363 363 @code{i82551}, @code{i82557b}, @code{i82559er},
364 364 @code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
365 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 369 @item -net user[,vlan=n][,hostname=name]
369 370 Use the user mode network stack which requires no administrator
... ... @@ -1208,7 +1209,7 @@ What you should @emph{never} do:
1208 1209 @node pcsys_network
1209 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 1213 target) and can connect them to an arbitrary number of Virtual Local
1213 1214 Area Networks (VLANs). Host TAP devices can be connected to any QEMU
1214 1215 VLAN. VLAN can be connected between separate instances of QEMU to
... ...