Change net/socket.c to use socket_*() functions
commit7e8449594c92992342512061160bc846c922016d
authorAshijeet Acharya <ashijeetacharya@gmail.com>
Sat, 18 Jun 2016 07:54:02 +0000 (18 13:24 +0530)
committerJason Wang <jasowang@redhat.com>
Tue, 28 Jun 2016 02:13:57 +0000 (28 10:13 +0800)
tree1688bb59986af9fb10cf0153a3bbf586b327c578
parentd88d3a093898bd1dc0898c7c87b0d3f555a24a6e
Change net/socket.c to use socket_*() functions

Use socket_*() functions from include/qemu/sockets.h instead of
listen()/bind()/connect()/parse_host_port(). socket_*() fucntions are
QAPI based and this patch  performs this api conversion since
everything will be using QAPI based sockets in the future. Also add a
helper function socket_address_to_string() in util/qemu-sockets.c
which returns the string representation of socket address. Thetask was
listed on http://wiki.qemu.org/BiteSizedTasks page.

Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
include/qemu/sockets.h
net/socket.c
util/qemu-sockets.c