summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/asr_private.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* To allow us to get rid of /etc/networks, make getnetby*(3)schwarze2018-04-281-9/+2
| | | | | | wrappers around gethostby*_async(3). If you had anything of importance in /etc/networks, specify it in /etc/hosts instead. Feedback and OK eric@, OK deraadt@
* Add support for RES_USE_DNSSECjca2017-02-271-2/+2
| | | | | | | | | | | | RES_USE_DNSSEC is implemented by setting the DNSSEC DO bit in outgoing queries. The resolver is then supposed to set the AD bit in the reply if it managed to validate the answer through DNSSEC. Useful when the application doesn't implement validation internally. This scheme assumes that the validating resolver is trusted and that the communication channel between the validating resolver and and the client is secure. ok eric@ gilles@
* Recognize and allow bits AD and CD in DNS replies.jca2017-02-271-2/+4
| | | | | | Needed for RES_USE_DNSSEC support. ok eric@ gilles@
* Put a common flags field in the query struct, rather than in somejca2017-02-271-4/+2
| | | | | | | | | elements of the union. This field is for internal asr flags. The flags in "struct rrset" and "struct ni" are different kinds of flags. ok eric@
* Put a common subq pointer in the query struct, rather than one in eacheric2017-02-231-7/+2
| | | | | | element of the union. ok gilles@ millert@ krw@
* Add EDNS0 support.jca2017-02-181-1/+3
| | | | | | | EDNS allows for various DNS extensions, among which UDP DNS packets size bigger than 512 bytes. The default is still to not advertize anything. ok eric@
* use common errnos instead of random strings as error indicators ineric2017-02-171-3/+3
| | | | | | pack/unpack contexts. ok krw@ deraadt@
* Remove prototype for static function _asr_resolver. Eliminates gcckrw2016-12-181-2/+1
| | | | | | | whining about undefined static in all the .c files that include asr_private.h. _asr_resolver() is defined and used in asr.c only. ok kettenis@
* Declare all _asr_* debug functions as hidden.jca2016-08-201-8/+8
| | | | Reported by & similar diff by guenther@ some time ago, ok eric@
* Remove support for HOSTALIASES from the resolver. This "open and parsederaadt2015-12-161-2/+1
| | | | | | | | any file indicated by an environment variable" feature inside the resolver is incompatible with what pledge "dns" is trying to be. It is a misguided "feature" added way back in history which almost noone uses, but everyone has to assume the risk from. ok eric florian kettenis
* Remove support for "lookup yp" in /etc/resolv.conf. This historicalderaadt2015-11-231-2/+1
| | | | | | | | wart is incompatible with pledge, because suddenly a "dns" operation needs "getpw" access to ypbind/ypserv, etc. file + dns access is enough for everyone, sorry if you were using that old SunOS 4.x style mechanism, but it is now gone. ok semarie millert florian
* We are always using _PATH_RESCONF, so no need to remember the path oneric2015-10-281-2/+1
| | | | | | the resolver. ok millert@ deraadt@
* getaddrinfo_async() shouldn't unconditionally intialize the resolverderaadt2015-10-071-1/+2
| | | | | | via _asr_use_resolver(). If the hint specifies for AI_NUMERICHOST, create a transient lookup context which won't try to open /etc/reslov.conf ok eric guenther
* Initially eric developers asr as a side-load style library for async DNS.deraadt2015-10-031-2/+2
| | | | | | | When it was integrated as the main resolver, a bunch of strange initialization code remained. Start whittling away at this, piece by piece, to make it more clear. ok eric
* missing asr* -> _asr* symbol rename for building with debug codeeric2015-10-031-10/+10
| | | | ok jca@
* Hide all unnecessary asr / resolver related API with _ prefixes.deraadt2015-09-091-32/+38
| | | | direction & ok guenther
* Rename print_sockaddr() to avoid symbol visibility problemsjca2015-06-201-2/+2
| | | | | | print_sockaddr is internal to asr, and conflicts with ports/net/samba4. ok eric@
* make sure to check for resolv.conf update the first time the resolvereric2015-06-041-1/+2
| | | | | | is used after pid has changed. ok deraadt@
* fix a possible off-by-one when reading /etc/hosts if it doesn't enderic2015-05-291-2/+2
| | | | | | with a newline. ok jca@
* simply use _PATH_HOSTS where appropriateeric2015-05-261-3/+1
|
* Limit AI_ADDRCONFIG effects to DNS queries.jca2015-02-141-1/+3
| | | | | | | | | This is what RFC 2553 initially described, sadly RFC 3493 stopped limiting scope to DNS. This can result in nonsensical failures with loopback addresses, link-local addresses, raw addresses and /etc/hosts entries. with and ok eric@ sperreault@
* Don't default enable the debug functionality with its unprotected getenv().guenther2014-04-171-5/+1
| | | | ok eric@ sthen@ deraadt@
* Cleanup and simplify the API to be exposed. Use better names foreric2014-03-251-16/+20
| | | | | | structures, functions and defines. discussed with and ok deraadt@ guenther@
* prefix structure names to avoid ambiguity and possible collisions wheneric2014-03-141-15/+15
| | | | | | the API gets public. ok deraadt@
* Make some symbols static and prefix all visible symbols with asr_eric2013-07-121-13/+13
| | | | | | to prevent collisions with third-party programs. suggested by sthen@, ok theo@
* Move search domain iteration code in res_search_async.c where it belongs.eric2013-06-011-3/+1
|
* Make hostaliases work for gethostbyname() and getaddrinfo() wheneric2013-06-011-4/+3
| | | | | | looking into /etc/hosts. Remove the alias check from the search domain iteration. Instead, take a shortcut to res_query_async_ctx() in res_search_async_ctx().
* Update asr_hostaliases() to make all necessary checks in the function.eric2013-06-011-1/+2
| | | | | Explicitely check for issetguid() before calling getenv(). Also make asr_hostalias() callable from other parts of asr too.
* iterating over the ns list only matters for res_send_async.c, so moveeric2013-06-011-4/+4
| | | | things around.
* Add minimal support for _res setup and update.eric2013-05-271-7/+5
| | | | | | | | Change res_init() to initialize the _res structure on first call, and udpate the global async context if changes were made by the user. All resolver functions now call res_init() internally. fixes issue spotted by otto@
* Do not take external buffers for storing DNS responses in the internaleric2013-04-301-9/+3
| | | | | async API. That is actually useless and it makes the code more complicated. The required buffers are always allocated when needed.
* better implementation for tcp_read() that can get the packet length ineric2013-04-021-1/+2
| | | | | | multiple read. prodded by deraadt@
* space cleanup; ok ericderaadt2013-04-011-2/+2
|
* space cleanup; ok ericderaadt2013-04-011-7/+7
|
* rename fielderic2013-04-011-2/+2
|
* simpler and saner implementation for tcp_write(). now fully handleseric2013-04-011-2/+1
| | | | | | short writes. prodded by deraadt@
* Only use the search domains for DNS lookups, as the current resolver does.eric2013-03-271-2/+2
| | | | | Better not diverge too much in behavior at this point. Typo fix and doc update while there.
* knferic2012-11-241-4/+5
|
* make separate structures for pack and unpackeric2012-11-241-9/+18
|
* cleanup asr_debug.ceric2012-09-091-12/+16
|
* use proper macros for debug traces.eric2012-09-091-3/+14
|
* make it easy to build without debug codeeric2012-09-061-1/+3
|
* Get rid of the hostaddr_async subquery and merge its behavioureric2012-09-051-6/+2
| | | | | directly into getaddrinfo_async_run. Simplifies everything by a great deal.
* Make hostaddr_async() return a linked list of struct addrinfo. Firsteric2012-09-051-26/+1
| | | | | | round of a getaddrinfo_async() simplification. The goal is to make YP support easier to add, and eventually remove the whole hostaddr_async subquery.
* rename function to avoid symbol clasheric2012-07-071-1/+2
|
* only define DEBUG internallyeric2012-04-141-1/+3
|
* Import asr, an experimental async resolver implementation.eric2012-04-141-0/+372
The idea is to eventually replace the existing resolver with something better. Time to start working on it in tree. ok deraadt@