summaryrefslogtreecommitdiff
path: root/lib/libc/net/res_init.c
Commit message (Collapse)AuthorAgeFilesLines
* Use the recently introduced RES_DFLRETRY parameter instead of a well-hiddenYaroslav Tykhiy2004-09-091-1/+1
| | | | | | | constant for the default number of retries. Notes: svn path=/head/; revision=135000
* Make the resolver(3) and many associated interfaces much more reentrant.Brian Feldman2004-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. Notes: svn path=/head/; revision=126243
* Add support for timeout: and attempts: resolver options.Murray Stokely2003-12-071-0/+20
| | | | | | | | Submitted by: Paul Vixie <paul@vix.com> / ISC MFC After: 1 week Notes: svn path=/head/; revision=123236
* Use the standardized CHAR_BIT constant instead of NBBY in userland.Mike Barcroft2002-09-251-2/+3
| | | | Notes: svn path=/head/; revision=103949
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-1/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove __P() usage.David E. O'Brien2002-03-211-2/+2
| | | | Notes: svn path=/head/; revision=92905
* Remove 'register' keyword.David E. O'Brien2002-03-211-4/+4
| | | | Notes: svn path=/head/; revision=92889
* - Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.Hajimu UMEMOTO2001-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 Notes: svn path=/head/; revision=88504
* Fill _res.sort_list with harmless entry. sortlist for IPv6/IPv4Hajimu UMEMOTO2001-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. Notes: svn path=/head/; revision=81530
* Implement EDNS0 support, as EDNS0 support will be made mandatory forHajimu UMEMOTO2001-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 Notes: svn path=/head/; revision=78012
* Fix memory leak.Munechika SUMIKAWA2000-10-291-0/+2
| | | | | | | Obtained from: KAME Notes: svn path=/head/; revision=67894
* Re-commit DNS IPv6 transport support with fixes for IPv4 onlyHajimu UMEMOTO2000-06-191-16/+37
| | | | | | | | | kernel and compatibility issue. Obtained from: KAME Project Notes: svn path=/head/; revision=61824
* Backout my previous commit.Hajimu UMEMOTO2000-06-141-41/+20
| | | | | | | | | Cannot resolve any host on IPv4 only kernel. Reported by: ache Notes: svn path=/head/; revision=61697
* DNS IPv6 transport support.Hajimu UMEMOTO2000-06-111-20/+41
| | | | | | | | | It is nessesary for IPv6 only life. Obtained from: KAME Notes: svn path=/head/; revision=61556
* Getaddrinfo(), getnameinfo(), and etc support in libc/net.Yoshinobu Inoue1999-12-281-0/+59
| | | | | | | | | | Several udp and raw apps IPv6 support. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project Notes: svn path=/head/; revision=55163
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* o use strncpy safelyWarner Losh1998-09-141-3/+8
| | | | | | | | | | o Only allow options and domain name to be set when we aren't running setuid. Obtained from: OpenBSD Notes: svn path=/head/; revision=39194
* Implement the weak aliases for private entry points in the inet_*John Polstra1998-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. Notes: svn path=/head/; revision=38736
* Update the resolver parts to bind-8.1.2 level. I have not touched thePeter Wemm1998-06-111-13/+32
| | | | | | | | | getXXXXbyYYYY() interfaces yet. Obtained from: diff relative to bind-8.1.2 sources Notes: svn path=/head/; revision=36891
* Add "options no_tld_query" to resolv.conf.Brian Somers1997-09-011-1/+3
| | | | | | | | | Mention the capability in resolver(5). Mention that RES_OPTIONS can be used in resolver(5). Discussed with: -hackers Notes: svn path=/head/; revision=28982
* Merge in bind-4.9.6 resolver changes. Note that they resolve thePeter Wemm1997-06-271-2/+3
| | | | | | | overflow problem differently. Notes: svn path=/head/; revision=26974
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* Here goes.. Bring the 4.9.5-P1 resolver into -current. This has thePeter Wemm1996-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.. Notes: svn path=/head/; revision=21057
* Sigh, back out the last bright idea I had here about compiling the res_*Peter Wemm1996-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. Notes: svn path=/head/; revision=17957
* Merge in bind-4.9.4-P1 resolver...Peter Wemm1996-08-291-449/+0
| | | | Notes: svn path=/head/; revision=17903
* Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYYPeter Wemm1996-01-071-20/+18
| | | | | | | parts are not quite so simple.. Notes: svn path=/head/; revision=13308
* Fix bogus include paths, some of which stopped libresolv from compiling.Bruce Evans1995-08-211-2/+2
| | | | Notes: svn path=/head/; revision=10150
* Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)Peter Wemm1995-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> Notes: svn path=/head/; revision=10133
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-7/+7
| | | | Notes: svn path=/head/; revision=8870
* remove need for -DDEBUG from resolver code (conflict with db/hash)Paul Traina1994-09-251-9/+1
| | | | Notes: svn path=/head/; revision=3094
* get* rework and new bind codePaul Traina1994-09-251-27/+229
| | | | Notes: svn path=/head/; revision=3070
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+223
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573