summaryrefslogtreecommitdiff
path: root/lib/libc/net/res_send.c
Commit message (Collapse)AuthorAgeFilesLines
* When _kevent() returns with errno = EINTR and timeout is notHajimu UMEMOTO2002-04-011-4/+3
| | | | | | | | | exceeded, it should be falldown to next_ns. MFC after: 1 week Notes: svn path=/head/; revision=93544
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-1/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove __P() usage.David E. O'Brien2002-03-211-3/+3
| | | | Notes: svn path=/head/; revision=92905
* - Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.Hajimu UMEMOTO2001-12-261-1/+9
| | | | | | | | | | | - Don't connect datagram socket if RES_INSECURE1. - Needed to implement IPv6 anycast UDP DNS queries as documented in <draft-ietf-ipngwg-dns-discovery-03.txt>. Obtained from: KAME Notes: svn path=/head/; revision=88504
* Bring in fix from rev 1.32 that got lost during the conversion to kqueue.Jonathan Lemon2001-06-231-8/+19
| | | | | | | | | | | This prevents an indefinte timeout in case the kevent call is interrupted for some reason. PR: 26665 MFC in: 2 weeks Notes: svn path=/head/; revision=78647
* Use the new EV_SET macro to insure that all fields in struct keventJonathan Lemon2001-02-281-5/+3
| | | | | | | | | | are correctly initialized before use. This should fix the problem with DNS. Pointy hat to: me Notes: svn path=/head/; revision=73227
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=71579
* Fix pthread cancellation point propagation.Jason Evans2000-10-121-5/+5
| | | | Notes: svn path=/head/; revision=66999
* Change from using poll(2) to kqueue/kevent when waiting for a DNSPaul Saab2000-09-121-32/+30
| | | | | | | | | | | | response to return. This will stop processes waiting on DNS requests from being woken up when a select collision occurs. This was tested on mx1.FreeBSD.org (outgoing mail for the FreeBSD.org mailing lists.) Reviewed by: jlemon, peter Notes: svn path=/head/; revision=65772
* Yank out the NOPOLL conditionals. libc_r no longer needs it, and thisPeter Wemm2000-09-041-106/+28
| | | | | | | | library depends on other things that come *way* later than poll() now (sigset size changes in particular) Notes: svn path=/head/; revision=65453
* Re-commit DNS IPv6 transport support with fixes for IPv4 onlyHajimu UMEMOTO2000-06-191-43/+116
| | | | | | | | | kernel and compatibility issue. Obtained from: KAME Project Notes: svn path=/head/; revision=61824
* Backout my previous commit.Hajimu UMEMOTO2000-06-141-69/+36
| | | | | | | | | Cannot resolve any host on IPv4 only kernel. Reported by: ache Notes: svn path=/head/; revision=61697
* DNS IPv6 transport support.Hajimu UMEMOTO2000-06-111-36/+69
| | | | | | | | | It is nessesary for IPv6 only life. Obtained from: KAME Notes: svn path=/head/; revision=61556
* Decrement the timeout being passed to poll() if poll was interrupted forJonathan Lemon2000-03-261-5/+22
| | | | | | | | | | some reason. This will prevent an infinite loop if (say) a sigalarm is being scheduled at a more frequent interval than the poll timeout. PR: 2191, 8847, 10553 Notes: svn path=/head/; revision=58637
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=56698
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-121-6/+6
| | | | | | | | | 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(). Notes: svn path=/head/; revision=55837
* Back out my backout, it was already posix compliant. Any new fields arePeter Wemm1999-09-281-1/+0
| | | | | | | | | required to be "announced" by a new bit in sa_flags to indicate the program is aware of and has taken care of them. eg: SA_SIGINFO means the program has used the sa_siginfo field (versus sa_handler). Notes: svn path=/head/; revision=51764
* Fix previous commit. The standards specifically say: "The structurePeter Wemm1999-09-281-0/+1
| | | | | | | | | | | | sigaction, used to describe an action to be taken, is defined in the header <signal.h> to include at least the following members:" ^^^^^^^^ A sigaction defined on stack with essentially random contents may have just about anything underneath fields that the program doesn't know about. It is not safe to delete the bzero. Notes: svn path=/head/; revision=51762
* Explicitly use sigemptyset to clear a sigset_t. ExplicitMarcel Moolenaar1999-09-281-1/+2
| | | | | | | initialization of sa_flags allows us to lose the bzero. Notes: svn path=/head/; revision=51759
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Implement the weak aliases for private entry points in the inet_*John Polstra1998-09-021-1/+10
| | | | | | | | | | | | | | and res_* modules in a way that works for ELF. I moved the aliases out of res_stubs.c and into the individual modules where the entry points are defined. Weak aliases don't work in ELF unless that is the case. (Actually, I'm surprised it worked for a.out.) This should fix the undefined "inet_addr" and related symbols in various applications that fail to include <arpa/inet.h> or <resolv.h> as they are supposed to do. Notes: svn path=/head/; revision=38736
* Don't compile in the use of poll() when building libc_r. This isn'tPeter Wemm1998-06-141-1/+15
| | | | | | | | so much a "fix", rather a bandaid to buy time to fix it properly within the thread engine. Notes: svn path=/head/; revision=36967
* Update the resolver parts to bind-8.1.2 level. I have not touched thePeter Wemm1998-06-111-44/+71
| | | | | | | | | getXXXXbyYYYY() interfaces yet. Obtained from: diff relative to bind-8.1.2 sources Notes: svn path=/head/; revision=36891
* Resolve some unexpected differences when comparing with the 2.2 version.Peter Wemm1998-05-021-2/+10
| | | | | | | | | One bug was relatively harmless (select's timeout had an uninitialized tv_usec), the other I'm not so sure.. (neglected to catch select returns less than zero). Both of these were irrelevant on kernels with poll(). Notes: svn path=/head/; revision=35624
* Update libc dns code to 4.9.7-T1B level. This involved chopping out largePeter Wemm1998-05-021-2/+43
| | | | | | | | | chunks of res_comp.c and replacing it with chunks of bind-8.1.1's resolver code. (There are no interface changes though) The other parts are better bounds checking related. Notes: svn path=/head/; revision=35623
* Some adjustments for the resolver use of poll(). For some reason I thoughtPeter Wemm1997-09-161-7/+8
| | | | | | | | | | an unimplemented syscall returned ENOSYS, rather than EINVAL. I have run statically linked code with this wrapper and it does appear to work fine on 2.2-stable which doesn't have poll(). ktrace shows the poll syscall fail once and the fallback to select() working. Notes: svn path=/head/; revision=29488
* Call poll(2) from within the resolver but adapt to older kernels without itPeter Wemm1997-09-141-26/+68
| | | | | | | | | | | | | | | | if necessary. This removes the need to malloc large fd_set's for selecting on high fd's (larger than FD_SETSIZE at libc compile time). The syscall adaptive stuff only happens on the very first call. SIGSYS is masked, and if the call to poll fails with ENOSYS, then we use select for the life of the program. If poll does not fail with ENOSYS, then we always use poll and skip the once-off signal masking gunk. This may be overkill, but it saved my neck a few times while working on multiple different sets of kernel sources, some with poll, some without. Notes: svn path=/head/; revision=29380
* replace the OpenBSD fd_set sizing code with something more efficient.Peter Wemm1997-06-281-9/+16
| | | | | | | | | | Only call malloc() if the fd is too big for the compiled in fd_set size, and don't use calloc either. This should reduce the impact of conflicts with private malloc implementations etc. When using the fd_set on the stack, only zero what is needed rather than all 1024 bits like FD_ZERO did. Notes: svn path=/head/; revision=27016
* Dynamically size fd_set in select rather than fail if too many filesPeter Wemm1997-06-271-8/+9
| | | | | | | | are open. Obtained from: OpenBSD; by deraadt and dm Notes: svn path=/head/; revision=26983
* Merge in bind-4.9.6 resolver changes. Note that they resolve thePeter Wemm1997-06-271-7/+3
| | | | | | | overflow problem differently. Notes: svn path=/head/; revision=26974
* Fix problem with FD_SET* overflow reporting.. Perror() didn't have enoughPeter Wemm1997-03-121-2/+6
| | | | | | | | | | args, and errno hasn't actually been set so it probably doesn't make sense to report it via strerror(). Pointed out by: bde Notes: svn path=/head/; revision=23767
* Check for overflow of FD_SETGuido van Rooij1997-03-101-1/+6
| | | | Notes: svn path=/head/; revision=23617
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Here goes.. Bring the 4.9.5-P1 resolver into -current. This has thePeter Wemm1996-12-301-26/+39
| | | | | | | | DNSSEC stuff, among other things. There are also some renamed functions, I've left out the res_stubs.c from this commit in case cvs bombs out.. Notes: svn path=/head/; revision=21057
* Sigh, back out the last bright idea I had here about compiling the res_*Peter Wemm1996-08-301-0/+741
| | | | | | | | | | | routines from contrib/bind directly. There were too many problems, including having to add -DUSE_OPTIONS_H to the entire libc source in order for the contrib code to pick up it's options, and so on. Instead, I've merged the changes, libc is now self contained again. Notes: svn path=/head/; revision=17957
* Merge in bind-4.9.4-P1 resolver...Peter Wemm1996-08-291-727/+0
| | | | Notes: svn path=/head/; revision=17903
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-121-2/+2
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYYPeter Wemm1996-01-071-57/+61
| | | | | | | parts are not quite so simple.. Notes: svn path=/head/; revision=13308
* Fix bogus include paths, some of which stopped libresolv from compiling.Bruce Evans1995-08-211-2/+2
| | | | Notes: svn path=/head/; revision=10150
* Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)Peter Wemm1995-08-201-70/+72
| | | | | | | | | | | Note that this was done by selective patching from diffs, to not conflict with the 4.4bsd base code.. This was *not* a trivial task.. I have been testing this code (apart from cosmetic changes) in my libc for a while now. Obtained from: Paul Vixie <paul@vix.com> Notes: svn path=/head/; revision=10133
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | Notes: svn path=/head/; revision=8870
* remove need for -DDEBUG from resolver code (conflict with db/hash)Paul Traina1994-09-251-38/+33
| | | | Notes: svn path=/head/; revision=3094
* get* rework and new bind codePaul Traina1994-09-251-210/+468
| | | | Notes: svn path=/head/; revision=3070
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+468
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573