freebsd-skq/lib/libc/net
Brian Feldman 33dee81933 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.
2004-02-25 21:03:46 +00:00
..
addr2ascii.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
addr2ascii.c
ascii2addr.c
base64.c
byteorder.3
ether_addr.c
ethers.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
getaddrinfo.3 Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
getaddrinfo.c Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
gethostbydns.c Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
gethostbyht.c
gethostbyname.3 Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
gethostbynis.c Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
gethostnamadr.c Remove bogus non-reentrant "temporary" implementation of gethostbyaddr_r() 2003-06-19 07:57:11 +00:00
getifaddrs.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
getifaddrs.c
getifmaddrs.3 Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
getifmaddrs.c Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
getipnodebyname.3 Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
getnameinfo.3 stop use of NI_WITHSCOPEID. it was deprecated. 2003-10-21 20:11:47 +00:00
getnameinfo.c Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
getnetbydns.c Unbreak world. 2004-02-07 11:13:47 +00:00
getnetbyht.c
getnetbynis.c
getnetent.3
getnetnamadr.c Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by 2003-04-24 18:05:48 +00:00
getproto.c
getprotoent.3
getprotoent.c
getprotoname.c
getservbyname.c
getservbyport.c
getservent.3
getservent.c
herror.c Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
hesiod.3
hesiod.c Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
if_indextoname.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
if_indextoname.c
if_nameindex.c
if_nametoindex.c Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
inet6_opt_init.3 Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542 2003-10-24 18:26:30 +00:00
inet6_option_space.3 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
inet6_rth_space.3 style cleanup: Remove duplicate $FreeBSD$ tags. 2004-02-10 20:40:17 +00:00
inet6_rthdr_space.3 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
inet_addr.c
inet_lnaof.c
inet_makeaddr.c
inet_net_ntop.c
inet_net_pton.c From OpenBSD: 2003-09-15 23:38:06 +00:00
inet_net.3
inet_neta.c
inet_netof.c
inet_network.c
inet_ntoa.c
inet_ntop.c
inet_pton.c
inet.3
ip6opt.c u_int8_t cannot carry a number greater than 255. 2003-11-14 18:07:50 +00:00
linkaddr.3
linkaddr.c
Makefile.inc Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
map_v4v6.c
name6.c Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
ns_name.c
ns_netint.c
ns_parse.c
ns_print.c
ns_ttl.c
nsap_addr.c
nsdispatch.3 Assorted mdoc(7) fixes. 2003-05-22 13:02:28 +00:00
nsdispatch.c Don't complain about missing NSS methods when built statically. It is 2003-04-24 19:57:31 +00:00
nslexer.l
nsparser.y
nss_backends.h
nss_compat.c It was reported that when using nss_ldap, getgrent(3) would behave 2004-01-09 13:43:49 +00:00
rcmd.3
rcmd.c
rcmdsh.3
rcmdsh.c
recv.c
res_comp.c
res_config.h
res_data.c
res_debug.c
res_init.c Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
res_mkquery.c
res_mkupdate.c
res_query.c
res_send_private.h Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
res_send.c Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
res_update.c
resolver.3 Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
rthdr.c Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542 2003-10-24 18:26:30 +00:00
send.c
sockatmark.3
sockatmark.c
vars.c