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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
diff --git a/qemu_socket.h b/qemu_socket.h
index 354c114..662f427 100644
--- a/qemu_socket.h
+++ b/qemu_socket.h
@@ -38,6 +38,7 @@
 /* New, ipv6-ready socket helper functions, see qemu-sockets.c */
 int inet_listen(const char *str, char *ostr, int olen,
                 int socktype, int port_offset);
+int inet_connect_opts(QemuOpts *opts);
 int inet_connect(const char *str, int socktype);
 
 int unix_listen_opts(QemuOpts *opts);