Statistics
| Branch: | Revision:

root / net.c @ 72cf2d4f

History | View | Annotate | Download (79.9 kB)

# Date Author Comment
72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

6ee093c9 09/11/2009 06:19 pm Juan Quintela

Unexport ticks_per_sec variable. Create get_ticks_per_sec() function

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

f40d7537 09/04/2009 08:47 pm Blue Swirl

Include sys-queue.h early to override system queue definitions on BSD

Signed-off-by: Blue Swirl <>

f18c16de 09/04/2009 05:37 pm Luiz Capitulino

monitor: Port handler_2 to use QDict

This commit ports command handlers that receive two arguments to use
the new monitor's dictionary.

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

1d4daa91 09/04/2009 05:37 pm Luiz Capitulino

monitor: Port handler_3 to use QDict

This commit ports command handlers that receive three arguments to use
the new monitor's dictionary.

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

9da43187 09/04/2009 05:37 pm Jan Kiszka

net: Fix send queue ordering

Ensure that packets enqueued for delayed delivery are dequeued in FIFO
order. At least one simplistic guest TCP/IP stack became unhappy due to
sporadically reordered packet streams.

At this chance, switch the send queue implementation to TAILQ....

7dc3fa09 08/24/2009 04:01 pm Stefan Weil

Add missing linefeed in error message

The error message for an unknown network device given to
monitor command set_link looks better with a terminating
linefeed.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

c3cf0d3f 08/10/2009 09:05 pm Luiz Capitulino

net: Fix do_set_link() return type

do_set_link() returns int, but Monitor handler functions should
always return void.

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

71e72a19 07/27/2009 10:09 pm Juan Quintela

rename HOST_BSD to CONFIG_BSD

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

8fde6546 07/27/2009 10:09 pm Filip Navara

Remove useless Win32 include files and unused function in net.c.

Signed-off-by: Filip Navara <>
Signed-off-by: Anthony Liguori <>

bb53fc53 07/27/2009 10:08 pm Jan Kiszka

slirp: Fix guestfwd for incoming data

Unless a virtual server address was explicitly defined (which is
impossible with the legacy net channel format), guestfwd did not
properly forwarded host
>guest packets. This patch fixes it.

Signed-off-by: Jan Kiszka <>...

c1d6eed7 07/27/2009 04:39 pm Mark McLoughlin

Add support for fd=name to tap and socket networking

This allows a program to initialize a host networking device using a
file descriptor passed over a unix monitor socket.

The program must first pass the file descriptor using SCM_RIGHTS
ancillary data with the getfd monitor command. It then may do...

eb54b6dc 07/17/2009 01:28 am Gerd Hoffmann

qdev: add id= support for pci nics.

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

8389e7f4 07/16/2009 04:28 pm Anthony Liguori

slirp: Fix default netmask to 255.255.255.0

This got broken between a13a4126c8 and c92ef6a22d: old slirp code used
255.255.255.0.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

d026fb6d 07/10/2009 12:58 am Mark McLoughlin

Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied

If no tap,sndbuf= arg is supplied, we use a default value. If
TUNSETSNDBUF fails in this case, we should not abort.

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

fc5b81d1 07/10/2009 12:06 am Mark McLoughlin

net: set a default value for sndbuf=

On reflection, perhaps it does make sense to set a default value for
the sndbuf= tap parameter.

For best effect, sndbuf= should be set to just below the capacity of
the physical NIC.

Setting it higher will cause packets to be dropped before the limit...

3da6abd4 07/01/2009 11:29 pm Blue Swirl

Use pstrcpy and pstrcat to avoid OpenBSD linker warning

Signed-off-by: Blue Swirl <>

fc57bc57 06/29/2009 04:52 pm Jan Kiszka

slirp: Basic VLAN client info_str

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

b1c99fcd 06/29/2009 04:52 pm Jan Kiszka

slirp: Enable multiple instances

Once again this was a long journey to reach the destination: Allow to
instantiate slirp multiple times. But as in the past, the journey was
worthwhile, cleaning up, fixing and enhancing various parts of the user
space network stack along the way....

09c18925 06/29/2009 04:52 pm Jan Kiszka

slirp: Use shell to erase smb directory

Instead of open-coding this, we can use the power of the shell to remove
the smb_dir on exit.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

492efabd 06/29/2009 04:52 pm Jan Kiszka

slirp: Improve error handling in slirp_smb

Make sure for invocations from the monitor that slirp_smb properly
reports errors and doesn't terminate qemu.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

28432466 06/29/2009 04:52 pm Jan Kiszka

slirp: Enable multi-instance support for the smb service

Push the smb state, smb_dir, into SlirpState and construct it in a way
that allows multiple smb instances (one per slirp stack). Remove the smb
directory on slirp cleanup instead of qemu termination. As VLAN clients...

1a609520 06/29/2009 04:52 pm Jan Kiszka

net: Provide VLAN client lookup helper

Introduce qemu_find_vlan_client_by_name for VLANClientState lookup based
on VLAN ID and client name. This is useful for monitor commands.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

f13b572c 06/29/2009 04:52 pm Jan Kiszka

slirp: Make hostfwd_add/remove multi-instance-aware

Extend the syntax of hostfwd_add/remove to optionally take a tuple of
VLAN ID and slirp stack name. If those are omitted, the commands will
continue to work on the first registered slirp stack.

Signed-off-by: Jan Kiszka <>...

d918f23e 06/29/2009 04:52 pm Jan Kiszka

slirp: Kill slirp_is_inited

Avoid the need for slirp_is_inited by refactoring the protected
slirp_select_* functions. This also avoids the clearing of all fd sets
on select errors.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

d6cf84e1 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop redundant checks from slirp_output

Slirp doesn't invoke slirp[_can]_output before it is initialized. The
motivation for these checks (3b7f5d479c) no longer applies. So drop
them.

Note: slirp_vc will become invalid if the slirp stack is removed during...

9f8bd042 06/29/2009 04:52 pm Jan Kiszka

slirp: Use internal state in interface

This now also exports the internal state to the slirp users in qemu,
returning it from slirp_init and expecting it along with service
invocations. Additionally provide an opaque value interface for the
callbacks from slirp into the qemu core....

ad0d8c4c 06/29/2009 04:52 pm Jan Kiszka

slirp: Allocate/free stack instance dynamically

Allocate the internal slirp state dynamically and provide and call
slirp_cleanup to properly release it after use. This patch finally
unbreaks slirp release and re-instantiation via host_net_* monitor
commands....

9c12a6f2 06/29/2009 04:52 pm Jan Kiszka

slirp: Do not allow to remove non-hostfwd sockets

Prevent that the users accidentally shoots down dynamic sockets. This
allows to remove looping for removals as there can now only be one
match.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

6dbe553f 06/29/2009 04:52 pm Jan Kiszka

slirp: Add info usernet for dumping connection states

Break out sockstats from the slirp statistics and present them under the
new info category "usernet". This patch also improves the current output
/wrt proper reporting connection source and destination....

0fe6a7f2 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop statistic code

As agreed on the mailing list, there is no interest in keeping the
usually disabled slirp statistics in the tree. So this patch removes
them.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

c92ef6a2 06/29/2009 04:52 pm Jan Kiszka

slirp: Rework external configuration interface

With the internal IP configuration made more flexible, we can now
enhance the user interface. This patch adds a number of new options to
"-net user": net (address and mask), host, dhcpstart, dns and smbserver....

f3546deb 06/29/2009 04:52 pm Jan Kiszka

slirp: Rework monitor commands for host forwarding

Improve the monitor interface for adding and removing host forwarding
rules by splitting it up in two commands and rename them to hostfwd_add
and hostfwd_remove. Also split up the paths taken for legacy -redir...

3c6a0580 06/29/2009 04:52 pm Jan Kiszka

slirp: Bind support for host forwarding rules

Extend the hostfwd rule format so that the user can specify on which
host interface qemu should listen for incoming connections. If omitted,
binding will takes place against all interfaces.

Signed-off-by: Jan Kiszka <>...

e15f4a99 06/29/2009 04:52 pm Jan Kiszka

Revert "User networking: Show active connections"

This reverts commit 1c6ed9f3379faac83da0ed3e95cbd49003ac0dd1.

It's redundant to slirp statistics, which are going to be split up /
reworked later on.

Conflicts:

monitor.c
net.c

Signed-off-by: Jan Kiszka <>...

ad196a9d 06/29/2009 04:52 pm Jan Kiszka

slirp: Move smb, redir, tftp and bootp parameters and -net channel

So far a couple of slirp-related parameters were expressed via
stand-alone command line options. This it inconsistent and unintuitive.
Moreover, it prevents both dynamically reconfigured (host_net_add/...

ffe6370c 06/24/2009 05:09 pm Michael S. Tsirkin

qemu/net: flag to control the number of vectors a nic has

Add an option to specify the number of MSI-X vectors for PCI NIC cards. This
can also be used to disable MSI-X, for compatibility with old qemu. This
option currently only affects virtio cards.

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

8cad5516 06/22/2009 06:15 pm Mark McLoughlin

net: add qemu_purge_queued_packets()

If net client sends packets asynchronously, it needs to purge its queued
packets in cleanup() so as to prevent sent callbacks being invoked with
a freed client.

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

b9adce2c 06/22/2009 06:15 pm Mark McLoughlin

net: purge queued packets in tap_cleanup()

If tap has any packets queued at host_net_remove time, it needs to purge
them in order to prevent a sent callback being invoked for it.

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

b664e367 06/22/2009 06:15 pm Mark McLoughlin

net: add tap_read_poll() helper

Add a helper to enable/disable the read polling on tapfd.

We need this, because we want to start write polling on the tapfd too
and enable/disable both types of polling independently.

Signed-off-by: Mark McLoughlin <>...

1f7babf6 06/22/2009 06:15 pm Mark McLoughlin

net: handle EAGAIN from tapfd write()

If a write() on tapfd returns EAGAIN, return zero so that the packet
gets queued (in the case of async send) and enable polling tapfd for
writing.

When tapfd becomes writable, disable write polling and flush any queued...

4a77b25e 06/22/2009 06:15 pm Mark McLoughlin

net: return TAPState from net_tap_init()

net_tap_fd_init() already returns TAPState, so this is a sensible
cleanup in its own right.

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

0df0ff6d 06/22/2009 06:15 pm Mark McLoughlin

net: add '-net tap,sndbuf=nbytes'

2.6.30 adds a new TUNSETSNDBUF ioctl() which allows a send buffer limit
for the tap device to be specified. When this limit is reached, a tap
write() will return EAGAIN and poll() will indicate the fd isn't
writable.

This allows people to tune their setups so as to avoid e.g. UDP packet...

783527a9 06/22/2009 06:15 pm Mark McLoughlin

net: add packet length to NetPacketSent callback

virtio-net needs this - for the same purpose that it currently uses the
return value from qemu_sendv_packet().

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

5607c388 06/22/2009 06:15 pm Markus Armbruster

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....

406c8df3 06/22/2009 06:10 pm Glauber Costa

Make nic option rom loading less painful.

The code how it is today, is totally painful to read and keep.
To begin with, the code is duplicated with the option rom loading
code that linux_boot and vga are already using.

This patch introduces a "bootable" state in NICInfo structure,...

024431b3 06/22/2009 06:10 pm Filip Navara

Add O_BINARY to open call in net_dump_init.

Fix the pcap dumps on Win32 and other systems where O_BINARY is required.

Signed-off-by: Filip Navara <>
Signed-off-by: Anthony Liguori <>

70503264 06/13/2009 02:22 pm Stefan Weil

Win32: Don't remove const attribute in type casts.

Type casts removing the const attribute are bad because
they hide the fact that the argument remains const.

They also result in a compiler warning (at least with MS-C).

Signed-off-by: Stefan Weil <>

c5b76b38 06/13/2009 11:44 am Blue Swirl

Fix mingw32 build warnings

Work around buffer and ioctlsocket argument type signedness problems
Suppress a prototype which is unused on mingw32
Expand a macro to avoid warnings from some GCC versions

Signed-off-by: Blue Swirl <>

068daedd 06/11/2009 04:24 am Anthony Liguori

Fix build breakage when using VDE introduced by 4f1c942

Signed-off-by: Anthony Liguori <>

3e021d40 06/09/2009 01:38 pm Mark McLoughlin

net: return status from qemu_deliver_packet()

Will allow qemu_send_packet() handle queue full condition.

Signed-off-by: Mark McLoughlin <>

e94667b9 06/09/2009 01:38 pm Mark McLoughlin

net: split out packet queueing and flushing into separate functions

We'll be doing more packet queueing in later commits.

Signed-off-by: Mark McLoughlin <>

f3b6c7fc 06/09/2009 01:38 pm Mark McLoughlin

net: add qemu_send_packet_async()

Add a qemu_send_packet() variant which will queue up the packet
if it cannot be sent when all client queues are full. It later
invokes the supplied callback when the packet has been sent.

If qemu_send_packet_async() returns zero, the caller is expected...

e19eb224 06/09/2009 01:38 pm Mark McLoughlin

net: make use of async packet sending API in tap client

If a packet is queued by qemu_send_packet(), remove I/O
handler for the tap fd until we get notification that the
packet has been sent.

A not insignificant side effect of this is we can now
drain the tap send queue in one go without fear of packets...

7c3370d4 06/09/2009 01:38 pm Jan Kiszka

slirp: Avoid zombie processes after fork_exec

Slirp uses fork_exec for spawning service processes, and QEMU uses this
for running smbd. As SIGCHLD is not handled, these processes become
zombies on termination. Fix this by installing a proper signal handler,...

cda94b27 06/09/2009 01:38 pm Mark McLoughlin

Revert "Fix output of uninitialized strings"

This reverts commit 8cf07dcbe7691dbe4f47563058659dba6ef66b05.

This is a sorry saga.

This commit:

8e4416af45 net: Add parameter checks for VLAN clients

broken '-net socket' and this commit:

ffad4116b9 net: Fix -net socket parameter checks...
0aa7a205 06/09/2009 01:38 pm Jan Kiszka

net: Real fix for check_params users

OK, last try: 8e4416af45 broke -net socket, ffad4116b9 tried to fix it
but broke error reporting of invalid parameters. So this patch widely
reverts ffad4116b9 again and intead fixes those callers of check_params
that originally suffered from overwritten buffers by using separate...

c8decae2 06/09/2009 01:38 pm Mark McLoughlin

net: fix error reporting for some net parameter checks

A small bit of confusion between buffers is causing errors like:

qemu: invalid parameter '10' in 'script=/etc/qemu-ifup,fd=10'

instead of:

qemu: invalid parameter 'script' in 'script=/etc/qemu-ifup,fd=10'...
10ae5a7a 06/09/2009 01:38 pm Jan Kiszka

net: Improve parameter error reporting

As host network devices can also be instantiated via the monitor, errors
should then be reported to the related monitor instead of stderr. This
requires larger refactoring, so this patch starts small with introducing...

b8e8af38 06/09/2009 01:38 pm Jan Kiszka

slirp: Reorder initialization

This patch reorders the initialization of slirp itself as well as its
associated features smb and redirection. So far the first reference to
slirp triggered the initialization, independent of the actual -net user
option which may carry additional parameters. Now we save any request to...

5a6d8815 06/09/2009 01:38 pm Mark McLoughlin

net: factor tap_read_packet() out of tap_send()

Move portability clutter out into its own function.

Signed-off-by: Mark McLoughlin <>

5b01e886 06/09/2009 01:38 pm Mark McLoughlin

net: move the tap buffer into TAPState

KVM uses a 64k buffer for reading from tapfd (for GSO support)
and allocates the buffer with TAPState rather than on the stack.

Not allocating it on the stack probably makes sense for qemu
anyway, so merge it in advance of GSO support....

2e1e0641 06/09/2009 01:38 pm Mark McLoughlin

net: vlan clients with no fd_can_read() can always receive

If a vlan client has no fd_can_read(), that means it can
always receive packets. The current code assumes it can never
receive packets.

Signed-off-by: Mark McLoughlin <>

3471b757 06/09/2009 01:38 pm Mark McLoughlin

net: only read from tapfd when we can send

Reduce the number of packets dropped under heavy network
traffic by only reading a packet from the tapfd when a
client can actually handle it.

Signed-off-by: Mark McLoughlin <>

463af534 06/09/2009 01:38 pm Mark McLoughlin

net: add fd_readv() handler to qemu_new_vlan_client() args

This, apparently, is the style we prefer - all VLANClientState
should be an argument to qemu_new_vlan_client().

Signed-off-by: Mark McLoughlin <>

cda9046b 06/09/2009 01:38 pm Mark McLoughlin

net: re-name vc->fd_read() to vc->receive()

VLANClientState's fd_read() handler doesn't read from file
descriptors, it adds a buffer to the client's receive queue.

Re-name the handlers to make things a little less confusing.

Signed-off-by: Mark McLoughlin <>

e3f5ec2b 06/09/2009 01:38 pm Mark McLoughlin

net: pass VLANClientState* as first arg to receive handlers

Give static type checking a chance to catch errors.

Signed-off-by: Mark McLoughlin <>

4f1c942b 06/09/2009 01:38 pm Mark McLoughlin

net: add return value to packet receive handler

This allows us to handle queue full conditions rather than dropping
the packet on the floor.

Signed-off-by: Mark McLoughlin <>

c8aa237c 06/09/2009 01:38 pm Jan Kiszka

net: Don't deliver to disabled interfaces in qemu_sendv_packet

Signed-off-by: Jan Kiszka <>
Signed-off-by: Mark McLoughlin <>

c27ff608 06/09/2009 01:38 pm Jan Kiszka

net: Fix and improved ordered packet delivery

Fix a race in qemu_send_packet when delivering deferred packets and
add proper deferring also to qemu_sendv_packet.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Mark McLoughlin <>

1c6ed9f3 05/28/2009 10:14 am Alexander Graf

User networking: Show active connections

In case you're wondering what connections exactly you have open
or maybe redir'ed in the past, you can't really find out from qemu
right now.

This patch enables you to see all current connections the host
only networking holds open, so you can kill them using the previous...

c1261d8d 05/27/2009 05:46 pm Alexander Graf

User Networking: Enable removal of redirections

Using the new host_net_redir command you can easily create redirections
on the fly while your VM is running.

While that's great, it's missing the removal of redirections, in case you
want to have a port closed again at a later point in time....

8cf07dcb 05/27/2009 05:44 pm Kevin Wolf

Fix output of uninitialized strings

Commit ffad4116b96e29e0fbe892806f97c0a6c903d30d removed the "scratch buffer"
from check_params, but didn't care for the error messages which actually
included this string to tell the user which option was wrong. Now this string...

37cb6fc3 05/22/2009 06:50 pm Jan Kiszka

net: Fix dump time stamps

Signed-off-by: Jan Kiszka <>

cc63bb0f 05/04/2009 12:40 am Paul Brook

Suppress type mismatch warnings in VDE code.

Signed-off-by: Paul Brook <>

ffad4116 05/01/2009 05:44 pm Jan Kiszka

net: Fix -net socket parameter checks

My commit ea053add700d8abe203cd79a9ffb082aee4eabc0 broke -net socket by
overwriting an intermediate buffer in the added check_param. Fix this
by switching check_param to automatic buffer allocation and release, ie.
callers no longer have to worry about providing a scratch buffer....

206ab6e0 05/01/2009 05:44 pm Jan Kiszka

net: Avoid gcc'ism in net_host_device_add

+ if (net_client_init(device, opts ? : "") < 0) {

Is this a gcc extension? Do we want to introduce this construct to the
code base.

Valid remark, fix below.

Thanks,
Jan

-------->

Signed-off-by: Jan Kiszka <>...

8d316b00 04/27/2009 08:11 pm Robert Reif

fix net.c compile warning

Fix net.c compile warning:

CC net.o
net.c: In function net_slirp_redir:
net.c:623: warning: format not a string literal and no format arguments

Signed-off-by: Robert Reif <>

8d6249a7 04/21/2009 11:49 pm aliguori

net: Prevent multiple slirp instances (Jan Kiszka)

The slirp stack is full of global variables which prevents instantiating
it more than once. Catch this during net_slirp_init to prevent more harm
later on.

Signed-off-by: Jan Kiszka <>...

d4ebe193 04/21/2009 10:56 pm aliguori

slirp: Enhance host-guest redirection setup (Jan Kiszka)

Allow to establish a TCP/UDP connection redirection also via a monitor
command 'host_net_redir'. Moreover, assume TCP as connection type if
that parameter is omitted.

Signed-off-by: Jan Kiszka <>...

764a4d1d 04/21/2009 10:56 pm aliguori

net: Untangle nested qemu_send_packet (Jan Kiszka)

Queue packets that are send during an ongoing packet delivery. This
ensures that packets will always arrive in their logical order at each
client of a VLAN. Currently, slirp generates such immediate relies, and...

5c8be678 04/21/2009 10:56 pm aliguori

monitor: Improve host_net_add (Jan Kiszka)

Fix the documentation of the host_net_add monitor command and allow the
user to pass no options at all. Moreover, inform the user on the
monitor terminal if a request failed.

Signed-off-by: Jan Kiszka <>...

bb9ea79e 04/21/2009 10:56 pm aliguori

net: Add support for capturing VLANs (Jan Kiszka)

This patch is derived from Tristan Gingold's patch. It adds a new VLAN
client type that writes all traffic on the VLAN it is attached to into a
pcap file. Such a file can then be analyzed offline with Wireshark or...

8e4416af 04/21/2009 10:56 pm aliguori

net: Add parameter checks for VLAN clients (Jan Kiszka)

This aims at helping the user to find typos or other mistakes in
parameter lists passed for VLAN client initialization. The existing
parsing infrastructure does not allow a leaner approach, but this is...

ea053add 04/21/2009 10:56 pm aliguori

net: Fix -net socket,listen (Jan Kiszka)

In case no symbolic name is provided when requesting VLAN connection via
listening TCP socket ('-net socket,listen=...'), qemu crashes. This
fixes the cause.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>...

e8f1f9db 04/21/2009 10:56 pm aliguori

net: Check device passed to host_net_remove (Jan Kiszka)

Make sure that we do not delete guest NICs via host_net_remove.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7195 c046a42c-6fe2-441c-8c8c-71466251a162

dad35419 04/17/2009 08:11 pm aliguori

Free VLANClientState using qemu_free() (Mark McLoughlin)

It's allocated using qemu_mallocz(), so ...

The name and model strings are strdup() allocated, so free()
is still appropriate for them.

Reported-by: Jan Kiszka <>
Signed-off-by: Mark McLoughlin <>...

b946a153 04/17/2009 08:11 pm aliguori

Introduce VLANClientState::cleanup() (Mark McLoughlin)

We're currently leaking memory and file descriptors on device
hot-unplug.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162

9036de1a 04/17/2009 08:10 pm aliguori

Remove some useless malloc() checking (Mark McLoughlin)

Now that we abort() on malloc, neither qemu_find_vlan() nor
net_tap_fd_init() can fail.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7146 c046a42c-6fe2-441c-8c8c-71466251a162

771f1339 04/17/2009 08:10 pm aliguori

Fix error handling in net_client_init() (Mark McLoughlin)

We weren't freeing the name string everywhere.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7144 c046a42c-6fe2-441c-8c8c-71466251a162

efb816c9 04/17/2009 08:10 pm aliguori

struct iovec is now universally available (Mark McLoughlin)

struct iovec is now defined in qemu-common.h if needed, so we don't need
the tap code to handle !defined(HAVE_IOVEC).

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

3f4cb3d3 04/13/2009 07:31 pm blueswir1

Fix OpenSolaris gcc4 warnings: iovec type mismatches, missing 'static'

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7103 c046a42c-6fe2-441c-8c8c-71466251a162

b9e82a59 04/05/2009 09:03 pm blueswir1

Fix some win32 compile warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6984 c046a42c-6fe2-441c-8c8c-71466251a162

7cd0874c 03/28/2009 05:58 pm aliguori

host_device_remove: remove incorrect check for device name (Eduardo Habkost)

There is no need to check for valid prefixes on the the device name
when removing it. If the device name is found on the vlan client list,
it can be removed, regardless of the prefix used on its name....

49dc768d 03/08/2009 06:26 pm aliguori

Fix windows build and clean up use of <windows.h>

We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values so
let's do it in OS_CFLAGS.

Then, we can pepper in windows.h includes where using #includes that require it.

Signed-off-by: Anthony Liguori <>...

179a2c19 03/08/2009 10:23 am blueswir1

Rename _BSD to HOST_BSD so that it's more obvious that it's defined by configure

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6775 c046a42c-6fe2-441c-8c8c-71466251a162

c5e97233 03/07/2009 10:06 pm blueswir1

Support for DragonFly BSD (Hasso Tepper)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162

d40cdb10 03/07/2009 06:52 pm blueswir1

Fix BSD breakage from r6736

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6742 c046a42c-6fe2-441c-8c8c-71466251a162

511d2b14 03/07/2009 05:32 pm blueswir1

Sparse fixes: NULL use, header order, ANSI prototypes, static

Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162

376253ec 03/06/2009 01:01 am aliguori

monitor: Rework API (Jan Kiszka)

Refactor the monitor API and prepare it for decoupled terminals:
term_print functions are renamed to monitor_* and all monitor services
gain a new parameter (mon) that will once refer to the monitor instance
the output is supposed to appear on. However, the argument remains...