EADDRNOTAVAIL when binding 127.0.0.1 on localhost?

Posted by Jonas Byström on Stack Overflow See other posts from Stack Overflow or by Jonas Byström
Published on 2010-02-11T12:38:49Z Indexed on 2010/04/28 17:57 UTC
Read the original article Hit count: 307

Filed under:
|
|

I'm getting errno==49 (EADDRNOTAVAIL) when trying to UDP-bind() to 127.0.0.1:47346 running Mac OS X on a G5 (big endian PowerPC). Is there something preventing me from doing so? I've tried other addresses and ports (192.168.1.2 and port 47346) but with no success.

Here's a gdb printout of my sockaddr_in:

$1 = {
  sin_len = 0 '\0', 
  sin_family = 2 '\002', 
  sin_port = 47346, 
  sin_addr = {
    s_addr = 3232235778
  }, 
  sin_zero = "???\000\000??"
}

© Stack Overflow or respective owner

Related posts about sockets

Related posts about darwin