diff options
Diffstat (limited to 'nbd.c')
-rw-r--r-- | nbd.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -218,6 +218,18 @@ int tcp_socket_outgoing_spec(const char *address_and_port) return fd; } +int tcp_socket_outgoing_opts(QemuOpts *opts) +{ + Error *local_err = NULL; + int fd = inet_connect_opts(opts, &local_err, NULL, NULL); + if (local_err != NULL) { + qerror_report_err(local_err); + error_free(local_err); + } + + return fd; +} + int tcp_socket_incoming(const char *address, uint16_t port) { char address_and_port[128]; |