History log of /qemu/util/qemu-sockets.c (Results 201 – 225 of 252)
Revision Date Author Comments
# 1ccbc285 16-Nov-2012 Anthony PERARD <anthony.perard@citrix.com>

qemu-sockets: Fix parsing of the inet option 'to'.

Having a qemu command line argument like "-vnc 127.0.0.1:0,to=99" is broken.
This have been break with commit 879e45c72da1569e07fbbc6a1aa2a708ea796

qemu-sockets: Fix parsing of the inet option 'to'.

Having a qemu command line argument like "-vnc 127.0.0.1:0,to=99" is broken.
This have been break with commit 879e45c72da1569e07fbbc6a1aa2a708ea796044.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>

show more ...


# 3bc2f570 16-Nov-2012 Paolo Bonzini <pbonzini@redhat.com>

build: replace weak symbols with a static library

Weak symbols were a nice idea, but they turned out not to be a good one.
Toolchain support is just too sparse, in particular llvm-gcc is totally
bro

build: replace weak symbols with a static library

Weak symbols were a nice idea, but they turned out not to be a good one.
Toolchain support is just too sparse, in particular llvm-gcc is totally
broken.

This patch uses a surprisingly low-tech approach: a static library.
Symbols in a static library are always overridden by symbols in an
object file. Furthermore, if you place each function in a separate
source file, object files for unused functions will not be taken in.
This means that each function can use all the dependencies that it needs
(especially QAPI stuff such as error_setg).

Thus, all stubs are placed in separate object files and put together in
a static library. The library then is linked to all programs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

show more ...


# 1f001dc7 02-Nov-2012 Paolo Bonzini <pbonzini@redhat.com>

compiler: support Darwin weak references

Weakrefs only tell you if the symbol was defined elsewhere, so you
need a further check at runtime to pick the default definition
when needed.

This could be

compiler: support Darwin weak references

Weakrefs only tell you if the symbol was defined elsewhere, so you
need a further check at runtime to pick the default definition
when needed.

This could be automated by the compiler, but it does not do it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

show more ...


# 462016d2 29-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

iohandler: add weak alias in qemu-sockets.c, for qemu-ga

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# d249e1fc 29-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

sockets: use weak aliases instead of qemu-tool.c

qemu-tool.c has its own (largeish) set of dependencies. Weak aliases
can be placed directly where people use them, and do not contribute
to increasi

sockets: use weak aliases instead of qemu-tool.c

qemu-tool.c has its own (largeish) set of dependencies. Weak aliases
can be placed directly where people use them, and do not contribute
to increasing the dependencies of generic utility files.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 101f9cbc 23-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: add socket_listen, socket_connect, socket_parse

These are QAPI-friendly versions of the qemu-sockets functions. They
support IP sockets, Unix sockets, and named file descriptors, usin

qemu-sockets: add socket_listen, socket_connect, socket_parse

These are QAPI-friendly versions of the qemu-sockets functions. They
support IP sockets, Unix sockets, and named file descriptors, using a
QAPI union to dispatch to the correct function.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 879e45c7 19-Sep-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: return InetSocketAddress from inet_parse

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# 58899664 19-Sep-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: add error propagation to Unix socket functions

Before:

$ qemu-system-x86_64 -monitor unix:/vvv,server=off
connect(unix:/vvv): No such file or directory
chardev: opening ba

qemu-sockets: add error propagation to Unix socket functions

Before:

$ qemu-system-x86_64 -monitor unix:/vvv,server=off
connect(unix:/vvv): No such file or directory
chardev: opening backend "socket" failed

After:

$ x86_64-softmmu/qemu-system-x86_64 -monitor unix:/vvv,server=off
qemu-system-x86_64: -monitor unix:/vvv,server=off: Failed to connect to socket: No such file or directory
chardev: opening backend "socket" failed

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 2f002c43 19-Sep-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: add error propagation to inet_parse

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# 4f085c82 02-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: add error propagation to inet_dgram_opts

Before:

$ qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
inet_dgram_opts: bind(ipv4,127.0.0.1,631): OK
inet_dgram_opt

qemu-sockets: add error propagation to inet_dgram_opts

Before:

$ qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
inet_dgram_opts: bind(ipv4,127.0.0.1,631): OK
inet_dgram_opts failed
chardev: opening backend "udp" failed

After:

$ x86_64-softmmu/qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
qemu-system-x86_64: -monitor udp:localhost:631@localhost:631: Failed to bind socket: Address already in use
chardev: opening backend "udp" failed

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 11663b55 02-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: add error propagation to inet_connect_addr

perror and fprintf can be removed because all clients can now consume
Errors properly. However, we'll need to change the non-blocking connec

qemu-sockets: add error propagation to inet_connect_addr

perror and fprintf can be removed because all clients can now consume
Errors properly. However, we'll need to change the non-blocking connect
handlers to take an Error, in order to improve error handling for
migration with the TCP protocol.

This is a minor degradation in error reporting for outgoing migration.
However, until 1.2 this case just failed without even attempting to
connect, so it is still an improvement as far as overall QoI is
concerned.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# a12fb8ad 02-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: include strerror or gai_strerror output in error messages

Among others, before:

$ qemu-system-x86_64 -chardev socket,port=12345,id=char
inet_connect: host and/or port not spec

qemu-sockets: include strerror or gai_strerror output in error messages

Among others, before:

$ qemu-system-x86_64 -chardev socket,port=12345,id=char
inet_connect: host and/or port not specified
chardev: opening backend "socket" failed

After:

$ x86_64-softmmu/qemu-system-x86_64 -chardev socket,port=12345,id=char
qemu-system-x86_64: -chardev socket,port=12345,id=char: host and/or port not specified
chardev: opening backend "socket" failed

perror and fprintf can be removed because all clients can now
consume Errors properly.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 1fc05adf 03-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: add nonblocking connect for Unix sockets

This patch mostly mimics what was done to TCP sockets, but simpler
because there is only one address to try. It also includes a free EINTR
bug

qemu-sockets: add nonblocking connect for Unix sockets

This patch mostly mimics what was done to TCP sockets, but simpler
because there is only one address to try. It also includes a free EINTR
bug fix.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 0c814709 18-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: unix_listen and unix_connect are portable

They are just wrappers and do not need a Win32-specific version.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo B

qemu-sockets: unix_listen and unix_connect are portable

They are just wrappers and do not need a Win32-specific version.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 7fc4e63e 02-Oct-2012 Paolo Bonzini <pbonzini@redhat.com>

qemu-sockets: add Error ** to all functions

This lets me adjust the clients to do proper error propagation first,
thus avoiding temporary regressions in the quality of the error messages.

Reviewed-

qemu-sockets: add Error ** to all functions

This lets me adjust the clients to do proper error propagation first,
thus avoiding temporary regressions in the quality of the error messages.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 4d5b97da 29-Sep-2012 Amos Kong <akong@redhat.com>

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Sign

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>

show more ...


# 58455eb9 28-Sep-2012 Stefan Weil <sw@weilnetz.de>

qemu-sockets: Fix compiler warning (regression for MinGW)

setsockopt needs a type cast for MinGW. That type cast is missing in
a recent commit which results in a compiler warning.

Like for other so

qemu-sockets: Fix compiler warning (regression for MinGW)

setsockopt needs a type cast for MinGW. That type cast is missing in
a recent commit which results in a compiler warning.

Like for other socket related functions which have the same problem,
we add a 'qemu_setsockopt' macro which provides that type cast where
needed and use the new macro to avoid the warning.

A 'qemu_getsockopt' is also added and can be used for future
modifications.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>

show more ...


# 233aa5c2 24-Sep-2012 Orit Wasserman <owasserm@redhat.com>

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 co

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.

To fix this make inet_connect_nonblocking retry connection with a different
address.
callers on inet_nonblocking_connect register a callback function that will
be called when connect opertion completes, in case of failure the fd will have
a negative value

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

show more ...


# 5db5f44c 24-Sep-2012 Orit Wasserman <owasserm@redhat.com>

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

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 <owasserm@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

show more ...


# 05bc1d8a 24-Sep-2012 Michael S. Tsirkin <mst@redhat.com>

Refactor inet_connect_opts function

refactor address resolution code to fix nonblocking connect
remove getnameinfo call

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Amos Kong <

Refactor inet_connect_opts function

refactor address resolution code to fix nonblocking connect
remove getnameinfo call

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

show more ...


# 39b38459 01-Sep-2012 Stefan Weil <sw@weilnetz.de>

qemu-sockets: Fix potential memory leak

The old code leaks variable 'peer'.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>


# 540c79fe 06-Aug-2012 Luiz Capitulino <lcapitulino@redhat.com>

migration: don't rely on any QERR_SOCKET_*

Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The
other errors are handled the same by checking if the error is set and
then calling mi

migration: don't rely on any QERR_SOCKET_*

Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The
other errors are handled the same by checking if the error is set and
then calling migrate_fd_error() if it's.

It's also necessary to change inet_connect_opts() not to set
QERR_SOCKET_CONNECT_IN_PROGRESS. This error is only used by
tcp_start_outgoing_migration() and not changing it along with the
usage of in_progress would break migration.

Furthermore this commit fixes a bug. Today, there's a spurious error
report when migration succeeds:

(qemu) migrate tcp:0:4444
migrate: Connection can not be completed immediately
(qemu)

After this commit no spurious error is reported anymore.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>

show more ...


# 02a08fef 01-Aug-2012 Luiz Capitulino <lcapitulino@redhat.com>

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 complete

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
treated like an error and a future commit will drop it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>

show more ...


# 8715fc1e 03-Aug-2012 Amos Kong <akong@redhat.com>

socket: clean up redundant assignment

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>


# e6d91ab6 09-Jul-2012 Paolo Bonzini <pbonzini@redhat.com>

place qemu-sockets.c contributions since 2012-01-13 under GPLv2+

Past contributions since 2012-01-13 were only made by Red Hat people,
so they are already available under GPLv2+.

Signed-off-by: Pao

place qemu-sockets.c contributions since 2012-01-13 under GPLv2+

Past contributions since 2012-01-13 were only made by Red Hat people,
so they are already available under GPLv2+.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

show more ...


1234567891011