summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/name6.c
Commit message (Collapse)AuthorAgeFilesLines
* - Getipnodebyname() and getipnodebyaddr() reimplemented throughbushman2007-07-311-1387/+72
| | | | | | gethostbyname() and gethostbyaddr() accordingly Approved by: re (kensmith), brooks (mentor)
* Fix build w/o INET6.yar2006-07-261-0/+2
| | | | Submitted by: Andre Albsmeier <Andre.Albsmeier siemens com>
* stop use of mutex lock in ICMP lookup.ume2006-07-231-18/+5
| | | | MFC after: 1 week
* - draft-ietf-ipngwg-icmp-namelookups-09ume2006-07-211-79/+164
| | | | | | | | | - make it compilable It still requires root privilege and is experimental. Obtained from: KAME MFC after: 1 week
* - Extend the nsswitch to support Services, Protocols and Rpcume2006-04-281-0/+259
| | | | | | | | databases. - Make nsswitch support caching. Submitted by: Michael Bushkov <bushman__at__rsu.ru> Sponsored by: Google Summer of Code 2005
* - Use ANSI C prototype.ume2006-03-251-28/+14
| | | | - Remove trailing space.
* Update the resolver in libc to BIND9's one.ume2006-03-211-37/+54
| | | | | | | | | | | | | | | | | | | | | | 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)
* The KAME's getipnodebyaddr() code honor the MULTI_PTRS_ARE_ALIASESume2005-11-151-0/+1
| | | | | | | | | define also, but res_config.h was not included into libc/net/name6.c. So getipnodebyaddr() ignored the multiple PTRs. PR: kern/88241 Submitted by: Dan Lukes <dan__at__obluda.cz> MFC after: 3 days
* reduce cast.ume2005-05-271-3/+3
| | | | MFC after: 1 week
* Submitted by: Jinmei Tatuya, Hajimu Umemotognn2005-05-141-2/+2
| | | | | | | | | | Reviewed by: rwatson at freebsd dot org Approved by: rwatson at freebsd dot org MFC after: 1 week Fix the matchlen() function so that it handles the IPv4 (AF_INET) case correctly. Until now it has been treating IPv4 addresses as if they were IPv6 which could lead to corruption errors.
* raise readability bit.ume2005-05-131-7/+7
|
* the 3rd argument of getsockname() should be socklen_t*.ume2005-05-021-1/+2
| | | | Submitted by: stefanf
* oops, we don't need previous change.ume2005-05-011-8/+4
|
* make it compilable without YP definition.ume2005-05-011-5/+9
|
* we don't need mutex lock to call _gethostbynis*(), anymore.ume2005-04-281-10/+2
|
* _gethostbynis{addr,name}() can handle an IPv6, now.ume2005-04-281-16/+11
|
* hide implementation specific internal functions from netdb.h.ume2005-04-271-0/+1
| | | | it is needed to make get{host,net}by*() thread-safe.
* - nuke deprecated and unused getnodeby(3).ume2005-04-191-31/+0
| | | | | | - remove unused variable. Obtained from: KAME
* unbreak build without YP defined.ume2005-04-091-0/+4
| | | | Submitted by: Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
* - we are no longer shareing any resources to be locked betweenume2005-04-061-17/+6
| | | | | | getaddrinfo(3) and getipnodeby*(3). - use definitions in reentrant.h. - remove obsolete comment.
* add missing mutex unlock.ume2005-04-051-0/+1
|
* nuke the logic for AF_UNSPEC and simplify. once, it was introducedume2005-04-021-301/+47
| | | | | to improve getaddrinfo(3). but, it is not needed for a long time since getaddrinfo(3) became providing its own res_*N() functions.
* make _getipnodebyname_multi() static.ume2005-01-271-1/+1
|
* now e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.intume2004-07-211-1/+1
| | | | Obtained from: KAME
* use source address as a hint to determine destination addressume2004-06-021-50/+361
| | | | by getipnodebyname().
* Add a missing "*errp = h_errno" forgotten in rev 1.36.pb2004-04-061-1/+2
|
* Fix _dns_ghbyname() to return NS_TRYAGAIN instead of NS_NOTFOUNDpb2004-04-051-4/+12
| | | | | | | | | on temporary nameserver failure. This is necessary to get getipnodebyname(3) to correctly return h_errno=TRY_AGAIN instead of HOST_NOT_FOUND. Reviewed by: green, thomas MFC after: 1 week
* Make the resolver(3) and many associated interfaces much more reentrant.green2004-02-251-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 destination address selection support for getipnodebyname(3).ume2004-02-201-1/+225
| | | | | though getipnodebyname(3) is obsoleted api, some major applications such as Mozilla are still using it. so, it will help ipv4 users.
* Replace use of a spinlock with a mutex.deischen2003-05-041-6/+5
|
* Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' bynectar2003-04-241-2/+2
| | | | | | namespace.h. Sponsored by: DARPA, Network Associates Laboratories
* Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).nectar2003-02-161-4/+2
| | | | | | | Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
* query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.ume2002-10-231-51/+77
| | | | | Obtained from: KAME MFC after: 1 week
* Put giant locks due to make getaddrinfo(), getnameinfo()ume2002-10-061-0/+19
| | | | | | | | | | and getipnodeby*() thread-safe. Our res_*() is not thread-safe. So, we share lock between getaddrinfo() and getipnodeby*(). Still, we cannot use getaddrinfo() and getipnodeby*() in conjunction with other functions which call res_*(). Requested by: many people
* Allocate 64K recieve buffer for DNS responses.ume2002-09-161-27/+48
|
* Check for truncation in calls to res_send/res_query/res_search.nectar2002-09-151-4/+10
| | | | Fail when it is detected.
* Backout the increase of MAXPACKET from 1024 to 65536: itnectar2002-09-151-1/+5
| | | | | | broke pthreads. Reported by: mbr, tjr
* When using res_send/res_query/res_search, the caller must eithernectar2002-09-131-5/+1
| | | | | | | | | insure enough space is available for the response, or be prepared to resize the buffer and retry as necessary. Do the conservative thing and make sure enough space is available. Reviewed by: silence on freebsd-audit
* Remove two lines that were cvs merged that shouldn't have been. Thisimp2002-06-261-2/+0
| | | | | | fixes the build. Reported by: dillon.
* Include more robust checking of end of buffer that more completelyimp2002-06-261-18/+10
| | | | plugs the hole.
* Avoid remote buffer overflow on hostbuf[].imp2002-06-261-1/+3
| | | | Submitted by: joost Pol <joost@pine.nl>
* Fix the style of the SCM ID's.obrien2002-03-221-1/+3
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove multi-line __P() usage.obrien2002-03-221-2/+2
|
* Remove __P() usage.obrien2002-03-211-1/+1
|
* Remove 'register' keyword.obrien2002-03-211-4/+4
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix getipnodebyname(3) bug.nectar2000-09-071-3/+4
| | | | Submitted by: ume
* Add nsswitch support. By creating an /etc/nsswitch.conf file, you cannectar2000-09-061-138/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* To define A RR to root (.) is valid in DNS. So, h_name = "" shouldn'tume2000-07-191-2/+2
| | | | | | | | be treated as NULL. PR: bin/19816 Submitted by: Bill Fenner <fenner@research.att.com> Reviewed by: Atsushi Onoe <onoe@sm.sony.co.jp>
* Previous commit broke the case of chained CNAME entries. Instead handlekris2000-07-031-6/+18
| | | | | | | the bogus case by being stricter about errors. Submitted by: itojun Obtained from: KAME
OpenPOWER on IntegriCloud