diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-23 21:31:53 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-23 22:39:16 +0200 |
commit | 101f9cbc2b73340197ec610c095fd69f0b1413ed (patch) | |
tree | 5ffa7e8959764f61de599980164328289ce83c89 /qemu_socket.h | |
parent | 0ef3dd6c2de1fa4f80c5aa71fb5fdada0f35cc9a (diff) |
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>
Diffstat (limited to 'qemu_socket.h')
-rw-r--r-- | qemu_socket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qemu_socket.h b/qemu_socket.h index 89a5feb7ec..02490ad06c 100644 --- a/qemu_socket.h +++ b/qemu_socket.h @@ -65,6 +65,11 @@ int unix_nonblocking_connect(const char *str, NonBlockingConnectHandler *callback, void *opaque, Error **errp); +SocketAddress *socket_parse(const char *str, Error **errp); +int socket_connect(SocketAddress *addr, Error **errp, + NonBlockingConnectHandler *callback, void *opaque); +int socket_listen(SocketAddress *addr, Error **errp); + /* Old, ipv4 only bits. Don't use for new code. */ int parse_host_port(struct sockaddr_in *saddr, const char *str); int socket_init(void); |