Statistics
| Branch: | Revision:

root / net.c @ 31a32289

History | View | Annotate | Download (26.2 kB)

# Date Author Comment
645c9496 11/01/2012 12:05 pm Stefan Hajnoczi

net: Reject non-netdevs in qmp_netdev_del()

The netdev_del command crashes when given a -net device, because it
calls qemu_opts_del(NULL).

Check that this is a -netdev before attempting to delete it and the
QemuOpts.

Note the subtle change from qemu_find_opts_err("netdev", errp) to...

a245fc18 10/08/2012 02:59 pm Paolo Bonzini

net: consolidate NetClientState header files into one

This patch doesn't seem much useful alone, I must admit. However,
it makes sense as part of the upcoming directory reorganization,
where I want to have include/net/tap.h as the net<->hw interface
for tap. Then having both net/tap.h and include/net/tap.h does...

c67f5dc1 09/14/2012 10:40 am Stefan Hajnoczi

net: add receive_disabled logic to iov delivery path

This patch adds the missing NetClient->receive_disabled logic in the
sendv delivery code path. It seems that commit
893379efd0e1b84ceb0c42a713293f3dbd27b1bd ("net: disable receiving if
client returns zero") only added the logic to qemu_deliver_packet() and...

987a9b48 09/14/2012 10:40 am Paolo Bonzini

net: notify iothread after flushing queue

virtio-net has code to flush the queue and notify the iothread
whenever new receive buffers are added by the guest. That is
fine, and indeed we need to do the same in all other drivers.
However, notifying the iothread should be work for the network...

a96ed02f 09/07/2012 09:15 am Nicholas Bellinger

monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param

This patch renames+moves the net_handle_fd_param() caller used to
obtain a file descriptor from either qemu_parse_fd() (the normal case)
or from monitor_get_fd() (migration case) into a generically prefixed...

f57fb884 08/03/2012 09:54 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/net' into staging

  • stefanha/net:
    net: add the support for -netdev socket, listen
    net: fix the coding style
    hub: add the support for hub own flow control
    net: determine if packets can be sent before net queue deliver packets...
c8057f95 08/02/2012 09:16 pm Peter Maydell

Support 'help' as a synonym for '?' in command line options

For command line options which permit '?' meaning 'please list the
permitted values', add support for 'help' as a synonym, by abstracting
the check out into a helper function.

This change means that in some cases where we were being lazy in...

1a859593 08/01/2012 03:32 pm Zhi Yong Wu

net: Make "info network" output more readable info

Reviewed-by: Jan Kiszka <>
Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Laszlo Ersek <>

86a77c38 08/01/2012 03:32 pm Zhi Yong Wu

net: cleanup deliver/deliver_iov func pointers

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Laszlo Ersek <>

94878994 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename non_vlan_clients to net_clients

There is no longer a distinction between vlan clients and non-vlan
clients in the net core. The net core only knows about point-to-point
clients which are connected to a peer. It's time to rename the global
list of net clients since it no longer refers to vlans at all....

4e68f7a0 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename VLANClientState to NetClientState

The vlan feature is no longer part of net core. Rename VLANClientState
to NetClientState because net clients are not explicitly associated with
a vlan at all, instead they have a peer net client to which they are...

35277d14 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename vc local variables to nc

Now that VLANClientState has been renamed to NetClientState all 'vc'
local variables should be 'nc'. Much of the code already used 'nc' but
there are places where 'vc' needs to be renamed.

Signed-off-by: Stefan Hajnoczi <>...

b20c6b9e 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename qemu_del_vlan_client() to qemu_del_net_client()

Another step in moving the vlan feature out of net core. Users only
deal with NetClientState and therefore qemu_del_vlan_client() should be
named qemu_del_net_client().

Signed-off-by: Stefan Hajnoczi <>...

a005d073 08/01/2012 02:56 pm Stefan Hajnoczi

net: Remove VLANState

VLANState is no longer used and can be removed.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Zhi Yong Wu <>
Reviewed-by: Laszlo Ersek <>

f6c874e3 08/01/2012 02:28 pm Stefan Hajnoczi

net: Add a hub net client

The vlan feature can be implemented in terms of hubs. By introducing a
hub net client it becomes possible to remove the special case vlan code
from net.c and push the vlan feature out of generic networking code.

Signed-off-by: Stefan Hajnoczi <>...

d33d93b2 08/01/2012 02:28 pm Stefan Hajnoczi

net: Use hubs for the vlan feature

Stop using the special-case vlan code in net.c. Instead use the hub net
client to implement the vlan feature. The next patch will remove vlan
code from net.c completely.

Signed-off-by: Stefan Hajnoczi <>...

90d87a33 08/01/2012 02:28 pm Stefan Hajnoczi

net: Look up 'vlan' net clients using hubs

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Zhi Yong Wu <>
Reviewed-by: Laszlo Ersek <>

81017645 08/01/2012 02:28 pm Stefan Hajnoczi

hub: Check that hubs are configured correctly

Checks can be performed to make sure that hubs have at least one NIC and
one host device, warning the user if this is not the case.
Configurations which do not meet this rule tend to be broken but just
emit a warning. This patch preserves compatibility with the checks...

ab5f3f84 08/01/2012 02:28 pm Stefan Hajnoczi

net: Drop vlan argument to qemu_new_net_client()

Since hubs are now used to implement the 'vlan' feature and the vlan
argument is always NULL, remove the argument entirely and update all net
clients that use qemu_new_net_client().

Signed-off-by: Stefan Hajnoczi <>...

ec8b1f6c 08/01/2012 02:28 pm Stefan Hajnoczi

net: Remove vlan code from net.c

The vlan implementation in net.c has been replaced by hubs so we can
remove the code.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Zhi Yong Wu <>
Reviewed-by: Laszlo Ersek <>

2be64a68 07/23/2012 01:55 pm Laszlo Ersek

hw, net: "net_client_type" -> "NetClientOptionsKind" (qapi-generated)

NET_CLIENT_TYPE_ -> NET_CLIENT_OPTIONS_KIND_

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Stefan Hajnoczi <>

6687b79d 07/23/2012 01:55 pm Laszlo Ersek

convert net_client_init() to OptsVisitor

The net_client_init() prototype is kept intact.

Based on "is_netdev", the QemuOpts-rooted QemuOpt-list is parsed as a
Netdev or a NetLegacy. The original meat of net_client_init() is moved to
and simplified in net_client_init1():...

2456f36f 07/23/2012 01:55 pm Laszlo Ersek

convert net_init_nic() to NetClientOptions

v1->v2:
- NetLegacyNicOptions::vectors is of type uint32

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Stefan Hajnoczi <>

1a0c0958 07/23/2012 01:55 pm Laszlo Ersek

remove unused QemuOpts parameter from net init functions

v1->v2:
- unchanged

v2->v3:
- keep "qemu-option.h" included in "net/slirp.h"

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Stefan Hajnoczi <>

dcf6f5e1 06/07/2012 07:43 pm Michael Tokarev

change iov_* function prototypes to be more appropriate

Reorder arguments to be more natural, readable and
consistent with other iov_* functions, and change
argument names, from:
iov_from_buf(iov, iov_cnt, buf, iov_off, size)
to
iov_from_buf(iov, iov_cnt, offset, buf, bytes)...

42dcc547 06/04/2012 07:49 pm Luiz Capitulino

net: purge the monitor object from all init functions

The only backend that really uses it is the socket one, which calls
monitor_get_fd(). But it can use 'cur_mon' instead.

Signed-off-by: Luiz Capitulino <>
Reviewed-By: Laszlo Ersek <>

4559a1db 06/04/2012 07:49 pm Luiz Capitulino

net: net_client_init(): use error_set()

Callers are changed to use qerror_report_err() to keep their QError
semantics.

Signed-off-by: Luiz Capitulino <>
Reviewed-By: Laszlo Ersek <>

928059a3 06/04/2012 07:49 pm Luiz Capitulino

qapi: convert netdev_add

This is not a full QAPI conversion, but an intermediate step.

In essence, do_netdev_add() is split into three functions:

1. netdev_add(): performs the actual work. This function is fully
converted to Error (thus, it's "qapi-friendly")...
5f964155 06/04/2012 07:49 pm Luiz Capitulino

qapi: convert netdev_del

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>
Reviewed-By: Laszlo Ersek <>

29952866 06/04/2012 07:49 pm Luiz Capitulino

qemu-option: qemu_opts_validate(): use error_set()

net_client_init() propagates the error up by calling qerror_report_err(),
because its users expect QError semantics.

Signed-off-by: Luiz Capitulino <>
Reviewed-By: Laszlo Ersek <>

4e89978e 06/04/2012 07:49 pm Luiz Capitulino

qemu-option: qemu_opts_from_qdict(): use error_set()

do_device_add() and do_netdev_add() call qerror_report_err() to maintain
their QError semantics.

Signed-off-by: Luiz Capitulino <>
Reviewed-By: Laszlo Ersek <>

7fc8d918 03/16/2012 01:04 am Jason Wang

net: move compute_mcast_idx() to net.h

Reduce duplicated codes.

Signed-off-by: Jason Wang <>
Signed-off-by: Michael S. Tsirkin <>

2944e4ec 02/04/2012 01:49 pm Stefan Weil

w32: Fix build with new net bridge code

Commit a7c36ee4920ea3acc227a0248dd161693f207357 added code for a net
bridge and explicitly said that "this is very Linux centric".

Indeed, compilation failed for w32, so the bridge code is now
conditional. Hosts which don't support it can simply remove the...

a7c36ee4 02/02/2012 12:24 am Corey Bryant

Add support for net bridge

The most common use of -net tap is to connect a tap device to a bridge. This
requires the use of a script and running qemu as root in order to allocate a
tap device to pass to the script.

This model is great for portability and flexibility but it's incredibly...

0e0e7fac 01/12/2012 06:34 pm Benjamin

Support for UDP unicast network backend

Signed-off-by: Benjamin MARSILI <>
Signed-off-by: Anthony Liguori <>

4b37156c 12/06/2011 03:40 pm Luiz Capitulino

qapi: Convert set_link

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

443916d1 11/01/2011 11:52 pm Stefan Berger

Move filedescriptor parsing code from net.c into qemu_parse_fd()

Move the parsing of a filedescriptor into a common function
qemu_parse_fd() so others can use it as well. Have net.c call this
function.

v2:
- moving qemu_parse_fd into cutils.c

Signed-off-by: Stefan Berger <>...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

81e34a24 08/05/2011 01:15 am Anthony Liguori

Merge remote-tracking branch 'mst/for_anthony' into staging

19061e63 07/23/2011 06:19 pm Jan Kiszka

net: Improve layout of 'info network'

Improve the layout when listing non-vlan clients via 'info network'. The
result looks like this:

(qemu) info network
Devices not on any VLAN:
orphan: net=10.0.2.0, restricted=n
virtio-net-pci.0: model=virtio-net-pci,macaddr=52:54:00:12:34:56...

6f7b3b1b 07/23/2011 06:19 pm Jan Kiszka

net: Refactor net_client_types

Position entries of net_client_types according to the corresponding
values of NET_CLIENT_TYPE_*. The array size is now defined by
NET_CLIENT_TYPE_MAX. This will allow to obtain entries based on type
value in later patches.
...

44e798d3 07/23/2011 06:19 pm Jan Kiszka

net: Dump client type 'info network'

Include the client type name into the output of 'info network'. The
result looks like this:

(qemu) info network
VLAN 0 devices:
rtl8139.0: type=nic,model=rtl8139,macaddr=52:54:00:12:34:57
Devices not on any VLAN:
virtio-net-pci.0: type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56...

6eed1856 07/23/2011 06:19 pm Jan Kiszka

net: Consistently use qemu_macaddr_default_if_unset

Drop the open-coded MAC assignment from net_init_nic and replace it with
standard qemu_macaddr_default_if_unset which is also used by qdev. That
avoid creating colliding MACs when instantiating NICs via different...

53e51d85 07/19/2011 03:11 pm Markus Armbruster

Fix automatically assigned network names for netdev

If a network client doesn't have a name, we make one up, with
assign_name(). assign_name() creates a name MODEL.NUM, where MODEL is
the client's model, and NUM is the number of MODELs that already
exist....

85dde9a9 07/19/2011 03:11 pm Markus Armbruster

Fix netdev name lookup in -device, device_add, netdev_del

qemu_find_netdev() looks up members of non_vlan_clients by name. It
happily returns the first match. Trouble is the names need not be
unique.

non_vlan_clients contains host parts (netdevs) and guest parts (NICs)....

6daf194d 06/24/2011 11:13 am Markus Armbruster

Strip trailing '\n' from error_report()'s first argument

error_report() prepends location, and appends a newline. The message
constructed from the arguments should not contain a newline. Fix the
obvious offenders.

Signed-off-by: Markus Armbruster <>...

48e2faf2 06/22/2011 03:18 pm Peter Maydell

net: Warn about "-net nic" options which were ignored

Diagnose the case where the user asked for a NIC via "-net nic"
but the board didn't instantiate that NIC (for example where the
user asked for two NICs but the board only supports one). Note
that this diagnostic doesn't apply to NICs created through -device,...

1d66f170 06/22/2011 03:18 pm Peter Maydell

Revert "net: Improve the warnings for dubious command line option combinations"

This reverts commit f68b9d672b90dedc79aeb9b44607f484dbe46a6b.
That attempt at diagnosing unused -net nic options failed to account
for NICs created via -device; back it out cleanly in preparation...

641f6eae 06/22/2011 03:18 pm Peter Maydell

net: Don't warn about the default network setup

Don't warn about the default network setup that you get if no command line
-net options are specified. There are two cases that we would otherwise
complain about:

(1) board doesn't support a NIC but the implicit "-net nic" requested one...

a08784dd 04/15/2011 09:25 pm Blue Swirl

Remove unused sysemu.h include directives

Remove unused sysemu.h include directives to speed up build
with the following patches.

Signed-off-by: Blue Swirl <>

f68b9d67 04/01/2011 11:53 pm Peter Maydell

net: Improve the warnings for dubious command line option combinations

Improve the warnings we give if the user specified a combination of -net
options which don't make much sense: * Don't warn about anything if the config is the implicit default
"-net user -net nic" rather than one specified by the user (this will...

ac60cc18 04/01/2011 11:32 pm Tristan Gingold

Fix net_check_clients warnings: make it per vlan.

Signed-off-by: Tristan Gingold <>
Reviewed-by: Markus Armbruster <>
Signed-off-by: Aurelien Jarno <>

96c94b29 03/06/2011 09:15 pm Jason Wang

net: Add the missing option declaration of "vhostforce"

Signed-off-by: Jason Wang <>
Acked-by: Michael S. Tsirkin <>
Signed-off-by: Aurelien Jarno <>

85bb6d36 03/06/2011 09:06 pm Juan Quintela

net: remove parse_host_src_port() function

It was deprecated, and it has no users.

Signed-off-by: Juan Quintela <>
Signed-off-by: Aurelien Jarno <>

ce053661 03/06/2011 08:29 pm Benjamin Poirier

net: Use iov helper functions

Signed-off-by: Benjamin Poirier <>
Reviewed-by: Stefan Hajnoczi <>
Acked-by: Jason Wang <>
Signed-off-by: Aurelien Jarno <>

60c07d93 03/05/2011 02:00 pm Vincent Palatin

net: fix qemu_can_send_packet logic

If any of the clients is not ready to receive (ie it has a can_receive
callback and can_receive() returns false), we don't want to start
sending, else this client may miss/discard the packet.

I got this behaviour with the following setup :...

ab1cbe1c 02/20/2011 07:05 pm Michael S. Tsirkin

net: notify peer about link status change

qemu makes it possible to disable link at tap which is not communicated
to the guest but causes all packets to be dropped.

This works for virtio userspace, as qemu stops giving it packets, but
not for virtio-net connected to vhost-net as that does not get notified...

3a75e74c 12/09/2010 12:45 pm Mike Ryan

net/sock: option to specify local address

Add an option to specify the host IP to send multicast packets from,
when using a multicast socket for networking. The option takes an IP
address and sets the IP_MULTICAST_IF socket option, which causes the
packets to use that IP's interface as an egress....

f7c31d63 10/27/2010 07:54 pm Jason Wang

net: properly handle illegal fd/vhostfd from command line

When hanlding fd/vhostfd form command line through net_handle_fd_param(),
we need to check mon and return value of strtol() otherwise we could
get segmentation fault or invalid fd when user type an illegal fd/vhostfd....

a083a89d 10/06/2010 07:24 pm Michael S. Tsirkin

net: delay freeing peer host device

With -netdev, virtio devices present offload
features to guest, depending on the backend used.
Thus, removing host netdev peer while guest is
active leads to guest-visible inconsistency and/or crashes.

As a solution, while guest (NIC) peer device exists,...

3329f07b 08/23/2010 01:11 am Gerd Hoffmann

QemuOpts: make most qemu_*_opts static

Switch tree to lookup-by-name using qemu_find_opts().
Also hook up virtfs options so qemu_find_opts works for them too.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

410cbafe 07/01/2010 08:27 pm Yoshiaki Tamura

net: delete QemuOpts when net_client_init() fails.

This fixes the following scenario using QMP.

First, put a bogus argument "foo" to "type", which results in an error. {"execute": "netdev_add", "arguments": { "type": "foo", "id": "netdev1" } }
Then, call it again with correct argument "user"....

03c71553 06/30/2010 11:35 pm Amit Shah

net: Fix VM start with '-net none'

Commit 50e32ea8f31035877decc10f1075aa0e619e09cb changed the behaviour
for the return type of net_client_init() when a nic type with no init
method was specified. 'none' is one such nic type. Instead of returning
0, which gets interpreted as an index into the nd_table[] array, we...

2ffcb18d 06/14/2010 07:12 pm Markus Armbruster

Make netdev_del delete the netdev even when it's in use

To hot-unplug guest and host part of a network device, you do:

device_del NIC-ID
netdev_del NETDEV-ID

For PCI devices, device_del merely tells ACPI to unplug the device.
The device goes away for real only after the guest processed the ACPI...

60a3992e 06/10/2010 05:21 pm Anthony Liguori

Merge remote branch 'mst/for_anthony' into staging

50e32ea8 06/09/2010 12:58 pm Amit Shah

net: Fix hotplug with pci_add

The correct model type wasn't getting added when hotplugging nics with
pci_add.

Testcase: start VM with default nic type. In the qemu_monitor:

(qemu) pci_add auto nic model=virtio

This results in a nic hot-plug of the same nic type as the default....

637503d1 06/01/2010 09:48 pm Luiz Capitulino

Monitor: Drop QMP documentation from code

Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.

While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we...

c9b26a4c 04/19/2010 12:55 am Markus Armbruster

monitor: Use argument type 'b' for set_link

Second argument is now "on" or "off" instead of "up" or "down".

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

5369e3c0 04/19/2010 12:55 am Markus Armbruster

monitor: Convert do_set_link() to QObject, QError

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

ae82d324 04/19/2010 12:55 am Markus Armbruster

monitor: New commands netdev_add, netdev_del

Monitor commands to go with -netdev.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

c389c43e 04/19/2010 12:46 am Markus Armbruster

error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()

Both functions report errors nicely enough now, no need for additional
messages.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

5294e2c7 04/19/2010 12:46 am Markus Armbruster

error: Convert net_client_init() to QError

The conversion is shallow: client type init() methods aren't
converted. Converting them is a big job for relatively little
practical benefit, so leave it for later.

Signed-off-by: Markus Armbruster <>...

da1fcfda 04/10/2010 03:09 am Eduardo Habkost

net: remove broken net_set_boot_mask() boot device validation

There are many problems with net_set_boot_mask():

1) It is broken when using the device model instead of "-net nic". Example:
$ qemu-system-x86_64 -device rtl8139,vlan=0,id=net0,mac=52:54:00:82:41:fd,bus=pci.0,addr=0x4 -net user,vlan=0,name=hostnet0 -vnc 0.0.0.0:0 -boot n...

c2564608 04/10/2010 03:09 am Eduardo Habkost

net: remove NICInfo.bootable field

It is just set by net_set_boot_mask() and never used. The logic for rom loading
changed a lot since this field was introduced. It is not needed anymore.

Signed-off-by: Eduardo Habkost <>
Acked-by: Juan Quintela <>...

82b0d80e 04/01/2010 09:56 pm Michael S. Tsirkin

tap: add vhost/vhostfd options

This adds vhost binary option to tap, to enable vhost net accelerator.
Default is off for now, we'll be able to make default on long term
when we know it's stable.

vhostfd option can be used by management, to pass in the fd. Assigning...

8212c64f 03/16/2010 06:45 pm Markus Armbruster

qemu-option: Move the implied first name into QemuOptsList

We sometimes permit omitting the first option name, for example
-device foo is short for -device driver=foo. The name to use
("driver" in the example) is passed as argument to qemu_opts_parse()....

1ecda02b 03/16/2010 05:58 pm Markus Armbruster

error: Replace qemu_error() by error_report()

error_report() terminates the message with a newline. Strip it it
from its arguments.

This fixes a few error messages lacking a newline:
net_handle_fd_param()'s "No file descriptor named %s found", and
tap_open()'s "vnet_hdr=1 requested, but no kernel support for...

27f3f8a3 03/09/2010 04:47 pm Markus Armbruster

qdev: Catch attempt to attach more than one device to a netdev

Guest device and host netdev are peers, i.e. it's a 1:1 relation.
However, we fail to enforce that:

$ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0 -monitor stdio...
75422b0d 03/08/2010 07:30 pm Amit Shah

qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors

net.c used a constant to signify no MSI vectors were specified. Extend
that to all qdev devices.

Signed-off-by: Amit Shah <>
Reported-by: "Michael S. Tsirkin" <>...

238431a9 02/21/2010 06:01 pm Blue Swirl

Allow const QemuOptDesc

Signed-off-by: Blue Swirl <>

64e69d50 02/20/2010 10:20 am Blue Swirl

Fix warning on OpenBSD

/src/qemu/net.c: In function `net_check_clients':
/src/qemu/net.c:1287: warning: `has_nic' might be used uninitialized in this function
/src/qemu/net.c:1287: warning: `has_host_dev' might be used uninitialized in this function

Signed-off-by: Blue Swirl <>

efe32fdd 02/19/2010 08:12 pm Markus Armbruster

net: net_check_clients() checks only VLAN clients, fix

Clients not associated with a VLAN exist since commit d80b9fc6.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

a0104e0e 02/19/2010 08:12 pm Markus Armbruster

net: info network shows only VLAN clients, fix

Clients not associated with a VLAN exist since commit d80b9fc6.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

2583ba97 02/19/2010 08:12 pm Markus Armbruster

net: Monitor command set_link finds only VLAN clients, fix

Clients not associated with a VLAN exist since commit d80b9fc6.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

7f76abe1 02/19/2010 08:12 pm Markus Armbruster

net: Remove unused net_client_uninit()

Unused since commit 9ad4531e.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

668680f7 02/19/2010 08:12 pm Markus Armbruster

net: net_check_clients() runs too early to see -device, fix

Call it right after -device devices get created.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

62112d18 02/19/2010 08:12 pm Markus Armbruster

net: Fix bogus "Warning: vlan 0 with no nics" with -device

net_check_clients() prints this when an VLAN has host devices, but no
guest devices. It uses VLANState members nb_guest_devs and
nb_host_devs to keep track of these devices. However, -device does...

6265eb26 02/10/2010 10:00 pm Jim Meyering

don't dereference NULL after failed strdup

Most of these are obvious NULL-deref bug fixes, for example,
the ones in these files:

block/curl.c
net.c
slirp/misc.c

and the first one in block/vvfat.c.
The others in block/vvfat.c may not lead to an immediate segfault, but I...

cb4522cc 12/12/2009 03:59 pm Gerd Hoffmann

default devices: network

Add a default_net variable which specified whenever a default network
should be created. It is cleared in case any -net option is specified
and it is also added to the new -nodefaults switch.

Signed-off-by: Gerd Hoffmann <>...

57f9ef17 12/03/2009 05:41 pm Mark McLoughlin

net: add qemu_foreach_nic()

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

0f2fbf40 12/03/2009 05:41 pm Mark McLoughlin

net: print correct error for '-netdev ""'

Reported-by: Markus Armbruster <>
Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

f1d078c3 12/03/2009 05:41 pm Mark McLoughlin

net: move parse_macaddr() to net/util.[ch]

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

68da46ee 12/03/2009 05:41 pm Mark McLoughlin

net: remove qemu_new_vlan_client()

... and VLANClientState::opaque and qemu_find_vlan_client().

All of these are now unused

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

665a3b07 12/03/2009 05:41 pm Mark McLoughlin

net: remove VLANClientState members now in NetClientInfo

Add a NetClientInfo pointer to VLANClientState and use that
for the typecode and function pointers.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

ebef2c09 12/03/2009 05:41 pm Mark McLoughlin

net: introduce NICState and qemu_new_nic()

Common state for all NICs.

The opaque member will replace the opaque member in VLANClientState
since only NICs need it.

The conf member will allow us to iterate over NICs, access the MAC
addr for the NIC and send a packet from each NIC in qemu_announce_self()....

45460d1a 12/03/2009 05:41 pm Mark McLoughlin

net: introduce qemu_new_net_client()

A replacement for qemu_new_vlan_client(), using NetClientInfo to
replace most arguments.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

5c361cc3 12/03/2009 05:41 pm Mark McLoughlin

net: move vde code from net.c to net/vde.c

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

42281ac9 12/03/2009 05:41 pm Mark McLoughlin

net: move socket backend code from net.c to net/socket.c

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

1abecf77 12/03/2009 05:41 pm Mark McLoughlin

net: move dump backend code from net.c to net/dump.c

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

1df49e04 12/03/2009 05:41 pm Mark McLoughlin

net: clean up includes in net.c

This is probably a little drastic, but the includes in this file are
now totally out of control when compared with what includes are
actually needed.

This may break the build on e.g. *BSD, but it will be easily fixed by
re-instating an include....