getaddrinfo-a

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. ...

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 some times getaddrinfo take very long time to complete. The typical response from getaddr...

Bogus IP Address from getaddrinfo & inet_ntop

I've been using getaddrinfo for looking up socket addresses for basic socket commands. Recently, though, the addresses it returns to me are for bogus IP addresses, which I have found using inet_ntop. I've tried my code, as well as that provided in Beej's Guide, and they both produce the same results. Here's the code: struct addrinfo hin...

Obtaining local IP address using getaddrinfo() C function ?

Hello, I'm trying to obtain my local (not the external) IP address using the getaddrinfo() function, but I saw the examples provided here, and they where too complex for my needs. Also saw other posts and most of them really wanted to get the external IP, not the local one. Could anyone provide a link to a simple example (or a simple ex...

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: gaih_inet (in /lib64/libc-2.5.so) ==21743== by 0x33B7CBD629: getaddrinfo (in /lib64/libc-2.5...

Slow response from getaddrinfo on EC2

I have an ec2 instance used as LDAP server with the following example DNS names assigned by Amazon: Public DNS: ec2-123-231-312-132.compute-1.amazonaws.com Private DNS: ip-10-11-12-13.ec2.internal The instance has 123.231.312.132 public IP address and 10.11.12.13 private IP address respectively. I have also set external dns records ...

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, 0x0000000000000000 Crashed Thread: 21 Thread 21 Crashed: 0 libSystem.B.dylib 0x00007fff84...