summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/res_init.c
Commit message (Collapse)AuthorAgeFilesLines
* Update the resolver in libc to BIND9's one.ume2006-03-211-715/+0
| | | | | | | | | | | | | | | | | | | | | | 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)
* Use the recently introduced RES_DFLRETRY parameter instead of a well-hiddenyar2004-09-091-1/+1
| | | | constant for the default number of retries.
* Make the resolver(3) and many associated interfaces much more reentrant.green2004-02-251-9/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add support for timeout: and attempts: resolver options.murray2003-12-071-0/+20
| | | | | Submitted by: Paul Vixie <paul@vix.com> / ISC MFC After: 1 week
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-251-2/+3
|
* Fix the style of the SCM ID's.obrien2002-03-221-1/+2
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove __P() usage.obrien2002-03-211-2/+2
|
* Remove 'register' keyword.obrien2002-03-211-4/+4
|
* - Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.ume2001-12-261-0/+4
| | | | | | | | - Don't connect datagram socket if RES_INSECURE1. - Needed to implement IPv6 anycast UDP DNS queries as documented in <draft-ietf-ipngwg-dns-discovery-03.txt>. Obtained from: KAME
* Fill _res.sort_list with harmless entry. sortlist for IPv6/IPv4ume2001-08-111-0/+3
| | | | | | | | | is stored in _res_ext.sort_list, and sortlist for IPv4 is stored in _res.sort_list for backward compatibility. However, both sort_list's are maintaind by just one index _res.nsort. So, when IPv6 address is specified to sortlist, empty entry was created in _res.sort_list. It broke sortlist facility of gethostbyname(). Discussed on users@jp.ipv6.org.
* Implement EDNS0 support, as EDNS0 support will be made mandatory forume2001-06-101-0/+2
| | | | | | | | | | | 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
* Fix memory leak.sumikawa2000-10-291-0/+2
| | | | Obtained from: KAME
* Re-commit DNS IPv6 transport support with fixes for IPv4 onlyume2000-06-191-16/+37
| | | | | | kernel and compatibility issue. Obtained from: KAME Project
* Backout my previous commit.ume2000-06-141-41/+20
| | | | | | Cannot resolve any host on IPv4 only kernel. Reported by: ache
* DNS IPv6 transport support.ume2000-06-111-20/+41
| | | | | | It is nessesary for IPv6 only life. Obtained from: KAME
* Getaddrinfo(), getnameinfo(), and etc support in libc/net.shin1999-12-281-0/+59
| | | | | | | Several udp and raw apps IPv6 support. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* o use strncpy safelyimp1998-09-141-3/+8
| | | | | | | o Only allow options and domain name to be set when we aren't running setuid. Obtained from: OpenBSD
* Implement the weak aliases for private entry points in the inet_*jdp1998-09-021-1/+8
| | | | | | | | | | | and res_* modules in a way that works for ELF. I moved the aliases out of res_stubs.c and into the individual modules where the entry points are defined. Weak aliases don't work in ELF unless that is the case. (Actually, I'm surprised it worked for a.out.) This should fix the undefined "inet_addr" and related symbols in various applications that fail to include <arpa/inet.h> or <resolv.h> as they are supposed to do.
* Update the resolver parts to bind-8.1.2 level. I have not touched thepeter1998-06-111-13/+32
| | | | | | getXXXXbyYYYY() interfaces yet. Obtained from: diff relative to bind-8.1.2 sources
* Add "options no_tld_query" to resolv.conf.brian1997-09-011-1/+3
| | | | | | Mention the capability in resolver(5). Mention that RES_OPTIONS can be used in resolver(5). Discussed with: -hackers
* Merge in bind-4.9.6 resolver changes. Note that they resolve thepeter1997-06-271-2/+3
| | | | overflow problem differently.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Here goes.. Bring the 4.9.5-P1 resolver into -current. This has thepeter1996-12-301-3/+7
| | | | | DNSSEC stuff, among other things. There are also some renamed functions, I've left out the res_stubs.c from this commit in case cvs bombs out..
* Sigh, back out the last bright idea I had here about compiling the res_*peter1996-08-301-0/+454
| | | | | | | | routines from contrib/bind directly. There were too many problems, including having to add -DUSE_OPTIONS_H to the entire libc source in order for the contrib code to pick up it's options, and so on. Instead, I've merged the changes, libc is now self contained again.
* Merge in bind-4.9.4-P1 resolver...peter1996-08-291-449/+0
|
* Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYYpeter1996-01-071-20/+18
| | | | parts are not quite so simple..
* Fix bogus include paths, some of which stopped libresolv from compiling.bde1995-08-211-2/+2
|
* Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)peter1995-08-201-37/+71
| | | | | | | | Note that this was done by selective patching from diffs, to not conflict with the 4.4bsd base code.. This was *not* a trivial task.. I have been testing this code (apart from cosmetic changes) in my libc for a while now. Obtained from: Paul Vixie <paul@vix.com>
* Remove trailing whitespace.rgrimes1995-05-301-7/+7
|
* remove need for -DDEBUG from resolver code (conflict with db/hash)pst1994-09-251-9/+1
|
* get* rework and new bind codepst1994-09-251-27/+229
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+223
OpenPOWER on IntegriCloud