History log of /freebsd-11-stable/include/netdb.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 301711 08-Jun-2016 markj

Implement an NSS backend for netgroups and add getnetgrent_r(3).

This support appears to have been documented in nsswitch.conf(5) for some
time. The implementation adds two NSS netgroup providers to libc. The
default, compat, provides the behaviour documented in netgroup(5), so this
change does not make any user-visible behaviour changes. A files provider
is also implemented.

innetgr(3) is implemented as an optional NSS method so that providers such
as NIS which are able to implement efficient reverse lookup can do so.
A fallback implementation is used otherwise. getnetgrent_r(3) is added for
convenience and to provide compatibility with glibc and Solaris.

With a small patch to net/nss_ldap, it's possible to specify an ldap
netgroup provider, allowing one to query nisNetgroupTriple entries.

Sponsored by: EMC / Isilon Storage Division


# 300996 30-May-2016 ed

Add missing types and constants to <netdb.h>.

According to POSIX, the netdb.h header must also provide in_addr_t and
in_port_t. It should also provide IPPORT_RESERVED. Copy over the
necessary bits from <netinet/in.h> to achieve that.


# 292514 20-Dec-2015 ume

addrinfo.ai_family is an address family, not a protocol family.

PR: 162434
MFC after: 1 week


# 292446 18-Dec-2015 ume

Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).
We need to change netdb.h to make it actually enabled.

PR: 198092
MFC after: 1 week


# 228468 13-Dec-2011 ed

Replace __const by const in all non-contributed source code.

As C1X is close to being released, there is no need to wrap around a
feature that is already part of C90. Most of these files already use
`const' in different placed as well.


# 206155 04-Apr-2010 ume

Add capability to use a db version of services. It is enabled by
specifying `db' as source of service in /etc/nsswitch.conf.

MFC after: 2 weeks


# 203964 16-Feb-2010 imp

Remove the Berkeley clause 3's.
Add a few $FreeBSD$


# 189826 14-Mar-2009 das

Hide numerous BSD extensions in the POSIX namespace.


# 158791 21-May-2006 ume

Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
arch.

X-MFC after: never


# 158790 21-May-2006 ume

Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
too short. This conforms to RFC3493, POSIX and XPG6.

Obtained from: NetBSD


# 158477 12-May-2006 ume

Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:

http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html

gethostbyaddr_r() is changed as well.
It breaks ABI backward compatibility on 64 bit arch. So, we fix it
on 32 bit arch only for now.

Reported by: Rostislav Krasny <rosti.bsd@gmail.com>


# 157779 15-Apr-2006 ume

- make reentrant version of netdb functions glibc style API, and
expose them to outside of libc.
- make netdb functions NSS friendly.

Reviewed by: arch@ and current@ (no objection)


# 156960 21-Mar-2006 ume

Update the resolver in libc to BIND9's one.

Since, res_sendsigned(3) and the friends use MD5 functions, it is
hard to include them without having MD5 functions in libc. So,
res_sendsigned(3) is not merged into libc.

Since, res_update(3) in BIND9 is not binary compatible with our
res_update(3), res_update(3) is leaved as is, except some
necessary modifications.
The res_update(3) and the friends are not essential part of the
resolver. They are not defined in resolv.h but defined in
res_update.h separately in BIND9. Further, they are not called from
our tree. So, I hide them from our resolv.h, but leave them only
for binary backward compatibility (perhaps, no one calls them).

Since, struct __res_state_ext is not exposed in BIND9, I hide it
from our resolv.h. And, global variable _res_ext is removed. It
breaks binary backward compatibility. But, since it is not used from
outside of our libc, I think it is safe.

Reviewed by: arch@ (no objection)


# 148308 22-Jul-2005 ume

Remove padding for ABI compatibility of ai_addrlen member
from struct addrinfo. This change break ABI compatibility
on 64 bit arch.


# 146904 03-Jun-2005 ume

- Remove padding for ABI compatibility of n_net member from struct
netent.
- Change 1st argument of getnetbyaddr() to an uint32_t on 64 bit
arch as well to confirm to POSIX-2001.

These changes break ABI compatibility on 64 bit arch.
There is similar padding issue for ai_addrlen of struct addrinfo.
However, it is leaved as is for now.

Discussed on: arch@, standards@ and current@
X-MFC after: never


# 146690 27-May-2005 ume

disable defining NI_WITHSCOPEID. It was obsoleted, and was exist
only for backward compatibility since 5.2-RELEASE.


# 146244 15-May-2005 ume

- The ai_addrlen of a struct addrinfo used to be a size_t, per
RFC 2553. In XNS5.2, and subsequently in POSIX-2001 and RFC
3493, it was changed to a socklen_t. And, the n_net of a
struct netent used to be an unsigned long integer. In XNS5,
and subsequently in POSIX-2001, it was changed to an uint32_t.
To accomodate for this while preserving ABI compatibility with
the old interface, we need to prepend or append 32 bits of
padding, depending on the (LP64) architecture's endianness.
- Correct 1st argument of getnetbyaddr() to uint32_t on 32
bit arch. Stay as is on 64 bit arch for ABI backward
compatibility for now.

Reviewed by: das, peter
MFC after: 2 weeks


# 145602 27-Apr-2005 ume

hide implementation specific internal functions from netdb.h.
it is needed to make get{host,net}by*() thread-safe.


# 141908 14-Feb-2005 phantom

. Convert return type of gai_strerror() to 'const char *' as POSIX requires.
. Convert ai_errlist[] to simple 'char *' array, and appropriately
optimize gai_strerror()


# 140908 27-Jan-2005 ume

implement AI_NUMERICSERV (as defined in RFC3493).

Obtained from: KAME
MFC after: 1 week


# 126243 25-Feb-2004 green

Make the resolver(3) and many associated interfaces much more reentrant.
The getaddrinfo(3), getipnodebyname(3) and resolver(3) can coincide now
with what should be totally reentrant, and h_errno values will now
be preserved correctly, but this does not affect interfaces such as
gethostbyname(3) which are still mostly non-reentrant.

In all of these relevant functions, the thread-safety has been pushed
down as far as it seems possible right now. This means that operations
that are selected via nsdispatch(3) (i.e. files, yp, dns) are protected
still under global locks that getaddrinfo(3) defines, but where possible
the locking is greatly reduced. The most noticeable improvement is
that multiple DNS lookups can now be run at the same time, and this
shows major improvement in performance of DNS-lookup threaded programs,
and solves the "Mozilla tab serialization" problem.

No single-threaded applications need to be recompiled. Multi-threaded
applications that reference "_res" to change resolver(3) options will
need to be recompiled, and ones which reference "h_errno" will also
if they desire the correct h_errno values. If the applications already
understood that _res and h_errno were not thread-safe and had their own
locking, they will see no performance improvement but will not
actually break in any way.

Please note that when NSS modules are used, or when nsdispatch(3)
defaults to adding any lookups of its own to the individual libc
_nsdispatch() calls, those MUST be reentrant as well.


# 124558 15-Jan-2004 ume

remove EAI_NODATA aliased to EAI_NONAME.

PR: bin/61369


# 121458 24-Oct-2003 ume

style.

Reported by: bde


# 121451 24-Oct-2003 ume

oops, EAI_NONAME is not EAINONAME.


# 121439 23-Oct-2003 ume

workaround to have backward compatibility for EAI_NODATA.
it will be removed on 23 Apr 2004.

Submitted by: terry


# 121430 23-Oct-2003 ume

oops, I forget to diable EAI_ADDRFAMILY and EAI_NODATA.


# 121316 21-Oct-2003 ume

stop use of NI_WITHSCOPEID. it was deprecated.

Obtained from: KAME


# 102227 21-Aug-2002 mike

o Merge <machine/ansi.h> and <machine/types.h> into a new header
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
macros, which are only MD because of gratuitous differences between
architectures.
o Change all headers to make use of this. This mainly involves
changing:
#ifdef _BSD_FOO_T_
typedef _BSD_FOO_T_ foo_t;
#undef _BSD_FOO_T_
#endif
to:
#ifndef _FOO_T_DECLARED
typedef __foo_t foo_t;
#define _FOO_T_DECLARED
#endif

Concept by: bde
Reviewed by: jake, obrien


# 98866 26-Jun-2002 imp

Minor libc internal-only interface change for mapv4v6.


# 93032 23-Mar-2002 imp

Breath deep and take __P out of the system include files.

# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.


# 84463 04-Oct-2001 bde

Fixed order of includes. <sys/cdefs.h> must be included before
<machine/ansi.h> for the definition of __signed, unless the compiler
is gcc.

Moved the declaration of socklen_t up together with the declaration of
size_t, and removed low-quality comment about this declaration. Declaring
socklen_t in this file is normal in POSIX-1.200x, unlike declaring size_t.


# 83047 04-Sep-2001 obrien

style(9) the structure definitions.


# 80153 22-Jul-2001 mike

Remove namespace pollution.

PR: 14327
Reviewed by: des
Approved by: des
MFC after: 7 days


# 74844 27-Mar-2001 alfred

give the "netgrent" functions a home in netdb.h


# 74393 17-Mar-2001 ume

Nuke non-standard EAI_RESNULL.


# 72693 19-Feb-2001 ume

Enable AI_ADDRCONFIG as a valid flag of getaddrinfo(3). Some
applications specify AI_ADDRCONFIG and fail to run under FreeBSD.
Latest mews is known. Now, getaddrinfo(3) behaves according to
AI_ADDRCONFIG.


# 72510 15-Feb-2001 ume

Correct 2nd argument of getnameinfo(3) to socklen_t.

Reviewed by: itojun


# 65532 06-Sep-2000 nectar

Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
. getgrent, getgrnam, getgrgid
. getpwent, getpwnam, getpwuid
. getusershell
. getaddrinfo
. gethostbyname, gethostbyname2, gethostbyaddr
. getnetbyname, getnetbyaddr
. getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc. rc.network has been modified
to warn that host.conf is no longer used at boot time. In addition, if
there is a host.conf but no nsswitch.conf, the latter is created at boot
time from the former.

Obtained from: NetBSD


# 57033 08-Feb-2000 shin

Change IPv6 address scope delimeter from '@' to '%' as recent KAME change.
'@' conflicts with existing notations such as user@host, so '%' is better.

Approved by: jkh

Obtained from: KAME project


# 55163 28-Dec-1999 shin

Getaddrinfo(), getnameinfo(), and etc support in libc/net.
Several udp and raw apps IPv6 support.

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


# 50473 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 36888 11-Jun-1998 peter

Update nameserver interface to bind-8.1.2 levels. We do not use IRS (yet?)
since it has far wider impact than hostname lookups (including passwords).
Note that this has more ugly symbol hiding and binary compatability hacks
that can go away the second we bump majors.

Obtained from: Mostly from diff against ISC bind-8.1.2 sources


# 28271 16-Aug-1997 steve

Make this compile with the -traditional cc flag.

PR: misc/2189
Submitted by: Lars Koeller <Lars_Koeller@odie.physik2.uni-rostock.de>


# 26975 27-Jun-1997 peter

merge in bind-4.9.6 changes (only effect is __res_send #define reverted)


# 23037 23-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 21055 30-Dec-1996 peter

Update the resolver definitions from bind-4.9.4-P1 to 4.9.5-P1 level.
(More commits to come)


# 17902 29-Aug-1996 peter

Hand merge in the bind-4.9.4-P1 resolver updates.


# 13771 30-Jan-1996 mpp

Fix a bunch of spelling errors in the comment fields
of a bunch of system include files.


# 10132 20-Aug-1995 peter

Update the resolver include files to bind-4.9.3-beta24 level (from beta9p1)
Note: this was done by selective patching from diffs by hand, in order
to not conflict with the 4.4BSD base code. Beta9 was done the same way.

Obtained from: Paul Vixie <paul@vix.com>


# 8858 30-May-1995 rgrimes

Remove trailing whitespace.


# 1540 24-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1539,
which included commits to RCS files with non-trunk default branches.


# 1539 24-May-1994 rgrimes

BSD 4.4 Lite Include Sources