Commit Graph
183 Commits
Author SHA1 Message Date
David Lawrence 22520194de Fixed several instances of this IRIX warning:
"./rdata/generic/loc_29.c", line ??: remark(1506): implicit conversion from
          "unsigned long" to "int":  rounding, sign extension, or loss of
          accuracy may result
by making sure that the range was suitable for an int and casting to
int in each case.  (This appeared to be more desirable than changing
all of the variables in question to longs.)
2000-05-13 21:24:37 +00:00
David Lawrence f1f3bb3aa0 Fixed IRIX warning:
"./rdata/generic/mx_15.c", line 202: warning(1184): possible use of "=" where
          "==" was intended
by changing to == since it was clear that test was desired, not assignment.
2000-05-13 20:52:13 +00:00
David Lawrence 44d74084ff Fixed IRIX warnings:
"./rdata/in_1/a_1.c", line 178: warning(1184): possible use of "=" where "=="
          was intended
"./rdata/in_1/a_1.c", line 179: warning(1184): possible use of "=" where "=="
          was intended

By chaning them to ==, because (a) we don't allow side-effects in REQUIRE()
and (b) it is clear from the rest of the code that it really was a test that
was desired and not an assignment.
2000-05-13 20:50:35 +00:00
Mark Andrews c661868379 Add missing range checks in fromtext(). 2000-05-12 12:59:35 +00:00
Andreas Gustafsson fd9f6afdff use the UNUSED() macro 2000-05-11 22:47:00 +00:00
David Lawrence 8abddcd3f2 rdata.c needs to include string.h before memcpy is used.
since rdata.c is including string.h, the individual rdata files do not need to.
2000-05-08 16:12:30 +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
Mark Andrews 5159c42783 153. [func] dns_rdata_tostruct() 'mxtc' is now optional. If 'mctx'
is NULL then you need to preserve the 'rdata' until
                      you have finished using the structure as there may be
                      references to the associated memory.  If 'mctx' is non
                      NULL it is guarenteed that there are no references to
                      to memory addsociated with 'rdata'.

                      dns_rdata_freestruct() must be called if 'mctx' was
                      non NULL and may safely be called if 'mctx' was NULL.

Finish implementing 153 for IN specific types.
naptr_35.h some of the lengths should be 8 bits.
2000-05-05 23:20:10 +00:00
Andreas Gustafsson 5466ce3f27 fromstruct_* functions needlessly used dns_name_towire() to do
a simple name data copy, thereby requiring a non-NULL mctx
2000-05-05 18:15:02 +00:00
Andreas Gustafsson 8d501088b7 tostruct_ns() used the wrong mctx 2000-05-05 17:24:21 +00:00
Mark Andrews 9281e7aa77 Implement / convert to new API for tostuct() and freestruct().
Define dns_rdata_loc_t structure.
x25 length is only 8 bits.
2000-05-05 05:50:14 +00:00
Michael Graff 8e3e48ff56 use isc_uint8_t rather than isc_int8_t for string lengths, and don't call a structure member sa_len 2000-05-04 23:50:56 +00:00
Andreas Gustafsson 94a08e09db Check for edns1 and strict decompression once and for all in
dns_[de]compress_setmethods instead of separately in every caller
2000-05-04 22:19:34 +00:00
Andreas Gustafsson 59a6d9effd omit DNS_RDATATYPEATTR_SINGLETON from RRTYPE_NXT_ATTRIBUTES
so that we can cope with parent/child NXT pairs.  DNSSEC sucks.
2000-05-03 23:52:35 +00:00
David Lawrence a1f16c81a1 removed unused stack variable "result" from totext_nxt 2000-05-01 18:27:43 +00:00
David Lawrence 4be63b1fd8 144. [cleanup] libdns header files too numerous to name were made
to conform to the same style for multiple inclusion
                        protection.
2000-04-29 02:02:38 +00:00
Andreas Gustafsson 5436ac5553 cope with dns_rdatatype_totext() succeeding for
unknown RR types
2000-04-29 01:51:39 +00:00
David Lawrence 358628c8f4 138. [cleanup] isc_strtouq moved from str.[ch] to string.[ch] and
renamed isc_string_touint64.  isc_strsep moved from
                        strsep.c to string.c and renamed isc_string_separate.
2000-04-28 22:40:10 +00:00
Mark Andrews b186f1ab91 Add structure definitions so they can be documented.
Support functions to follow soon.
2000-04-28 21:49:03 +00:00
Mark Andrews b8dd48ecf8 119. [cleanup] structure definitions for generic rdata stuctures do
not have _generic_ in their names.
2000-04-28 02:08:37 +00:00
Andreas Gustafsson 82ca33427b declare arguments as UNUSED() when used in assertions only 2000-04-28 01:24:18 +00:00
Andreas Gustafsson 90f9d00f08 declare arguments as UNUSED() when used in assertions only 2000-04-27 23:57: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
Mark Andrews e8c91210aa Add structure definitions. 2000-04-26 18:27:56 +00:00
Mark Andrews 178f9cf89f fromstruct MUST NOT check mctx 2000-04-26 01:41:58 +00:00
Michael Graff 7ec579cd5d Add functions to check that a type is only or is not allowed in a question section 2000-04-14 20:13:49 +00:00
Michael Graff 6324997211 add attributes (line singleton, exlcusive, meta, etc) to rdata C files, and
build a table of them using gen.c.  This means the names are stored twice,
but that will change in the near future.  This will speed up number to text
conversions for rdatatypes, and I plan on speeding up text->number as
well, soon.
2000-04-07 03:54:52 +00:00
Michael Graff 4195904998 s/DNS_R_/ISC_R_/ change for some codes. 2000-04-06 22:03:35 +00:00
Andreas Gustafsson 26dc2e1958 need <dns/types.h> to define dns_rdatatype_t 2000-04-04 23:10:53 +00:00
Andreas Gustafsson 71bd2b06d6 use the UNUSED() macro 2000-03-21 23:48:20 +00:00
Andreas Gustafsson 8e191edd65 don't indent comments by one space 2000-03-20 23:08:50 +00:00
Andreas Gustafsson a7d3e828eb don't indent comments by one space 2000-03-20 22:57:15 +00:00
Andreas Gustafsson 47830e3a58 don't indent comments by one space 2000-03-20 22:48:59 +00:00
Andreas Gustafsson 41aad56b6c avoid calling variables 'result' if they are not of type isc_result_t 2000-03-20 22:44:36 +00:00
Andreas Gustafsson 2d2bd6a7ae style changes from code review 2000-03-20 19:32:10 +00:00
Andreas Gustafsson b538f54ad3 totext_in_wks() consumed two bytes for the one-byte
protocol field, causing the port list to be printed incorrectly
2000-03-20 19:29:44 +00:00
Andreas Gustafsson a3c9e34301 print the 'other data' in multiline mode if nonempty 2000-03-20 18:40:28 +00:00
Andreas Gustafsson ea5bd6a950 source region was not consumed in fromwire_in_nsap() (RT #73) 2000-03-20 18:03:53 +00:00
James Brister 1774961457 review changes. 2000-03-19 03:15:49 +00:00
David Lawrence 64339caa43 removed unused "result" stack var from digest_afsdb 2000-03-18 01:46:15 +00:00
Michael Graff f31f0b63cb review code, add UNUSED() where needed, fix a bug made yesterday with RETERR() 2000-03-18 00:19:26 +00:00
Andreas Gustafsson e6c22f37d8 backed out inappropriate use of RETERR() in
*_compare(); renamed 'result' to 'order' to avoid future confusion
2000-03-17 21:43:46 +00:00
Bob Halley d10099d866 Code review:
Style updates.
	Correct some comments.
	Printing "other" field now respects multiline mode.
	from/to struct routines now allocate 0 byte memory instead of
	leaving the pointer NULL if keylen or otherlen are 0.
2000-03-17 21:13:02 +00:00
Brian Wellington 06ec9f45f4 code review changes - minor formatting, updated RFC reference 2000-03-17 21:03:34 +00:00
Andreas Gustafsson 9b5be7076f code review 2000-03-17 19:35:25 +00:00
Andreas Gustafsson 66e45550c6 unused variable 2000-03-17 19:20:25 +00:00
Andreas Gustafsson 1eb5ce8f90 code review 2000-03-17 18:18:28 +00:00
Andreas Gustafsson 542deb20c4 in tostruct_sig(), store zero-length signatures as
zero-length isc_mem_get() block, not NULL pointer;
misc. stylistic changes from code review
2000-03-17 17:08:36 +00:00
Andreas Gustafsson 8193e5caa6 code review 2000-03-17 17:07:10 +00:00
Brian Wellington dd4eb0b460 code review, including fixes to suspicious looking memcmp()s 2000-03-17 02:47:01 +00:00