Commit Graph
4205 Commits
Author SHA1 Message Date
David Lawrence 61e9c1cdbe 116. [func] Added <isc/offset.h> for isc_offset_t 2000-04-28 00:36:56 +00:00
David Lawrence 8b11f3debd 115. [port] Shut up the -Wmissing-declarations warning about
<stdio.h>'s __sputaux on BSD/OS pre-4.1.
2000-04-28 00:32:19 +00:00
Andreas Gustafsson 7e98526069 document UNUSED() and its location relative to REQIRE() 2000-04-28 00:31:46 +00:00
Michael Graff 64f8e4a9e3 add snapshot making script 2000-04-28 00:09:22 +00:00
Andreas Gustafsson 90f9d00f08 declare arguments as UNUSED() when used in assertions only 2000-04-27 23:57:56 +00:00
Michael Graff 2180f41c90 deal with version file and BIND_VERSION differently. 2000-04-27 23:47:49 +00:00
David Lawrence d1baeb3888 sys/types.h needed for some (BSD/OS pre-4.1) systems 2000-04-27 23:44:44 +00:00
David Lawrence 2cc1d2536d 114. [cleanup] <isc/sockaddr.h> does not need <isc/buffer.h> or <isc/list.h>. 2000-04-27 23:29:28 +00:00
Michael Sawyer 1d2f2d7c9a Improved formatting of #ifdef DEBUG messages (left out \n's when puts calls
were changed to fputs to stderr).
Fix memory leak when doing axfr's.
Improvements to host program; most options and types fully supported.
Add (currently non-functional) -C option to host to check all SOA's
on authorative servers.  (Will require some notable changes to dighost.c
to make this a functional option.)

Issues stil needing resolution:
	IPv6 queries are not currently sent.
	Memory leak on ^C while waiting for UDP recv or TCP connect.
	A few more dig options need supporting.
	Support IXFR under dig (and maybe host).
	Support signatures (TSIG) under dig (and maybe host).
2000-04-27 23:20:29 +00:00
Michael Sawyer 140d926224 Added CHANGES entry for dig/host 2000-04-27 23:16:11 +00:00
David Lawrence 6d208969b3 112. [cleanup] <isc/serial.h> does not need <isc/boolean.h>. 2000-04-27 23:08:18 +00:00
David Lawrence a2495a1323 inet_* checks used NULL as a parameter, which was not necessarily defined 2000-04-27 23:07:10 +00:00
David Lawrence 145bd6ea33 111. [cleanup] <isc/rwlock.h> does not need <isc/result.h> or
<isc/mutex.h>.
2000-04-27 23:01:34 +00:00
David Lawrence 0c33e418cb 110. [cleanup] <isc/result.h> does not need <isc/boolean.h> or
<isc/list.h>.
2000-04-27 22:48:57 +00:00
David Lawrence bd9d42a1a9 style lint 2000-04-27 22:31:20 +00:00
David Lawrence 8a0ba20b16 109. [bug] "make depend" did nothing for
bin/tests/{db,mem,sockaddr,tasks,timers}/.
2000-04-27 22:28:04 +00:00
David Lawrence b3e7753518 108. [cleanup] DNS_SETBIT/DNS_GETBIT/DNS_CLEARBIT moved from
<dns/types.h> to <dns/bit.h> and renamed to
                        DNS_BIT_SET/DNS_BIT_GET/DNS_BIT_CLEAR.
2000-04-27 22:26:50 +00:00
Andreas Gustafsson 96eb58dd46 conform to buffer API changes 2000-04-27 22:09:59 +00:00
Bob Halley 89b117b756 performance improvements 2000-04-27 21:46:31 +00:00
Bob Halley bcaf544581 add macros 2000-04-27 21:45:46 +00:00
Bob Halley dcb719f17d conform to buffer api changes 2000-04-27 20:29:26 +00:00
Bob Halley 6699408663 rename internal functions 2000-04-27 20:20:12 +00:00
Brian Wellington 03f0e349d8 Added keysigner and keysettool 2000-04-27 19:15:16 +00:00
Brian Wellington 22e8a31981 Added verbose flag. Currently doesn't do anything, but it's consistent with
the other dnssec tools.
2000-04-27 18:24:26 +00:00
Brian Wellington a15583c681 Conform to the dns_dnssec_verify api change 2000-04-27 18:17:27 +00:00
Brian Wellington 48e27f529d Conform to the dns_dnssec_verify api change and fix an nxt processing crash 2000-04-27 18:14:11 +00:00
Brian Wellington 9e842bb2d3 Allow dnssec verifications to ignore the validity period. 2000-04-27 18:09:10 +00:00
Michael Graff d8d845eb47 Call the macros from within the compiled functions. This puts the implementation in one place (buffer.h) and the REQUIRE() checking in buffer.c 2000-04-27 02:12:10 +00:00
David Lawrence e1747e09e7 Vertical whitespace is encouraged for improved code legibility by
grouping closely related statements and then separating them with a
single empty line.

Lines should not be longer than 79 characters, even if it requires
violating the indentation rules to do so.  Since ANSI is assumed, the
best way to deal with strings that extend past column 79 is to break
them into two or more sections separated from each other by a newline
and indentation. (w/example)

Note that <isc/lang.h> should be included by any public
header file to get the ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS
macros used so the correct name-mangling happens for function
declarations when C++ programs include the file. <isc/lang.h> should
be included for private header files or for public files that do not
declare any functions. (w/example)

Fixed < and > use in sample header file.

The config.h file must never be included by any public header file.

The comma operator should not be used to form compound statements.
(w/example)

Generally speaking, when a control statement (<CODE>if, for</CODE> or
<CODE>while</CODE>) has only a single action associated with it, then no
bracing is used around the statement.  Exceptions include when the
compiler would complain about an ambiguous else clause, or when extra
bracing improves the readability (a judgement call biased toward not
having the braces).

Do not put a space after the "sizeof" operator name, and also
parenthesize its argument, as in <CODE>malloc(4 * sizeof(long))</CODE>.

Do not put a space after a cast. (w/example)

<H4>The Ternary Operator</H4> (w/example)
The ?: operator should mostly be avoided.  It is tolerated when
deciding what value to pass as a parameter to a function, such as
frequently happens with printf, and also when a simple (non-compound)
value is being used in assignment or as part of a calculation.
In particular, using the ternary operator to specify a return value is
verboten. (Well, Bob didn't tell me *forbidden* when he first said this
to me long ago, but I got the impression he really did not like it.)

Variables should not have their values assigned or changed when being
passed as parameters, except perhaps for the increment and decrement
operators. (This came up when I found something much like this in one
of our files:
       malloc(size = 20);

All public interfaces to functions, macros, typedefs, and
variables provided by the library, should use names of the form
{library}_{module}_{what}, such as:

       isc_buffer_t                            /* typedef */
       dns_name_setbuffer(name, buffer)       /* function */
       ISC_LIST_HEAD(list)                    /* macro */
       isc_commandline_argument               /* variable */

however, structures which are typedef'd generally have the name of the
typedef sans the final _t:

       struct dns_rbtnode {
               /* ... members ... */
       }

Generally speaking macros are defined with all capital letters, but
this is not universally consistent (eg, numerous isc_buffer_{foo}
macros).

The {module} and {what} segments of the name do not have underscores
separating natural word elements, as demonstrated in
isc_commandline_argument and dns_name_setbuffer above.  The {module}
part is usually the same as the basename of the source file, but
sometimes other {module} interfaces appear within one file, such as
dns_label_* interfaces in lib/dns/name.c.  However, in the public
libraries the file name must be the same as some module interface
provided by the file; e.g., dns_rbt_* interfaces would not be declared
in a file named redblack.c (in lieu of any other dns_redblack_*
interfaces in the file).

The one notable exception to this naming rule is the interfaces
provided by <isc/util.h>.  There's a large caveat associated with the
public description of this file that it is hazardous to use because it
pollutes the general namespace.

<H4>Shared Private Interfaces</H4>
When a module provides an interface for internal use by other modules
in the library, it should use the same naming convention
described for the public interfaces, except {library} and {module}
are separated by a double-underscore.  This indicates that the name is
internal, its API is not as formal as the public API, and thus it
might change without any sort of notice.
2000-04-27 02:00:44 +00:00
Michael Graff 1911100e64 add comments about 'RETAIN' 2000-04-27 01:47:38 +00:00
Michael Graff 35a8d16d61 Make many functions (optionally) inlined. Currently disabled. To enable, see the top of buffer.h 2000-04-27 01:46:16 +00:00
Michael Sawyer 1ccf150881 Allow field to be hex which was previously limited to decimal 2000-04-27 01:36:37 +00:00
Michael Sawyer d536f68bee Fix for new memory log output format 2000-04-27 01:24:13 +00:00
Andreas Gustafsson d11241a247 make good use of isc_buffer_remaininglength() 2000-04-27 00:24:21 +00:00
Andreas Gustafsson fa04a194fb return value from dns_rdataset_first() was ignored;
added more comments and logging to nxtvalidate()
2000-04-27 00:15:16 +00:00
David Lawrence a231769eaa Made compress_add and compress_find static to lib/dns/compress.c 2000-04-27 00:08:44 +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
Bob Halley ace0c1b3f4 performance tweaks 2000-04-26 23:22:53 +00:00
Bob Halley 048f38385e change contract for value of order 2000-04-26 23:12:57 +00:00
David Lawrence 14dd2c028a dig/host do not need omapi 2000-04-26 22:56:18 +00:00
Michael Sawyer 9814f5f963 Add host 2000-04-26 22:55:53 +00:00
David Lawrence 08b89fee02 dighost.c, not digmain.c 2000-04-26 22:54:13 +00:00
Michael Sawyer 3fbc17b5e3 Mostly functional version of host. Some limitations and formatting errors
still exist.
2000-04-26 22:53:56 +00:00
Michael Graff 98e8a46972 comments from code review 2000-04-26 21:54:50 +00:00
David Lawrence a59b51eb1d Correctly detect inet_aton, inet_pton and inet_ptop on BSD/OS 4.1. 2000-04-26 21:50:49 +00:00
Mark Andrews d2ed254fb8 (..., "%03u", 2) was not zero filling 2000-04-26 21:15:14 +00:00
Michael Sawyer d43730bbf2 Stylistic changes and inclusion of isc/print.h 2000-04-26 19:36:40 +00:00
Bob Halley 7525fa78c0 add XXXRTH comment about sending to ourselves 2000-04-26 19:25:01 +00:00
David Lawrence fa9918984b DOD INTERNET HOST TABLE SPECIFICATION 2000-04-26 19:09:21 +00:00
Michael Sawyer 30eee5633c Change debugging messages in dig.c and dighost.c to use stderr.
Improve message if resolver host not found.
2000-04-26 18:58:31 +00:00