test_tls_get_ipaddr(const char *addrstr,

                    char **data,

                    int *datalen)

{

    struct addrinfo *res;

    struct addrinfo hints;



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

    hints.ai_flags = AI_NUMERICHOST;

    g_assert(getaddrinfo(addrstr, NULL, &hints, &res) == 0);



    *datalen = res->ai_addrlen;

    *data = g_new(char, *datalen);

    memcpy(*data, res->ai_addr, *datalen);


}
test_tls_get_ipaddr(const char *addrstr,

                    char **data,

                    int *datalen)

{

    struct addrinfo *res;

    struct addrinfo hints;



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

    hints.ai_flags = AI_NUMERICHOST;

    g_assert(getaddrinfo(addrstr, NULL, &hints, &res) == 0);



    *datalen = res->ai_addrlen;

    *data = g_new(char, *datalen);

    memcpy(*data, res->ai_addr, *datalen);


}
FUNC_0(const char *VAR_0,

                    char **VAR_1,

                    int *VAR_2)

{

    struct addrinfo *VAR_3;

    struct addrinfo VAR_4;



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

    VAR_4.ai_flags = AI_NUMERICHOST;

    g_assert(getaddrinfo(VAR_0, NULL, &VAR_4, &VAR_3) == 0);



    *VAR_2 = VAR_3->ai_addrlen;

    *VAR_1 = g_new(char, *VAR_2);

    memcpy(*VAR_1, VAR_3->ai_addr, *VAR_2);


}
FUNC_0(const char *VAR_0,
char **VAR_1,
int *VAR_2)
{ struct addrinfo *VAR_3; struct addrinfo VAR_4; memset(&VAR_4, 0, sizeof(VAR_4)); VAR_4.ai_flags = AI_NUMERICHOST; g_assert(getaddrinfo(VAR_0, NULL, &VAR_4, &VAR_3) == 0); *VAR_2 = VAR_3->ai_addrlen; *VAR_1 = g_new(char, *VAR_2); memcpy(*VAR_1, VAR_3->ai_addr, *VAR_2); }