summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-07 17:48:51 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-07 17:48:51 +0000
commit7a9f6e4a8db958caf10332f160ed04f175932d55 (patch)
tree086d6b882f8abf13ade582900b68fc3e560806f7 /hw
parent96d5e20138b177f2d79c178a6f994015347e6cca (diff)
downloadqemu-7a9f6e4a8db958caf10332f160ed04f175932d55.tar.gz
Add a -net name=foo parameter (Mark McLoughlin)
Allow the user to supply a vlan client name on the command line. This is probably only useful for management tools so that they can use their own names rather than parsing the output of 'info network'. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6220 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/e1000.c2
-rw-r--r--hw/eepro100.c2
-rw-r--r--hw/etraxfs_eth.c2
-rw-r--r--hw/mcf_fec.c2
-rw-r--r--hw/mipsnet.c2
-rw-r--r--hw/musicpal.c2
-rw-r--r--hw/ne2000.c4
-rw-r--r--hw/pcnet.c2
-rw-r--r--hw/rtl8139.c2
-rw-r--r--hw/smc91c111.c2
-rw-r--r--hw/stellaris_enet.c2
-rw-r--r--hw/usb-net.c2
-rw-r--r--hw/virtio-net.c2
13 files changed, 14 insertions, 14 deletions
diff --git a/hw/e1000.c b/hw/e1000.c
index 5b0b7314d0..09cb96a0a6 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1071,7 +1071,7 @@ pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn)
d->rxbuf_min_shift = 1;
memset(&d->tx, 0, sizeof d->tx);
- d->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ d->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
e1000_receive, e1000_can_receive, d);
qemu_format_nic_info_str(d->vc, d->nd->macaddr);
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 86a4e6e511..5eca10530f 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1776,7 +1776,7 @@ static void nic_init(PCIBus * bus, NICInfo * nd,
nic_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
nic_receive, nic_can_receive, s);
qemu_format_nic_info_str(s->vc, s->macaddr);
diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c
index 539ec6dab4..239e0d872c 100644
--- a/hw/etraxfs_eth.c
+++ b/hw/etraxfs_eth.c
@@ -572,7 +572,7 @@ void *etraxfs_eth_init(NICInfo *nd, CPUState *env,
eth->ethregs = cpu_register_io_memory(0, eth_read, eth_write, eth);
cpu_register_physical_memory (base, 0x5c, eth->ethregs);
- eth->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ eth->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
eth_receive, eth_can_receive, eth);
return dma;
diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c
index 6c044cd819..d39992f68d 100644
--- a/hw/mcf_fec.c
+++ b/hw/mcf_fec.c
@@ -452,7 +452,7 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq)
mcf_fec_writefn, s);
cpu_register_physical_memory(base, 0x400, iomemtype);
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
mcf_fec_receive, mcf_fec_can_receive, s);
memcpy(s->macaddr, nd->macaddr, 6);
qemu_format_nic_info_str(n->vc, s->macaddr);
diff --git a/hw/mipsnet.c b/hw/mipsnet.c
index 4b3e8e9347..0eb4c1ed1a 100644
--- a/hw/mipsnet.c
+++ b/hw/mipsnet.c
@@ -250,7 +250,7 @@ void mipsnet_init (int base, qemu_irq irq, NICInfo *nd)
s->irq = irq;
s->nd = nd;
if (nd && nd->vlan) {
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
mipsnet_receive, mipsnet_can_receive, s);
} else {
s->vc = NULL;
diff --git a/hw/musicpal.c b/hw/musicpal.c
index d172a11861..1c932ec3f7 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -718,7 +718,7 @@ static void mv88w8618_eth_init(NICInfo *nd, uint32_t base, qemu_irq irq)
if (!s)
return;
s->irq = irq;
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
eth_receive, eth_can_receive, s);
iomemtype = cpu_register_io_memory(0, mv88w8618_eth_readfn,
mv88w8618_eth_writefn, s);
diff --git a/hw/ne2000.c b/hw/ne2000.c
index ad97bc5f60..200db90b9e 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -741,7 +741,7 @@ void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd)
ne2000_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
ne2000_receive, ne2000_can_receive, s);
qemu_format_nic_info_str(s->vc, s->macaddr);
@@ -804,7 +804,7 @@ void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn)
s->pci_dev = (PCIDevice *)d;
memcpy(s->macaddr, nd->macaddr, 6);
ne2000_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
ne2000_receive, ne2000_can_receive, s);
qemu_format_nic_info_str(s->vc, s->macaddr);
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 5b45956299..102166ed22 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1936,7 +1936,7 @@ static void pcnet_common_init(PCNetState *d, NICInfo *nd, const char *info_str)
d->nd = nd;
if (nd && nd->vlan) {
- d->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ d->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
pcnet_receive, pcnet_can_receive, d);
qemu_format_nic_info_str(d->vc, d->nd->macaddr);
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index d51722054e..8be63c5050 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3438,7 +3438,7 @@ void pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn)
s->pci_dev = (PCIDevice *)d;
memcpy(s->macaddr, nd->macaddr, 6);
rtl8139_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
rtl8139_receive, rtl8139_can_receive, s);
qemu_format_nic_info_str(s->vc, s->macaddr);
diff --git a/hw/smc91c111.c b/hw/smc91c111.c
index 6416026e82..27a3158f97 100644
--- a/hw/smc91c111.c
+++ b/hw/smc91c111.c
@@ -704,7 +704,7 @@ void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq)
smc91c111_reset(s);
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
smc91c111_receive, smc91c111_can_receive, s);
qemu_format_nic_info_str(s->vc, s->macaddr);
/* ??? Save/restore. */
diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c
index 69fb85db3e..a5cd16389e 100644
--- a/hw/stellaris_enet.c
+++ b/hw/stellaris_enet.c
@@ -397,7 +397,7 @@ void stellaris_enet_init(NICInfo *nd, uint32_t base, qemu_irq irq)
memcpy(s->macaddr, nd->macaddr, 6);
if (nd->vlan) {
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
stellaris_enet_receive, stellaris_enet_can_receive, s);
qemu_format_nic_info_str(s->vc, s->macaddr);
}
diff --git a/hw/usb-net.c b/hw/usb-net.c
index 5539336dc8..c49fd62a41 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1453,7 +1453,7 @@ USBDevice *usb_net_init(NICInfo *nd)
pstrcpy(s->dev.devname, sizeof(s->dev.devname),
"QEMU USB Network Interface");
- s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
usbnet_receive, usbnet_can_receive, s);
qemu_format_nic_info_str(s->vc, s->mac);
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index b197c70a75..4443ff574d 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -315,7 +315,7 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
n->rx_vq = virtio_add_queue(&n->vdev, 256, virtio_net_handle_rx);
n->tx_vq = virtio_add_queue(&n->vdev, 256, virtio_net_handle_tx);
memcpy(n->mac, nd->macaddr, 6);
- n->vc = qemu_new_vlan_client(nd->vlan, nd->model,
+ n->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
virtio_net_receive, virtio_net_can_receive, n);
qemu_format_nic_info_str(n->vc, n->mac);