HomeFreeBSD

netdb.h: re-enable EAI_ADDRFAMILY, EAI_NODATA

Description

netdb.h: re-enable EAI_ADDRFAMILY, EAI_NODATA

EAI_ADDRFAMILY and EAI_NODATA are not in RFC 3493, but are available
and used in many other systems. It is desirable to have at least one
of them in order to distinguish between names that do not resolve and
those that do not have the requested address type. A change to
getaddrinfo() will use EAI_ADDRFAMILY. Both were "#if 0"; re-enable,
conditioned on BSD_VISIBLE, and update comments. Also add comments
and
BSD_VISIBLE conditional for the last three EAI errors, which
are not in the RFC or POSIX. Note, all of these are available in
NetBSD and OpenBSD, and EAI_ADDRFAMILY and EAI_NODATA are available
in Linux (glibc).

Reviewed in https://reviews.freebsd.org/D37139 with related changes.

Reviewed by: bz

(cherry picked from commit 40e4e12bd84154626d5b46c3e862c79da25bc403)

Details

Provenance
karelsAuthored on Nov 2 2022, 3:43 PM
Parents
rGc6ec1b441ad3: Add support for adding default routes for other FIBs
Branches
Unknown
Tags
Unknown