Statistics
| Branch: | Revision:

root / qemu_socket.h @ 2e679780

History | View | Annotate | Download (1.9 kB)

# Date Author Comment
233aa5c2 09/26/2012 03:05 am Orit Wasserman

Fix address handling in inet_nonblocking_connect

getaddrinfo can give us a list of addresses, but we only try to
connect to the first one. If that fails we never proceed to
the next one. This is common on desktop setups that often have ipv6
configured but not actually working....

5db5f44c 09/26/2012 03:05 am Orit Wasserman

Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connect

No need to add non blocking parameters to the blocking inet_connect
add block parameter for inet_connect_opts instead of using QemuOpt "block".

Signed-off-by: Orit Wasserman <>...

02a08fef 08/13/2012 07:20 pm Luiz Capitulino

net: inet_connect(), inet_connect_opts(): add in_progress argument

It's used to indicate the special case where a valid file-descriptor
is returned (ie. success) but the connection can't be completed
w/o blocking.

This is needed because QERR_SOCKET_CONNECT_IN_PROGRESS is not...

a6ba35b3 05/10/2012 08:37 pm Amos Kong

sockets: change inet_connect() to support nonblock socket

Add a bool argument to inet_connect() to assign if set socket
to block/nonblock, and delete original argument 'socktype'
that is unused.
Add a new argument to inet_connect()/inet_connect_opts(),
to pass back connect error by error class....

029409e5 05/10/2012 08:37 pm Amos Kong

sockets: use error class to pass listen error

Add a new argument in inet_listen()/inet_listen_opts()
to pass back listen error.

Change nbd, qemu-char, vnc to use new interface.

Signed-off-by: Amos Kong <>
Reviewed-by: Orit Wasserman <>...

acf126ba 04/15/2012 10:25 pm Stefan Weil

w32: Move defines for socket specific errors to qemu-os-win32.h

As those defines are only used for w32,
they should be in the header file for w32.

All files which include slirp.h or qemu_socket.h also
include qemu-os-win32.h.

Signed-off-by: Stefan Weil <>

6cec29c4 04/03/2012 11:34 am Jan Kiszka

w32: Undefine error constants before their redefinition

Avoids lots of warnings.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

128aa589 12/22/2011 12:53 pm Paolo Bonzini

move corking functions to osdep.c

Signed-off-by: Paolo Bonzini <>

154b9a0c 10/21/2011 06:34 pm Paolo Bonzini

add socket_set_block

Cc: MORITA Kazutaka <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

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

80bb8cba 09/22/2010 11:05 pm Blue Swirl

Fix OpenBSD build

Add #include <sys/types.h>, needed by #include <sys/socket.h>.

Signed-off-by: Blue Swirl <>

0706a4dc 04/09/2010 07:55 pm Paolo Bonzini

move socket_init to qemu-sockets.c

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Aurelien Jarno <>

c9c4b34e 01/20/2010 04:25 pm Luiz Capitulino

net: Make inet_strfamily() public

So that it can be used by other subsystems.

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

40ff6d7e 12/03/2009 07:45 pm Kevin Wolf

Don't leak file descriptors

We're leaking file descriptors to child processes. Set FD_CLOEXEC on file
descriptors that don't need to be passed to children to stop this misbehaviour.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

7e1b35b4 09/11/2009 06:19 pm Gerd Hoffmann

convert udp chardev to QemuOpts.

While being at it: create a new inet_dgram_opts() function for udp setup,
so udp can handle IPv6 now.

new cmd line syntax:
-chardev udp,id=name,host=remotehost,port=remoteport,\
localaddr=bindaddr,localport=bindport...

2af2bf67 09/11/2009 06:19 pm Gerd Hoffmann

sockets: add unix_connect_opts

Add unix_connect_opts(). Does the same as unix_connect(), but uses
QemuOpts. unix_connect() is a compatibility wrapper for
unix_connect_opts() now and should go away some day.

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

62b6adfb 09/11/2009 06:19 pm Gerd Hoffmann

sockets: add unix_listen_opts

Add unix_listen_opts(). Does the same as unix_listen(), but uses
QemuOpts. unix_listen() is a compatibility wrapper for
unix_listen_opts() now and should go away some day.

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

f4c94c7c 09/11/2009 06:19 pm Gerd Hoffmann

sockets: add inet_connect_opts

Add inet_connect_opts(). Does the same as inet_connect(), but uses
QemuOpts. inet_connect() is a compatibility wrapper for
inet_connect_opts() now and should go away some day.

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

e5bc776f 09/11/2009 06:19 pm Gerd Hoffmann

sockets: add inet_listen_opts

Add inet_listen_opts(). Does the same as inet_listen(), but uses
QemuOpts. inet_listen() is a compatibility wrapper for
inet_listen_opts() now and should go away some day.

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

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

d247d25f 11/11/2008 10:46 pm aliguori

sockets: helper functions for qemu (Gerd Hoffman)

This patch creates a new source file qemu-sockets.c with a bunch of
helper functions to create listening and connected sockets.

New features of this code are (a) support for searching for a free
port in a given range and (b) support for IPv6....

0e82f34d 10/31/2008 08:44 pm aliguori

Move some declarations around in the QEMU CharDriver code

The goal of this series is to move the CharDriverState code out of vl.c and
into its own file, qemu-char.c. This patch moves around some declarations so
the next patch can be pure code motion.

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

5bb7910a 10/13/2008 06:12 am aliguori

Introduce UI for live migration

This patch introduces a command line parameter and monitor command for starting
a live migration. The next patch will provide an example of how to use these
parameters.

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

03ff3ca3 09/15/2008 06:51 pm aliguori

Use common objects for qemu-img and qemu-nbd

Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the
code. It's ugly and causes us to have to build multiple object files for
linking against qemu and the tools.

This patch introduces a new file, qemu-tool.c which contains enough for...

4fddf62a 12/17/2007 06:42 am ths

Use WIN32_LEAN_AND_MEAN, by Stefan Weil.

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

ffd843bc 12/21/2006 09:46 pm ths

Run monitor over unix domain sockets, by Anthony Liguori.

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

6ca957f0 05/01/2006 01:53 am bellard

win32 socket fixes

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