summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getaddrinfo.c
Commit message (Collapse)AuthorAgeFilesLines
* Put giant locks due to make getaddrinfo(), getnameinfo()ume2002-10-061-1/+22
| | | | | | | | | | 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-151-20/+45
| | | | | | | | KAME did the modification only to _dns_getaddrinfo(). However, it is not sufficient, and res_queryN() should be modified, too. So, I did same modification to res_queryN(). Obtained from: KAME
* Check for truncation in calls to res_send/res_query/res_search.nectar2002-09-151-1/+3
| | | | 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
* Fixed getaddrinfo to honor sortlist in /etc/resolv.confpirzyk2002-08-211-0/+82
| | | | | | | PR: bin/27939 Reviewed by: ru, sheldonh (about a year ago) Obtained from: ume (via KAME, I think) MFC after: 1 month
* Remove an #include <syslog.h>. It's already included conditionallymux2002-08-021-1/+0
| | | | | | above, as it should be. Submitted by: Olivier Houchard <cognet@ci0.org>
* 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-16/+16
|
* Remove __P() usage.obrien2002-03-211-18/+18
|
* balance parens.alfred2002-02-051-1/+1
| | | | Submitted by: mbr
* Fix cc -Wall, fix rcsid warnings, add missing prototypes,alfred2002-02-051-0/+4
| | | | | | | | | change prototypes to be the same as in the original sun tirpc code. Remove ()P macro in a file where the mayority had ()P already removed. Add them if the mayority use ()P macros. Submitted by: mbr Requested by: bde
* Return ENONAME if getaddrinfo() is called with AI_NUMERICHOSTroam2002-02-011-1/+1
| | | | | | | | | and the hostname given is not numeric. PR: 34390 Submitted by: Serge van den Boom <svdb@stack.nl> Approved by: silence from -net MFC after: 1 month
* Implement EDNS0 support, as EDNS0 support will be made mandatory forume2001-06-101-1/+5
| | | | | | | | | | | 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
* Nuke non-standard EAI_RESNULL.ume2001-03-171-8/+0
|
* Fix style that got corrupted.obrien2001-03-051-17/+17
|
* Fix FreeBSD id style breakage from rev 1.17obrien2001-03-051-1/+1
|
* Enable AI_ADDRCONFIG as a valid flag of getaddrinfo(3). Someume2001-02-191-5/+0
| | | | | | applications specify AI_ADDRCONFIG and fail to run under FreeBSD. Latest mews is known. Now, getaddrinfo(3) behaves according to AI_ADDRCONFIG.
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add nsswitch support. By creating an /etc/nsswitch.conf file, you cannectar2000-09-061-234/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use _close() instead of close() in addrconfig() to keep it from becoming ajasone2000-07-211-3/+3
| | | | potential cancellation point in libc_r.
* reject empty scopeid. use strtoul() for checking all-numericness ofitojun2000-07-091-8/+15
| | | | | portname. explicitly reject empty numeric portname. sync with kame. based on comments from itohy@netbsd.org
* sync with kame.itojun2000-07-051-29/+50
| | | | | - better return code. from enami@netbsd - do not use "class" as variable name. C++ guy had trouble with it.
* Don't call _getipnodebyname_multi(). It fixes the problem thatume2000-06-201-190/+1216
| | | | | | | | | getaddrinfo() accidentally returns IPv4 mapped IPv6 address instead of native IPv4 address. Now, getaddinfo() is scoped address ready. You can put scoped address within /etc/hosts. Obtained from: KAME Project.
* Change getaddrinfo() resolve ordershin2000-04-201-44/+23
| | | | | | | | | | | from all AAAA trial, then all A trial to try AAAA and A for each trial TODO: more fix for the case where IPv4 mapped IPv6 addr is disabled Reviewed by: ume
* Change IPv6 scoped addr format again based on recent standard discussion.shin2000-02-191-2/+2
| | | | | | | | | Sorry for the flapping, but no change will be done for 4.0 anymore. Official standard will be published around April or later. If different format would be adopted at that time, then support for the new format will be added to the succeeding FreeBSD 4.x. Approved by: jkh
* Let getaddrinfo() and related functions supports traditional IPv4 formatshin2000-02-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | (shortend format, etc) Current KAME getaddrinfo() supports only d.d.d.d format IPv4 addr. But traditionally inet_aton() and etc support other formats. (shortend format and octal/deciaml/hex format) Aboud this, -As far as the discussion on freebsd-current, many people think traditional format should also be supported by getaddrinfo(). -X/Open spec requires getaddrinfo() also support those traditional IPv4 format. -RFC2553 say nothing about it. -As the result of confirmation in ietf/ipng list, there is no clear concensus yet, and the reply was, "RFC2553 update and X/Open spec will be in sync" So takeing these conditions into account, I think getaddrinfo() should also support traditional IPv4 format. Specified by: Marc Schneiders <marc@oldserver.demon.nl> Approved by: jkh
* IPv6 scoped addr format is changed as recent KAME change.shin2000-02-091-2/+2
| | | | | | | | | | | | | | KAME scoped addr format is changed recently. before: addr@scope now: scope%addr Because the end of IPv6 numeric addr is tend to be truncated in `netstat -rn ` output, so placing scope part at starting of addr will be convenient. Approved by: jkh Obtained from: KAME project
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),jasone2000-01-271-1/+1
| | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen
* Fix getaddrinfo() behaviour to be more compliant with RFC2553. Patches areshin2000-01-261-116/+17
| | | | | | | | | | | | obtained from itojun. -don't filter address families which are not supported by system at FQDN resolving. -don't do reverse lookup I think I checked all lib and tools which use getaddrinfo() if this change affect them. Obtained from: KAME project
* added IPv4 mapped IPv6 addr consideration for getaddrinfo() reverse lookup caseshin2000-01-131-1/+4
|
* Add three-tier symbol naming in support of POSIX thread cancellationjasone2000-01-121-2/+2
| | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
* Small bug fix and improvementsshin1999-12-281-0/+7
| | | | | | | | (1)added error check of if_nameindex() return value at getaddrinfo(). (2)print out more detailed information when getaddrinfo() error value is EAI_SYSTEM.(in this case system error num is kept in errno) (1) is Discovered by: jinmei@kame.net in KAME environment.
* Getaddrinfo(), getnameinfo(), and etc support in libc/net.shin1999-12-281-0/+1014
Several udp and raw apps IPv6 support. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
OpenPOWER on IntegriCloud