Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2014 15:44:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 189268] 3 getaddrinfo(3) - hostanme="localhost", but it returns IN_ADDR_ANY (0.0.0.0)
Message-ID:  <bug-189268-9-hZrnB3sJzA@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-189268-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-189268-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D189268

--- Comment #10 from Benjamin Kaduk <bjk@FreeBSD.org> ---
(In reply to dreamcat4 from comment #9)
> For PF_INET6 hints, the returned structure says it is of type ai_family
> '0x1C' (which is '28' in decimal base 10).
>=20
> If we look in the header file '/usr/include/sys/socket.h', we see that
> returned type is: AF_ISDN
>=20
> :/
>=20
> Maybe that aught to be a returned value of type '30' (0x1E) for PF_INET6.
> Since that was the type we actually requested?
>=20
>=20
> #define pseudo_AF_PIP	25		/* Help Identify PIP packets */
> #ifdef __APPLE__
> /*define pseudo_AF_BLUE	26	   Identify packets for Blue Box - Not used */
> #define AF_NDRV		27		/* Network Driver 'raw' access */
> #endif
> #define	AF_ISDN		28		/* Integrated Services Digital Network*/
> #define	AF_E164		AF_ISDN		/* CCITT E.164 recommendation */
> #define	pseudo_AF_KEY	29		/* Internal key-management function */
> #endif	/* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
> #define	AF_INET6	30		/* IPv6 */
> #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
> #define	AF_NATM		31		/* native ATM access */
> #ifdef __APPLE__
> #define AF_SYSTEM	32		/* Kernel event messages */

I think you are looking at the /usr/include/sys/socket.h from an OS X machi=
ne,
not a FreeBSD machine.  On my FreeBSD machine, AF_INET6 is decimal 28, matc=
hing
the 0x1c you see.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-189268-9-hZrnB3sJzA>