static struct addrinfo *inet_parse_connect_saddr(InetSocketAddress *saddr,

                                                 Error **errp)

{

    struct addrinfo ai, *res;

    int rc;

    Error *err = NULL;



    memset(&ai, 0, sizeof(ai));



    ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;

    ai.ai_family = inet_ai_family_from_address(saddr, &err);

    ai.ai_socktype = SOCK_STREAM;



    if (err) {

        error_propagate(errp, err);

        return NULL;

    }



    if (saddr->host == NULL || saddr->port == NULL) {

        error_setg(errp, "host and/or port not specified");

        return NULL;

    }



    /* lookup */

    rc = getaddrinfo(saddr->host, saddr->port, &ai, &res);

    if (rc != 0) {

        error_setg(errp, "address resolution failed for %s:%s: %s",

                   saddr->host, saddr->port, gai_strerror(rc));

        return NULL;

    }

    return res;

}

static struct addrinfo *inet_parse_connect_saddr(InetSocketAddress *saddr,

                                                 Error **errp)

{

    struct addrinfo ai, *res;

    int rc;

    Error *err = NULL;



    memset(&ai, 0, sizeof(ai));



    ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;

    ai.ai_family = inet_ai_family_from_address(saddr, &err);

    ai.ai_socktype = SOCK_STREAM;



    if (err) {

        error_propagate(errp, err);

        return NULL;

    }



    if (saddr->host == NULL || saddr->port == NULL) {

        error_setg(errp, "host and/or port not specified");

        return NULL;

    }



    

    rc = getaddrinfo(saddr->host, saddr->port, &ai, &res);

    if (rc != 0) {

        error_setg(errp, "address resolution failed for %s:%s: %s",

                   saddr->host, saddr->port, gai_strerror(rc));

        return NULL;

    }

    return res;

}

    ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;     ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;
static struct addrinfo *FUNC_0(InetSocketAddress *VAR_0,

                                                 Error **VAR_1)

{

    struct addrinfo VAR_2, *VAR_3;

    int VAR_4;

    Error *err = NULL;



    memset(&VAR_2, 0, sizeof(VAR_2));



    VAR_2.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;

    VAR_2.ai_family = inet_ai_family_from_address(VAR_0, &err);

    VAR_2.ai_socktype = SOCK_STREAM;



    if (err) {

        error_propagate(VAR_1, err);

        return NULL;

    }



    if (VAR_0->host == NULL || VAR_0->port == NULL) {

        error_setg(VAR_1, "host and/or port not specified");

        return NULL;

    }



    

    VAR_4 = getaddrinfo(VAR_0->host, VAR_0->port, &VAR_2, &VAR_3);

    if (VAR_4 != 0) {

        error_setg(VAR_1, "address resolution failed for %s:%s: %s",

                   VAR_0->host, VAR_0->port, gai_strerror(VAR_4));

        return NULL;

    }

    return VAR_3;

}

static struct addrinfo *FUNC_0(InetSocketAddress *VAR_0,
Error **VAR_1)
{ struct addrinfo VAR_2, *VAR_3; int VAR_4; Error *err = NULL; memset(&VAR_2, 0, sizeof(VAR_2)); VAR_2.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG; VAR_2.ai_family = inet_ai_family_from_address(VAR_0, &err); VAR_2.ai_socktype = SOCK_STREAM; if (err) { error_propagate(VAR_1, err); return NULL; } if (VAR_0->host == NULL || VAR_0->port == NULL) { error_setg(VAR_1, "host and/or port not specified"); return NULL; } VAR_4 = getaddrinfo(VAR_0->host, VAR_0->port, &VAR_2, &VAR_3); if (VAR_4 != 0) { error_setg(VAR_1, "address resolution failed for %s:%s: %s",
VAR_0->host, VAR_0->port, gai_strerror(VAR_4)); return NULL; } return VAR_3; }