2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

280 Commits

Author SHA1 Message Date
David Lawrence
ed019cabc1 fixed lines > 79 columns wide 2000-05-24 05:10:00 +00:00
David Lawrence
604a596b5f added an UNUSED() to shut up the irix compiler. 2000-05-24 02:39:01 +00:00
David Lawrence
77685300d9 cast isc_time_seconds to long when assigning to a timeval.tv_sec, and explain
why this is an ok thing to do.  shuts up the irix compiler.
2000-05-24 02:36:49 +00:00
Michael Graff
862d18c79a set ifindex to 0 for outgoing udp ipv6 datagrams. 2000-05-23 02:51:39 +00:00
Michael Graff
5cc49bc70c don't set permanent failure on udp sockets, even on unexpected error 2000-05-23 02:20:23 +00:00
Andreas Gustafsson
b291fec7c9 offset.h was not installed by 'make install' 2000-05-22 22:46:53 +00:00
Michael Graff
a330a4b008 only set permanent failure for tcp streams on sending 2000-05-22 16:56:12 +00:00
Michael Graff
46993e1d9d Merge the mlg-20000518 branch onto the mainline. Change summary:
dns_dispatch_create() no longer exists.  dns_dispatch_createtcp()
	and dns_dispatch_getudp() are the replacements.  _createtcp() takes
	a bound, connected TCP socket, while _getudp() will search for
	a sharable UDP socket, and if found, attach to it and return a
	pointer to it.  If one is not found, it will create a udp socket,
	bind it to a supplied local address, and create a new dispatcher
	around it.

	dns_dispatch_remove{request,response}() no longer take the dispatch
	as an argument.

	query-source can now be set per view.

	The dispatch manager holds onto three memory pools, one for
	allocating dispatchers from, one for events, and one for
	requests/replies.  The free list on these pools is hard-coded,
	but set to 1024.  This keeps us from having to dig into the
	isc_mem_t the pools draw from as often.

	dns_resolver_create() and dns_view_createresolver() require that
	valid dispatchers be passed in; dispatchers are no longer created
	for the caller.
2000-05-19 21:46:46 +00:00
David Lawrence
e6ce1a0ea9 use _PLATFORM_NEEDINETIN6H 2000-05-18 22:43:48 +00:00
David Lawrence
e8336c458c use HAVE_UNIXWARE_SIGWAIT 2000-05-18 22:39:24 +00:00
Michael Sawyer
232fd751ed Require nanoseconds is valid, instead of t->nanoseconds, which is what we're
getting ready to set.
2000-05-18 18:59:38 +00:00
David Lawrence
bc12a0c0d0 Ensure proper range of isc_time_seconds() assigning to timeval.tv_sec,
and cast isc_time_nanoseconds to shut up the IRIX compiler.
2000-05-18 17:12:14 +00:00
David Lawrence
6fa1cb5754 189. [func] isc_time_secondsastimet(), a new function, will ensure
that the number of seconds in an isc_time_t does not
                        exceed the range of a time_t, or return ISC_R_RANGE.
                        Similarly, isc_time_now(), isc_time_nowplusinterval(),
                        isc_time_add() and isc_time_subtract() now check the
                        range for overflow/underflow.  In the case of
                        isc_time_subtract, this changed a calling requirement
                        (ie, something that could generate an assertion)
                        into merely a condition that returns an error result.
                        isc_time_add() and isc_time_subtract() were void-
                        valued before but now return isc_result_t.

The seconds member isc_time_t on Unix platforms was changed from time_t
to unsigned int.

unix/time.c now uses macros for nanoseconds per second, nanoseconds per
microsecond and microseconds per second to make sure that the right
number of zeros appears each place the constant is used.

unix/time.c functions which take initialized isc_(interval|time)_t arguments
INSIST() that the nanoseconds value is less than one full second.

unix/time.c's isc_time_microdiff was broken because it did multiplication and
addition with unsigned integers and attempted to set them a 64 bit int to
avoid overflow, but C's ints don't promote to 64 bits on machines that only
have 32 bit longs.  Fixed.

Added all the pertinent documentation to time.h.
2000-05-18 17:08:32 +00:00
Brian Wellington
a823dfa663 sys/time.h needed for struct timeval 2000-05-16 21:05:03 +00:00
David Lawrence
cb4a97bb1c added missing config.h 2000-05-16 03:00:53 +00:00
Mark Andrews
5273184ae1 Add isc_file_settime() set access and modification times. 2000-05-16 02:13:08 +00:00
David Lawrence
02b152eb28 line 356: remark(1174): parameter "msg" was declared but never referenced
line 356: remark(1174): parameter "dev" was declared but never referenced

This is true when ISC_NET_BSD44MSGHDR is not defined.  UNUSED()s were added.

line 1580: remark(1552): variable "task" was set but never used
line 1670: remark(1552): variable "task" was set but never used

I removed the stack variable and its assignment in each case.

line 2915: remark(1552): variable "ret" was set but never used

It was apparent that the variable was meant to be the return value
of isc_socket_getsockname, so the return statement was changed to use it.

Also ...

Changed function declarations to ISC coding style.

Wrapped two lines that were wider than column 79.

Removed two UNUSED() macros for variables that were no longer unused.
2000-05-14 22:35:45 +00:00
Andreas Gustafsson
bbf6673828 use isc_sockaddr_format() instead of a static function doing
the same thing
2000-05-14 20:52:35 +00:00
David Lawrence
e52750239e Changed the CPP symbol it uses from *_HAVENETINET6* to *_NEEDNETINET6*
to better clarify what is going on with regard to the symbol.
2000-05-13 18:18:08 +00:00
David Lawrence
d8e34837cd isc_file_{stdiofunc} -> isc_stdio_* 2000-05-11 16:14:05 +00:00
David Lawrence
0c73b546ec Moved posix_result from file.c to errno2result.[ch], for use by multiple
source files.  We may want to generalize this as part of the libisc API,
but with a better name.
2000-05-11 15:09:30 +00:00
Michael Graff
2fc337ec38 add isc_socket_isbound() 2000-05-11 07:39:17 +00:00
Michael Graff
6849d91cd7 mark accepted connections as connected and bound. 2000-05-11 06:35:20 +00:00
Michael Graff
8321dd2150 add ISC_R_NOTBOUND and ISC_R_NOTCONNECTED and return them where appropriate. 2000-05-11 05:43:53 +00:00
Michael Graff
f019e00452 Add (commented out) 'must be bound' checking 2000-05-10 21:17:49 +00:00
Andreas Gustafsson
996f4a8bc3 164. [cleanup] Added functions isc_file_fopen(), isc_file_fclose(),
isc_file_fseek(), isc_file_fread(), isc_file_fwrite(),
                        isc_file_fflush(), isc_file_ffsync(), isc_file_remove()
                        to encapsulate nonportable usage of errno and fflush().
2000-05-09 23:19:32 +00:00
David Lawrence
681bd61239 isc/{unix,win32}/include/isc/ipv6.h moved to isc/include/isc/ipv6.h 2000-05-09 00:55:59 +00:00
David Lawrence
8b9ad57c12 Comment about unavoidable HP/UX compiler warning:
warning 541: Integer overflow during conversion.
when their own SIO* macros are used in ioctl calls.
2000-05-08 23:36:19 +00:00
David Lawrence
0c5a46afed comment about why unistd.h is required 2000-05-08 21:10:35 +00:00
Michael Graff
ab7c671292 add <stdlib.h> for mkstemp on NetBSD 2000-05-08 20:05:27 +00:00
David Lawrence
6e3a8256ee need <sys/time.h> on some platforms 2000-05-08 16:30:49 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
Cleanup of redundant/useless header file inclusion.

ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
   /*
    * This is a comment.
    */
2000-05-08 14:38:29 +00:00
Michael Graff
ece3d6c356 Cause runtime probing of v6 addresses to fail, even if we can actually
make v6 sockets, but we do not have struct in6_pktinfo.

Add a check in configure.in for struct in6_pktinfo.

Use the result of that check to define (if needed) in6_pktinfo in net.h.

This change makes us build on platforms that have SOME ipv6 structures
(like in6_addr, etc) but not enough to be useful to us.

Note:  Before making an ipv6 socket the code should verify that ipv6
sockets can be made using isc_net_probeipv6().  It should also
check for v4 sockets using isc_net_probeipv4() to be consistant.
2000-05-06 01:30:32 +00:00
Michael Graff
99b24bbca2 include <isc/print.h> 2000-05-03 22:04:49 +00:00
Michael Graff
4142e747f2 use new isc_lctx logging 2000-05-03 21:09:49 +00:00
David Lawrence
b99d080717 141. [cleanup] <isc/stdtime.h> does not need <time.h> or <isc/result.h>. 2000-04-28 23:53:55 +00:00
David Lawrence
b905ff7cbe 140. [cleanup] <isc/time.h> does not need <time.h> or <isc/result.h>. 2000-04-28 23:23:52 +00:00
David Lawrence
23a0970477 139. [cleanup] <isc/net.h> now includes <isc/types.h> instead of
<isc/int.h> and <isc/result.h>.
2000-04-28 23:14:45 +00:00
David Lawrence
54a2e7e8a2 137. [cleanup] <isc/commandline.h>, <isc/mem.h>, <isc/print.h>
<isc/serial.h>, <isc/string.h> and <isc/offset.h>
                        made to conform to the same style for multiple
                        inclusion protection.
2000-04-28 22:13:15 +00:00
David Lawrence
027212247d 136. [cleanup] <isc/commandline.h>, <isc/interfaceiter.h>,
<isc/net.h> and Win32's <isc/thread.h> needed
                        ISC_LANG_BEGINDECLS/ISC_LANG_ENDDECLS.
2000-04-28 22:09:15 +00:00
David Lawrence
344e909ce9 134. [cleanup] <isc/dir.h> does not need <limits.h>. 2000-04-28 21:29:27 +00:00
David Lawrence
eefea43215 132. [cleanup] <isc/app.h> does not need <isc/task.h>, but does
need <isc/eventclass.h>.
2000-04-28 21:08:52 +00:00
David Lawrence
dc91d010db 128. [cleanup] <isc/dir.h> had ISC_LANG_BEGINDECLS instead of
ISC_LANG_ENDDECLS at end of header.
2000-04-28 17:46:30 +00:00
David Lawrence
32eddfc189 120. [cleanup] <isc/socket.h> does not need <isc/boolean.h>,
<isc/bufferlist.h>, <isc/task.h>, <isc/mem.h> or
                        <isc/net.h>.
2000-04-28 03:53:48 +00:00
David Lawrence
6b7257f756 include config.h 2000-04-28 02:08:20 +00:00
Bob Halley
364a82f7c2 include isc/util.h 2000-04-28 01:12:23 +00:00
David Lawrence
9d26bfb436 grrrrrr ... order wrong in typedef 2000-04-28 00:39:11 +00:00
David Lawrence
61e9c1cdbe 116. [func] Added <isc/offset.h> for isc_offset_t 2000-04-28 00:36:56 +00:00
David Lawrence
6e49e91bd0 103. [func] libisc buffer API changes for <isc/buffer.h>:
Added:
                                isc_buffer_base(b)          (pointer)
                                isc_buffer_current(b)       (pointer)
                                isc_buffer_active(b)        (pointer)
                                isc_buffer_used(b)          (pointer)
                                isc_buffer_length(b)            (int)
                                isc_buffer_usedlength(b)        (int)
                                isc_buffer_consumedlength(b)    (int)
                                isc_buffer_remaininglength(b)   (int)
                                isc_buffer_activelength(b)      (int)
                                isc_buffer_availablelength(b)   (int)
                        Removed:
                                ISC_BUFFER_USEDCOUNT(b)
                                ISC_BUFFER_AVAILABLECOUNT(b)
                                isc_buffer_type(b)
                        Changed names:
                                isc_buffer_used(b, r) ->
                                        isc_buffer_usedregion(b, r)
                                isc_buffer_available(b, r) ->
                                        isc_buffer_available_region(b, r)
                                isc_buffer_consumed(b, r) ->
                                        isc_buffer_consumedregion(b, r)
                                isc_buffer_active(b, r) ->
                                        isc_buffer_activeregion(b, r)
                                isc_buffer_remaining(b, r) ->
                                        isc_buffer_remainingregion(b, r)

                        Buffer types were removed, so the ISC_BUFFERTYPE_*
                        macros are no more, and the type argument to
                        isc_buffer_init and isc_buffer_allocate were removed.
                        isc_buffer_putstr is now void (instead of isc_result_t)
                        and requires that the caller ensure that there
                        is enough available buffer space for the string.
2000-04-27 00:03:12 +00:00
David Lawrence
a890fbefa3 C++ reserves the word "template"; use "templet" as the parameter to
isc_file_openunique
2000-04-26 00:45:24 +00:00