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

158 Commits

Author SHA1 Message Date
Andreas Gustafsson
41c53e1d11 added comment 2000-11-27 19:45:45 +00:00
David Lawrence
e28b5084ec Bitstring labels *still* suck. They didn't somehow magically get less
sucky in the past couple of months.  The nerve.

Anyway, dns_name_split now correctly compacts the preceding bitstring label
(if any) when a maximal bitstring is split.

It also correctly creates the suffix when a maximal bitstring is split.
It was doing this incorrectly before, independent of the compaction issue.
2000-11-14 23:48:02 +00:00
David Lawrence
72ce8db918 sigh. the last checkin only included RT #369 fix, not the other things I meant
to include.
2000-10-14 04:38:22 +00:00
David Lawrence
190fbe9738 519. [bug] dns_name_split() would improperly split some bitstring
labels, zeroing a few of the least signficant bits in
			the prefix part.  When such an improperly created
			prefix was returned to the RBT database, the bogus
			label was dutifully stored, corrupting the tree.
			[RT #369]

Also made dns_name_split() REQUIRE that suffixlabels always be greater than 0,
even when splitting a bitstring label (it already required this when not
splitting a bitstring label).  This is consistent with the way dns_name_split()
was called to split a name that consisted of a single label, a bitstring;
the appropriate suffixlabels value is 1 in such cases.

Also a fixed minor style error, and a confusing comment.
2000-10-14 04:31:31 +00:00
Michael Sawyer
dc570b92f6 Add support for proposed ZONE and VIEW opt attributes. These are currently
hidden behind #ifdef's, since no OPT code number has yet to be assigned
by the IANA.  They are also not quite complete in all regards; VIEW
options are understood and ignored.  ZONE options are understood and
acted upon, though some of the error cases aren't quite right.

Remove doubled isc_mem_stats in dighost.c

Update todo list.

Change literal 255's to DNS_NAME_MAXWIRE in name.c
2000-10-11 17:44:18 +00:00
Andreas Gustafsson
0736cce338 made dns_name_getlabelsequence() cope with degenerate
relative names containing no labels
2000-08-22 00:46:54 +00:00
Andreas Gustafsson
39f029558d in dns_name_totext(), check that the target buffer is
valid, and make use of the new isc_buffer_* macros
2000-08-16 22:18:20 +00:00
Andreas Gustafsson
f4bc158a46 in dns_name_isabsolute(), dns_name_fullcompare(),
and dns_name_compare(), do not require that the name has >0 labels
so that these functions can be used on the degenerate relative name @
2000-08-08 23:18:12 +00:00
David Lawrence
40f53fa8d9 Trailing whitespace trimmed. Perhaps running "perl util/spacewhack.pl in your
own CVS tree will help minimize CVS conflicts.  Maybe not.
Blame Graff for getting me to trim all trailing whitespace.
2000-08-01 01:33:37 +00:00
David Lawrence
051d1879fe dns_name_totext() now allows names with 0 labels, which format as "@" 2000-07-31 23:09:49 +00:00
David Lawrence
15a4474541 word wrap copyright notice at column 70 2000-07-27 09:55:03 +00:00
Andreas Gustafsson
b7ebc6a127 minor tweak to hash function of previous change 2000-07-20 01:15:25 +00:00
Andreas Gustafsson
f969863d54 replaced the hash function in dns_name_hash() by one
that is simpler, faster, and produces a much more even distribution,
particularly when the data to hash ends with a null byte like domain
names often do
2000-07-20 01:14:48 +00:00
David Lawrence
da527e4ff6 332. [func] New function dns_name_reset(). 2000-07-14 19:12:54 +00:00
Brian Wellington
4250285838 Return DNS_R_NAMETOOLONG in a few places where less useful errors were
returned before.
2000-07-13 18:10:18 +00:00
David Lawrence
9c3531d72a add RCS id string 2000-06-22 22:00:42 +00:00
David Lawrence
28d9fd5381 update_copyrights 2000-06-21 22:45:24 +00:00
Andreas Gustafsson
3fe45d9897 do the length checks of 1.90 in a more efficient way; take
advantage of the new buffer API macros
2000-06-09 22:01:55 +00:00
Brian Wellington
f3b52d9fe5 If an uncompressed name will take more than 255 characters and the buffer is
sufficiently long, dns_name_fromwire should return DNS_R_FORMERR, not
ISC_R_NOSPACE.
2000-06-09 01:30:11 +00:00
Andreas Gustafsson
ee03a00244 changed references to 'binary buffer' in comments
to just 'buffer', as there is no longer a distinction between binary
and text buffers
2000-06-06 17:47:54 +00:00
David Lawrence
97741ef83e ndata and offsets for dns_rootname and dns_wildcardname need to be
unsigned char * (not char *) to match the ndata and offsets in dns_name_t.
2000-06-02 03:18:12 +00:00
Andreas Gustafsson
a3c0a79b61 dns_name_totext() now always prints the root name as '.',
even when omit_final_dot is true
2000-06-02 00:14:02 +00:00
David Lawrence
6d12fdf966 Megacommit of many files.
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const.  Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.

The macro DE_CONST is used to deal with a handful of very special
places where something is qualified as const but really needs to have
its const qualifier removed.

rdata.c now defines macros for the prototypes of the basic rdata functions,
and all of the lib/dns/rdata/**/*.c files now use them.

Some minor integer-compatibility issues.  (IE, ~0x03 is a signed int,
so assigning it to an unsigned int should use a cast.  The type of an
enum member is int, so there are some conversion issues there, too.)

A pointers-to-function should not be cast to a pointer-to-object.

Variables should not be named for C reserved identifiers.

One or two set-but-not-used variables removed.

Minor other ISC style cleanups.
2000-06-01 18:26:56 +00:00
David Lawrence
82a30bf0a0 in dns_name_fromtext, REQUIRE() that the source buffer not have an
isc_buffer_remaininglength of 0.  this finds problems like isc_buffer_init
not followed by isc_buffer_add much sooner.

also, enforce the already documented contract requirements of needing
a valid source buffer and either a valid target buffer or a name
with a dedicated buffer.
2000-05-25 23:57:25 +00:00
Brian Wellington
e6d420aea9 In dns_name_totext, if omit_final_dot is true and the name is the root,
override omit_final_dot and print "."
2000-05-23 23:34:40 +00:00
David Lawrence
d3d03f736d Silence IRIX warning:
"name.c", line 201: remark(1552): variable "byte" was set but never used
2000-05-13 20:34:55 +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
Bob Halley
364a82f7c2 include isc/util.h 2000-04-28 01:12:23 +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
fca5f81ad6 using snprintf or vsnprintf requires isc/print.h 2000-04-12 19:07:12 +00:00
Andreas Gustafsson
b4b4adc097 added convenience function dns_name_format() for use in formatting
log messages
2000-04-11 19:11:46 +00:00
Michael Graff
4195904998 s/DNS_R_/ISC_R_/ change for some codes. 2000-04-06 22:03:35 +00:00
Andreas Gustafsson
ddfe394c06 need <isc/buffer.h> 2000-04-04 20:10:29 +00:00
Bob Halley
63c8c8f2a1 Add dns_name_dupwithoffsets().
Minor performance enhancement to dns_name_dup() (use the source's offsets table
if it has one).
2000-03-30 00:57:06 +00:00
Bob Halley
a8e4c27d2c get rid of calls to dns_name_countlabels() 2000-03-29 18:49:36 +00:00
Bob Halley
a0abd77baa dns_name_downcase() was not calling isc_buffer_add(), so buffer would always
be empty.  This would cause name digesting to fail as well.
Remove some unused variables left over from the removal of local compression.
2000-03-23 17:56:24 +00:00
David Lawrence
ecb6c5782e exorcized local compression 2000-03-23 05:18:46 +00:00
Andreas Gustafsson
aa8e34546c commented nonobvious INSIST() 2000-03-20 19:33:20 +00:00
Bob Halley
3dbea10f98 fix loop termination bug 2000-02-26 00:28:46 +00:00
Bob Halley
453603c018 add dns_name_depth() and dns_name_splitatdepth() 2000-02-25 01:06:54 +00:00
Bob Halley
f18f3c93e7 add dns_name_requiresedns() 2000-02-19 00:11:21 +00:00
Bob Halley
7d32c065c7 update copyright 2000-02-03 23:50:32 +00:00
Bob Halley
5d661f0bde dns_name_matcheswildcard("foo.com.", "*.foo.com.") incorrectly returned true
(see RFC 1034 section 4.3.3).
2000-02-02 20:44:22 +00:00
Brian Wellington
d2b77d720f Added dns_name_matcheswildcard 2000-02-02 20:11:55 +00:00
Michael Graff
3ddd814a97 dns_result_t is no more. s/dns_result_t/isc_result_t/ -- more later, when I need a break. 1999-12-23 00:09:04 +00:00
Bob Halley
c7dd70fe1b fix typo 1999-10-29 07:09:44 +00:00
Mark Andrews
af34594432 ft_octal was allowing '8' as a valid octal character.
ensure isdigit() is called with a positive int.
1999-10-29 02:38:37 +00:00
Bob Halley
345a84c9f1 add dns_name_print 1999-10-17 19:22:50 +00:00
Mark Andrews
000027219d add dns_name_dynamic(). 1999-10-13 22:45:17 +00:00