summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/res_send.c
Commit message (Collapse)AuthorAgeFilesLines
* When _kevent() returns with errno = EINTR and timeout is notume2002-04-011-4/+3
| | | | | | exceeded, it should be falldown to next_ns. MFC after: 1 week
* Fix the style of the SCM ID's.obrien2002-03-221-1/+2
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove __P() usage.obrien2002-03-211-3/+3
|
* - Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.ume2001-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
* Bring in fix from rev 1.32 that got lost during the conversion to kqueue.jlemon2001-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
* Use the new EV_SET macro to insure that all fields in struct keventjlemon2001-02-281-5/+3
| | | | | | | are correctly initialized before use. This should fix the problem with DNS. Pointy hat to: me
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-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
* Fix pthread cancellation point propagation.jasone2000-10-121-5/+5
|
* Change from using poll(2) to kqueue/kevent when waiting for a DNSps2000-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
* Yank out the NOPOLL conditionals. libc_r no longer needs it, and thispeter2000-09-041-106/+28
| | | | | library depends on other things that come *way* later than poll() now (sigset size changes in particular)
* Re-commit DNS IPv6 transport support with fixes for IPv4 onlyume2000-06-191-43/+116
| | | | | | kernel and compatibility issue. Obtained from: KAME Project
* Backout my previous commit.ume2000-06-141-69/+36
| | | | | | Cannot resolve any host on IPv4 only kernel. Reported by: ache
* DNS IPv6 transport support.ume2000-06-111-36/+69
| | | | | | It is nessesary for IPv6 only life. Obtained from: KAME
* Decrement the timeout being passed to poll() if poll was interrupted forjlemon2000-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
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),jasone2000-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
* Add three-tier symbol naming in support of POSIX thread cancellationjasone2000-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().
* Back out my backout, it was already posix compliant. Any new fields arepeter1999-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).
* Fix previous commit. The standards specifically say: "The structurepeter1999-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.
* Explicitly use sigemptyset to clear a sigset_t. Explicitmarcel1999-09-281-1/+2
| | | | initialization of sa_flags allows us to lose the bzero.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Implement the weak aliases for private entry points in the inet_*jdp1998-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.
* Don't compile in the use of poll() when building libc_r. This isn'tpeter1998-06-141-1/+15
| | | | | so much a "fix", rather a bandaid to buy time to fix it properly within the thread engine.
* Update the resolver parts to bind-8.1.2 level. I have not touched thepeter1998-06-111-44/+71
| | | | | | getXXXXbyYYYY() interfaces yet. Obtained from: diff relative to bind-8.1.2 sources
* Resolve some unexpected differences when comparing with the 2.2 version.peter1998-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().
* Update libc dns code to 4.9.7-T1B level. This involved chopping out largepeter1998-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.
* Some adjustments for the resolver use of poll(). For some reason I thoughtpeter1997-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.
* Call poll(2) from within the resolver but adapt to older kernels without itpeter1997-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.
* replace the OpenBSD fd_set sizing code with something more efficient.peter1997-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.
* Dynamically size fd_set in select rather than fail if too many filespeter1997-06-271-8/+9
| | | | | are open. Obtained from: OpenBSD; by deraadt and dm
* Merge in bind-4.9.6 resolver changes. Note that they resolve thepeter1997-06-271-7/+3
| | | | overflow problem differently.
* Fix problem with FD_SET* overflow reporting.. Perror() didn't have enoughpeter1997-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
* Check for overflow of FD_SETguido1997-03-101-1/+6
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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.
* Here goes.. Bring the 4.9.5-P1 resolver into -current. This has thepeter1996-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..
* Sigh, back out the last bright idea I had here about compiling the res_*peter1996-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.
* Merge in bind-4.9.4-P1 resolver...peter1996-08-291-727/+0
|
* General -Wall warning cleanup, part I.jkh1996-07-121-2/+2
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYYpeter1996-01-071-57/+61
| | | | parts are not quite so simple..
* Fix bogus include paths, some of which stopped libresolv from compiling.bde1995-08-211-2/+2
|
* Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)peter1995-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>
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* remove need for -DDEBUG from resolver code (conflict with db/hash)pst1994-09-251-38/+33
|
* get* rework and new bind codepst1994-09-251-210/+468
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+468
OpenPOWER on IntegriCloud