summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/gethostnamadr.c
Commit message (Collapse)AuthorAgeFilesLines
* - When there is no room for returning the result, nss backendume2010-08-131-5/+17
| | | | | | | | | | have to return ERANGE and terminate with NS_RETURN. - When gethostbyname_r(3) and the friends end with an error, set errno to the value nss backend returns, and return errno value. PR: kern/131623 MFC after: 2 weeks
* Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bitume2006-05-211-25/+22
| | | | | | arch. X-MFC after: never
* Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:ume2006-05-121-4/+14
| | | | | | | | | | http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html gethostbyaddr_r() is changed as well. It breaks ABI backward compatibility on 64 bit arch. So, we fix it on 32 bit arch only for now. Reported by: Rostislav Krasny <rosti.bsd@gmail.com>
* - Extend the nsswitch to support Services, Protocols and Rpcume2006-04-281-1/+295
| | | | | | | | databases. - Make nsswitch support caching. Submitted by: Michael Bushkov <bushman__at__rsu.ru> Sponsored by: Google Summer of Code 2005
* - make reentrant version of netdb functions glibc style API, andume2006-04-151-186/+225
| | | | | | | expose them to outside of libc. - make netdb functions NSS friendly. Reviewed by: arch@ and current@ (no objection)
* Update the resolver in libc to BIND9's one.ume2006-03-211-18/+22
| | | | | | | | | | | | | | | | | | | | | | 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)
* oops, gethostbyaddr(3) must return h_addr as an IPv4-mappedume2005-04-301-0/+5
| | | | | IPv6 address when RES_USE_INET6 was set, according to RFC 2133 section 6.2.
* - do validation check and IPv4-mapped IPv6 address handling beforeume2005-04-291-1/+36
| | | | | | | | | any query. - don't query against IPv6 link-local address. - use IN6_IS_ADDR_V4{MAPPED,COMPAT} macros. - use memcpy() instead of bcopy(). Inspired by: NetBSD
* sync _map_v4v6_host*() with bind9's. it treats align better bit.ume2005-04-281-1/+1
| | | | Obtained from: BIND9
* make gethostby*() thread-safe.ume2005-04-281-70/+162
|
* hide implementation specific internal functions from netdb.h.ume2005-04-271-0/+1
| | | | it is needed to make get{host,net}by*() thread-safe.
* ensure parsing numeric address before any host query.ume2005-04-251-13/+126
| | | | Inspired by: NetBSD
* Remove bogus non-reentrant "temporary" implementation of gethostbyaddr_r()kris2003-06-191-19/+0
| | | | | | | that has been here for 6 years and 9 months. Reviewed by: deischen MFC After: 1 week
* Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' bynectar2003-04-241-2/+4
| | | | | | namespace.h. Sponsored by: DARPA, Network Associates Laboratories
* 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.
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-131-2/+2
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
* Make RES_OPTIONS=inet6 work.ume2000-10-271-0/+4
| | | | | | Basically PR22196, but slightly modified. PR: bin/22196
* Add nsswitch support. By creating an /etc/nsswitch.conf file, you cannectar2000-09-061-120/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add unsigned char cast to isalphaache1999-11-041-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-2/+2
|
* Removed unnecessary initialization of hp in gethostbyaddr_r.alex1997-12-251-3/+3
|
* 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.
* Merge in bind-4.9.4-P1 resolver...peter1996-08-291-17/+20
|
* Submitted by: John Birrell <cimaxp1!jb@werple.net.au>julian1996-08-201-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here are the diffs for libc_r to get it one step closer to P1003.1c These make most of the thread/mutex/condvar structures opaque to the user. There are three functions which have been renamed with _np suffixes because they are extensions to P1003.1c (I did them for JAVA, which needs to suspend/resume threads and also start threads suspended). I've created a new header (pthread_np.h) for the non-POSIX stuff. The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented doesn't work. I think its best to delete it. I don't think libc_r needs tags anyway, 'cause most of the source is in libc which does have tags. also: Here's the first batch of man pages for the thread functions. The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was inherited from /usr/src/lib/libc/Makefile that should only be done with libc. also: I should have sent this diff with the pthread(3) man page. It allows people to type make -DWANT_LIBC_R world to get libc_r built with the rest of the world. I put this in the pthread(3) man page. The default is still not to build libc_r. also: The diff attached adds a pthread(3) man page to /usr/src/share/man/man3. The idea is that without libc_r installed, this man page will give people enough info to know that they have to build libc_r.
* General -Wall warning cleanup, part I.jkh1996-07-121-2/+7
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Change strtok() to strsep(), cause memory corruption for allache1995-03-241-10/+16
| | | | | | | programs which use strtok() too in the same time. Fix potential NULL reference, depends of /etc/hosts.conf format Fix the bug when service name fetched always from beginning of the line, not from parsed token.
* get* rework and new bind codepst1994-09-251-485/+37
|
* Fix gethostbyaddr():csgr1994-08-281-2/+2
| | | | | call _getdnsbyaddr() instead of _getdnsbyname() ;-) Submitted by: Geoff
* Fixed typo.wollman1994-08-091-2/+2
|
* Add (substantially re-written) support for /etc/host.conf, and reintegratedwollman1994-08-091-11/+196
| | | | | | | | | 1.1.5 support for YP, fixing a bug in 1.1.5 that prevented YP from ever working reliably. (I'm amazed that there were no bug reports.) IWBRNI someone could write a host.conf(5) manual page. Please look at the code before doing so; this version is somewhat more flexible in the format of its input.
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+452
OpenPOWER on IntegriCloud