summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/gethostbynis.c
Commit message (Collapse)AuthorAgeFilesLines
* don't see RES_USE_INET6 when called from getipnodeby*().ume2005-05-011-6/+14
|
* oops, gethostbyaddr(3) must return h_addr as an IPv4-mappedume2005-04-301-5/+4
| | | | | IPv6 address when RES_USE_INET6 was set, according to RFC 2133 section 6.2.
* handling RES_USE_INET6 better.ume2005-04-301-4/+5
|
* _gethostbynisname() didn't support RES_USE_INET6.ume2005-04-301-0/+9
|
* NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno.ume2005-04-291-1/+1
|
* we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead.ume2005-04-291-2/+4
|
* make gethostby*() thread-safe.ume2005-04-281-52/+90
|
* add IPv6 awareness for NIS query of gethostby*().ume2005-04-261-15/+56
| | | | Inspired by: NetBSD
* Make the resolver(3) and many associated interfaces much more reentrant.green2004-02-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use in_addr_t for the right size of an IPv4 address, and copy intofenner2003-01-051-1/+3
| | | | | | | an unaligned destination using bcopy instead of an assignment. Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> PR: sparc64/46729
* Fix the style of the SCM ID's.obrien2002-03-221-4/+2
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove 'register' keyword.obrien2002-03-211-1/+1
|
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-131-2/+2
|
* Set h_errno when an error is encountered.nectar2000-09-101-2/+9
| | | | | PR: bin/21092 Submitted by: Alexander Kabaev <ak03@gte.com>
* Add nsswitch support. By creating an /etc/nsswitch.conf file, you cannectar2000-09-061-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* $Id$ -> $FreeBSD$peter1999-08-281-2/+2
|
* gethostbyname2() was broken for lookups via NIS on FreeBSD/alphagallatin1999-01-251-4/+7
| | | | | due to _gethostbynis() setting h.h_length to sizeof(u_long), which works out to 8 on alphas. And 8!= NS_INADDRSZ.
* Revert $FreeBSD$ to $Id$peter1997-02-221-2/+2
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-2/+2
| | | | | | | | 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.
* Small yet significant tweaks/cleanups:wpaul1996-12-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | - getservent: o put _yp_check() proto under #ifdef YP where it belongs o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - gethostbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long - getnetbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - ether_addr: o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes, but it happens that BUFSIZ == YPMAXRECORD. - gethostbydns: o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly) These are 2.2 candidates. I will wait a few days to make sure these don't break anything and then, if there are no objections, move them to the 2.2 branch.
* Another one-liner: remember to NUL terminate local copy of NIS hostwpaul1996-12-241-2/+3
| | | | | | | | | | lookup results. Without this, doing multiple host/addr lookups in a single process yeilds strange results (the buffer is static, and garbage may be left behind from previous lookups). I just noticed this in 2.2-BETA. Unless somebody threatens to chop my hands off with an axe, I'm going to move this to the 2.2-RELENG branch shortly.
* Merge in bind-4.9.4-P1 resolver...peter1996-08-291-11/+23
|
* General -Wall warning cleanup, part I.jkh1996-07-121-2/+3
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* gethostbynis.c:wpaul1996-03-161-5/+18
| | | | | | | | | | | | | | | | | | - Fix problem described in PR #1079: _gethostbynisaddr() doesn't work. Make it accept the same arguments as all the other gethostby*addr() functions and properly convert the supplied IP address into a text string so that yp_match() can find it in the hosts.byaddr map. - Also fix potential memory leak: copy the results of yp_match() to a static buffer and free the result (yp_match() returns dynamically allocated memory). ether_addr.c: - Since I was in the neighborhood, fix ether_ntohost() and ether_hostton() so that they don't bogusly for a free(result) when yp_match() fails.
* get* rework and new bind codepst1994-09-251-0/+115
OpenPOWER on IntegriCloud