Statistics
| Branch: | Revision:

root / net.c @ 4af39611

History | View | Annotate | Download (57.8 kB)

# Date Author Comment
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...

abcd2baa 02/27/2009 09:54 pm aliguori

net socket verify packet size (Dustin Kirkland)

net socket oversized packet

This is a patch being carried by Ubuntu against kvm/qemu.

Verify packet size before performing memcpy().

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

8ca9217d 02/16/2009 05:34 pm aliguori

specify vmchannel as a net option (Gleb Natapov)

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

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

6f338c34 02/11/2009 05:21 pm aliguori

qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)

Add monitor command to hot-add PCI devices (nic and storage).

Syntax is:

pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params

It returns the domain, bus and slot for the newly added device on success....

8b13c4a7 02/11/2009 05:20 pm aliguori

qemu: add net_client_uninit / qemu_find_vlan_client (Marcelo Tosatti)

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

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

4d73cd3b 02/11/2009 05:20 pm aliguori

qemu: net/drive add/remove tweaks (Marcelo Tosatti)

Export net/drive add/remove functions for device hotplug usage.

Return the table index on add.

Return failure instead of exiting if limit has been reached
on drive_add.

Signed-off-by: Marcelo Tosatti <>...

7697079b 02/11/2009 05:20 pm aliguori

qemu: dynamic nic info index allocation (Marcelo Tosatti)

Dynamically allocate nic info index, so to reuse indexes when devices are
removed.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

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

1eec614b 02/06/2009 12:06 am aliguori

toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

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

e0e7877a 01/26/2009 05:37 pm aliguori

Handle link status in qemu_sendv_packet() (Mark McLoughlin)

If link is down, pretend that the packet has been successfully sent.

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

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

973cbd37 01/13/2009 09:15 pm aliguori

Fix tap downscript argument (Mark McLoughlin)

Kill off the hack that parses info_str for the tap interface
name to pass as the argument to the downscript and, instead,
just explicitly keep a copy of the string for later.

As reported by John Wong, this commit:...

d07f22c5 01/13/2009 09:03 pm aliguori

Add qemu_check_nic_model() and qemu_check_nic_model_list() (Mark McLoughlin)

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

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

dd5de373 01/09/2009 02:48 am edgar_igl

Make the set_link cmd handle multiple nics.

Signed-off-by: Edgar E. Iglesias <>

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

34b25ca7 01/08/2009 09:45 pm aliguori

Allow devices be notified of link status change (Mark McLoughlin)

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

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

436e5e53 01/08/2009 09:44 pm aliguori

Add 'set_link' monitor command (Mark McLoughlin)

Add a monitor command to setting a given network device's link status
to 'up' or 'down'.

Allows simulation of network cable disconnect.

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

49ec9b40 01/08/2009 09:26 pm aliguori

Add "restrict" and "ip" option to "user" net option (Gleb Natapov)

Expose new slirp capabilities to user through a command line options.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

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

a9ba3a85 01/08/2009 09:24 pm aliguori

Add slirp_restrict option (Gleb Natapov)

Add "slirp firewall" to permit connection only to vmchannel addresses.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

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

4dda4063 01/08/2009 09:01 pm aliguori

Add model field to nic info (Mark McLoughlin)

The model type used to be printed as part of the nic info. It was removed when
the name type was added. This adds back a model field for those that were
using it previously.

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

7a9f6e4a 01/07/2009 07:48 pm aliguori

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

7cb7434b 01/07/2009 07:46 pm aliguori

Add qemu_format_nic_info_str() (Mark McLoughlin)

Factor out a simple little function for formatting a NIC's
info_str and make all NICs use it.

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

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

676cff29 01/07/2009 07:43 pm aliguori

Assign a name to each VLAN client (Mark McLoughlin)

Automatically assign a name to each vlan client based on its model,
e.g. e1000.0, tap.3 or vde.1.

This name is intended to be used by the forthcoming 'set_link'
monitor command.

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

bf38c1a0 01/07/2009 07:42 pm aliguori

Add a model string to VLANClientState (Mark McLoughlin)

Don't lose track of what type/model a vlan client is so that we can
e.g. assign a global per-model id to clients.

The entire patch is basically a tedious excercise in making sure the
type/model string gets propagated down to qemu_new_vlan_client()....

f54825cc 12/19/2008 12:43 am aurel32

consolidate definition for tap script and smb support

Since the introduction of net.c in r5581 there had been 2 places where
the location of the TAP helper scripts and SMB daemon are defined.

The following patch move those definitions to net.h so they are accessible...

b535b7b2 12/17/2008 09:17 pm aliguori

Add support for tap vectored send

This is adapted from kvm-userspace. It allows readv to be used with tap when
the host supports it.

Signed-off-by: Anthony Liguori <>

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

fbe78f4f 12/17/2008 09:13 pm aliguori

virtio-net support

This adds virtio-net support. This is based on the virtio-net driver
that exists in kvm-userspace. This also adds a new qemu_sendv_packet
which virtio-net requires.

Signed-off-by: Anthony Liguori <>

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

69d6451c 12/07/2008 09:30 pm blueswir1

Fix some new warnings introduced after r5022

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

47398b9c 11/22/2008 10:04 pm blueswir1

Use qemu_isfoobar and qemu_towombat versions, based on patch by Christoph Egger

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

b29fe3ed 11/18/2008 03:42 am malc

Preliminary AIX support

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

cd390083 11/16/2008 03:53 pm blueswir1

Attached patch fixes a series of this warning
when compiling on NetBSD:

warning: array subscript has type 'char'

Signed-off-by: Christoph Egger <>

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

559b90fb 11/11/2008 11:20 pm aliguori

Move the things that aren't target specific to libqemu_common.a.

This will improve the build time.

Signed-off-by: Anthony Liguori <>

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

de9a95f0 11/11/2008 03:41 pm aurel32

Revert commits 5685 to 5688 committed by mistake

Signed-off-by: Aurelien Jarno <>

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

3587f82a 11/11/2008 03:30 pm aurel32

qemu: generate signals on tap I/O

Currently tap does not generate signals on I/O; this causes
network latency to be dependent on the timer tick (1ms without
dyntick, guest dependent with dyntick). By generating a signal
on I/O, we can inform the guest immediately that a packet has...

24646c7e 11/07/2008 06:55 pm blueswir1

Fix some build issues for BSD.

Signed-off-by: Christoph Egger <>

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

63a01ef8 10/31/2008 09:10 pm aliguori

Move network redirection code out of vl.c and into net.c

Mostly code motion.

Signed-off-by: Anthony Liguori <>

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