History log of /freebsd-current/include/resolv.h
Revision Date Author Comments
# 58cf91d3 08-Jan-2024 Jan Beich <jbeich@FreeBSD.org>

resolv: Add a required include to resolv.h

Add a required include to resolv.h for sockaddr_in. This should reduce
patching required when porting code written with Linux or NetBSD in mind.

PR: 182466
MFC after: 1 week


# 5a1d1441 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

include: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 42b38843 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/


# 6e778a7e 08-Dec-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

SPDX: license IDs for some ISC-related files.


# 2321c474 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

include: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# c70540ec 14-Dec-2015 Eric van Gyzen <vangyzen@FreeBSD.org>

resolver: preserve binary compatibility; reduce header pollution

In r289315, I added new fields to res_state. This broke binary
backward compatibility. It also broke some ports (and possibly
other code) by requiring the definition of time_t and struct timespec.

Fix these problems by moving the new fields into __res_state_ext.

Suggested by: ume
Reviewed by: ume
MFC after: 3 days
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D4472


# d7acdd2f 08-Dec-2015 Eric van Gyzen <vangyzen@FreeBSD.org>

resolver: fix the build of some ports, broken by r289315

r289315 required time_t and struct timespec to be defined before
including <resolv.h>. This broke the build of net-mgmt/sx, at least.

Include <sys/timespec.h> in resolv.h to fix this with minimal pollution.

Reported by: Raphael Kubo da Costa <rakuco>
MFC after: 3 days
Sponsored by: Dell Inc.


# 60b27ebb 14-Oct-2015 Eric van Gyzen <vangyzen@FreeBSD.org>

resolver: automatically reload /etc/resolv.conf

On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed. If so, reload the file and reinitialize
the resolver library. However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.

This new behavior is enabled by default. Add a "reload-period" option
to disable it or change the period of the test.

Document this behavior and option in resolv.conf(5).

Polish the man page just enough to appease igor.

https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html

Reviewed by: kp, wblock
Discussed with: jilles, imp, alfred
MFC after: 1 month
Relnotes: yes
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D3867


# 046c3635 05-Aug-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

Bring final version of libbind:

From
http://www.isc.org/downloads/libbind/

The libbind functions have been separated from the BIND suite as of BIND
9.6.0. Originally from older versions of BIND, they have been continually
maintained and improved but not installed by default with BIND 9. This
standard resolver library contains the same historical functions and
headers included with many Unix operating systems. In fact, most
implementations are based on the same original code.

At present, NetBSD maintains libbind code, now known as "netresolv".


# 2f98c0ba 07-Jan-2012 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for include/


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# f2556687 16-Feb-2010 Warner Losh <imp@FreeBSD.org>

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


# 54ebdd63 14-Dec-2008 Hajimu UMEMOTO <ume@FreeBSD.org>

Merge the resolver part of BIND 9.4.3 into HEAD.
It includes the following fix:

2426. [bug] libbind: inet_net_pton() can sometimes return the
wrong value if excessively large netmasks are
supplied. [RT #18512]

Reported by: Maksymilian Arciemowicz <cxib__at__securityreason.com>


# 9aeb4147 14-Dec-2008 Hajimu UMEMOTO <ume@FreeBSD.org>

Import the resolver part of BIND 9.4.3.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# dde4a85d 03-Jun-2007 Hajimu UMEMOTO <ume@FreeBSD.org>

Merge BIND 9.4.1 into main chunk.

MFC after: 2 weeks


# 861249f5 03-Jun-2007 Hajimu UMEMOTO <ume@FreeBSD.org>

Vendor import of BIND 9.4.1


# d808369a 21-May-2006 Hajimu UMEMOTO <ume@FreeBSD.org>

Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.

X-MFC after: never


# 2d39807f 12-May-2006 Hajimu UMEMOTO <ume@FreeBSD.org>

Comment out the function prototypes which our libc actually
doesn't have.


# 5342d17f 21-Mar-2006 Hajimu UMEMOTO <ume@FreeBSD.org>

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)


# f85162f0 21-Mar-2006 Hajimu UMEMOTO <ume@FreeBSD.org>

Vendor import of BIND 9.3.2


# f9ad25aa 24-Feb-2006 Hajimu UMEMOTO <ume@FreeBSD.org>

Decrease the value of RES_DFLRETRY from 4 to 2.

PR: bin/62139
Reported by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from: BIND9
MFC after: 1 week


# 533dcdac 12-Sep-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

Don't declare ___res_ext() twice.


# b22ae8ba 09-Sep-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Add the macro RES_DFLRETRY long-promised by resolver(5).
It specifies the default number of retries per a name server.
This makes the code consistent with the manpage and allows to
kill another constant in res_init.c that should have been a
#define'd parameter. (This appears to be a case when the manpage
was better than the code, so the latter was to be fixed.)

PR: bin/62139 (in the audit trail)


# 5b3ce021 15-Mar-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Don't try to pass off a struct sockaddr as a struct sockaddr_in when it
may in fact very well be a struct sockaddr_in6. Just use plain struct
sockaddr.

This brings us yet another step closer to a clean -O2 build.


# 33dee819 25-Feb-2004 Brian Feldman <green@FreeBSD.org>

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.


# a298e0ba 06-Dec-2003 Murray Stokely <murray@FreeBSD.org>

Add support for timeout: and attempts: resolver options.

Submitted by: Paul Vixie <paul@vix.com> / ISC
MFC After: 1 week


# 2bbd7cf8 27-Feb-2003 Jacques Vidrine <nectar@FreeBSD.org>

Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.


# bb28f3c2 23-Mar-2002 Warner Losh <imp@FreeBSD.org>

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.


# ce6282db 10-Jun-2001 Hajimu UMEMOTO <ume@FreeBSD.org>

Implement EDNS0 support, as EDNS0 support will be made mandatory for
IPv6 transport-ready resolvers/DNS servers. Need careful configuration
when enable it. (default config is not affected).
See manpage for details.

XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.

Obtained from: KAME/NetBSD


# 7d56d374 27-Dec-1999 Yoshinobu Inoue <shin@FreeBSD.org>

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


# a4add9a9 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# d54358ff 07-Sep-1998 Brian Somers <brian@FreeBSD.org>

Remove the extern decl of ``h_errno''. It's already
externed in netdb.h - where all of its #define values
live. If anything requires h_errno here (nothing in
/usr/src seems to) it's almost definitely broken.


# 71e8a85c 10-Jun-1998 Peter Wemm <peter@FreeBSD.org>

Damn, bind8 includes added <arpa/nameser.h> as a prerequisite for
<resolv.h>. This breaks user ppp at least, and goodness knows how
many ports. :-(

This a bit of a hack, but is probably simpler than duplicating the
typedefs and protecting them from each other.

Also, remove some temporary XXX notes that I forgot to remove before.


# 0160f9c0 11-Jun-1998 Peter Wemm <peter@FreeBSD.org>

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


# a367bd9e 31-Aug-1997 Brian Somers <brian@FreeBSD.org>

Add "options no_tld_query" to resolv.conf.
Mention the capability in resolver(5).
Mention that RES_OPTIONS can be used in resolver(5).
Discussed with: -hackers


# 4ebe87f9 27-Jun-1997 Peter Wemm <peter@FreeBSD.org>

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


# f756433e 07-May-1997 Eivind Eklund <eivind@FreeBSD.org>

Back out all of yesterdays include file changes.


# 48ea0bec 06-May-1997 Eivind Eklund <eivind@FreeBSD.org>

Make a lot of include-files self-contained. I excluded the patches changing
int's to gid_t and uid_t - should I commit these, too?

Closes PR misc/2625.

Submitted by: Julian Assange <proff@iq.org>


# 79403fe3 23-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

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.


# 315d6d9c 30-Dec-1996 Peter Wemm <peter@FreeBSD.org>

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


# 74b3fad6 29-Aug-1996 Peter Wemm <peter@FreeBSD.org>

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


# 71d9c781 30-Jan-1996 Mike Pritchard <mpp@FreeBSD.org>

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


# 25c570d8 06-Jan-1996 Peter Wemm <peter@FreeBSD.org>

Update resolver include files to bind-4.9.3-rel level


# d58a9efd 20-Aug-1995 Peter Wemm <peter@FreeBSD.org>

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>


# 4399be3c 29-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 1363f04c 24-Sep-1994 Paul Traina <pst@FreeBSD.org>

get* rework and new bind code


# 59deaec5 24-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Include Sources