In the Windows API, the getaddrinfo() function provides protocol-independent translation from an ANSI host name to an address.
Questions tagged [getaddrinfo-a]
8 questions
19
votes
1 answer
How to use getaddrinfo_a to do async resolve with glibc
An often overlooked function that requires no external library, but basically has no documentation whatsoever.

sztanpet
- 731
- 1
- 12
- 18
9
votes
1 answer
Slow response from getaddrinfo
I'm using getaddrinfo to do DNS queries from C++ on Windows. I used to use the Windows API DnsQuery and that worked fine, but when adding IPv6 support to my software I switched to getaddrinfo. Since then, I've seen the following:
My problem is that…

Nitramk
- 1,542
- 6
- 25
- 42
8
votes
4 answers
Is there a non blocking method for host resolution in WINAPI?
There's getaddrinfo() for blocking host resolution, but is there a non blocking method?

Plumenator
- 1,682
- 3
- 20
- 49
2
votes
1 answer
gai_cancel() takes a really long time to succeed
I am trying to look up domain asynchronously in c++. The reason is I want to be able to effectively add a time out period in case the system can't look up the domain. I came across the getaddrinfo_a() command so I decided to give it a try. However…

ktb92677
- 407
- 4
- 16
2
votes
3 answers
multiple valgrind errors: Conditional jump or move depends on uninitialised value(s)
I'm running Valgrind and I'm getting the following error (this is not the only one):
==21743== Conditional jump or move depends on uninitialised value(s)
==21743== at 0x4A06509: index (mc_replace_strmem.c:164)
==21743== by 0x33B7CBB3CD:…

Hristo
- 45,559
- 65
- 163
- 230
1
vote
2 answers
BAD_ACCESS on very low number of users during getaddrinfo
Okay, I am completely at a loss here.
A small percentage of users seem to have BAD_ACCESS errors in my hostname translation.
The complete crash below:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d,…

Ger Teunis
- 945
- 1
- 14
- 30
0
votes
1 answer
Should I think about linked list returned by getaddrinfo when I get addrinfo for my "home" server
I created a server using sockets that runs on my home network. socket address=192.168.88.123:7777
When I call getaddrinfo() function I put "192.168.88.123" as first parameter and "7777" as second and also some hints (AF_INET, SOCK_STREAM) and…

Діма Лучик
- 47
- 4
0
votes
1 answer
Problem with function getaddrinfo
I use function getaddrinfo to get the ip address of domain name, OS = linux, language = c++. I noticed that when the ethernet cable is unplugged that function can block thread for 30 seconds (function doesn't return within 30 seconds). It's too long…

EBA
- 1
- 1
- 1