Hi,

I'm trying to use getaddrinfo() on Android for resolving a hostname,
but I have an issue with a code like this:

struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
hints.ai_flags = AI_V4MAPPED;
int res = getaddrinfo(hostname, NULL, &hints, &address);

I think that according to the getaddrinfo() documentation, this should
be a valid call. Nevertheless, getaddrinfo() returns EAI_BADFLAGS.
Does anybody know why?

When I don't set the ai_flags field, it works OK.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to