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

89 Commits

Author SHA1 Message Date
Evan Hunt
e45be9d134 move wire_test back to bin/tests, no longer dependent on dnstap
wire_test is not only used by the dnstap system test, but also in
fuzz testing. it doesn't need to be installed, but it's useful to have it
built when BIND is.  this commit moves it back from bin/tests/system to
bin/tests, as a noinst_PROGRAM so that it's built by "make all" but
not installed.
2020-05-15 13:19:28 -07:00
Michał Kępień
32247dc997 Build wire_test
The bin/tests/wire_test helper program is currently not included in any
Makefile.am file.  Move its source code to bin/tests/system and build it
along other helper tools when dnstap support is requested as the
"dnstap" system test needs this tool in order to pass.
2020-04-24 16:11:20 +02:00
Ondřej Surý
5777c44ad0 Reformat using the new rules 2020-02-14 09:31:05 +01:00
Evan Hunt
e851ed0bb5 apply the modified style 2020-02-13 15:05:06 -08:00
Ondřej Surý
056e133c4c Use clang-tidy to add curly braces around one-line statements
The command used to reformat the files in this commit was:

./util/run-clang-tidy \
	-clang-tidy-binary clang-tidy-11
	-clang-apply-replacements-binary clang-apply-replacements-11 \
	-checks=-*,readability-braces-around-statements \
	-j 9 \
	-fix \
	-format \
	-style=file \
	-quiet
clang-format -i --style=format $(git ls-files '*.c' '*.h')
uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h')
clang-format -i --style=format $(git ls-files '*.c' '*.h')
2020-02-13 22:07:21 +01:00
Ondřej Surý
f50b1e0685 Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
Ondřej Surý
c73e5866c4 Refactor the isc_buffer_allocate() usage using the semantic patch
The isc_buffer_allocate() function now cannot fail with ISC_R_MEMORY.
This commit removes all the checks on the return code using the semantic
patch from previous commit, as isc_buffer_allocate() now returns void.
2020-02-03 08:29:00 +01:00
Ondřej Surý
4957255d13 Use the semantic patch to change the usage isc_mem_create() to new API 2019-09-12 09:26:09 +02:00
Ondřej Surý
ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10:00
Evan Hunt
cc52a16096 [master] fix wire_test so it can read files with comment lines 2015-09-18 11:39:31 -07:00
Mark Andrews
3979031a06 check isc_buffer_allocate result 2015-08-23 19:29:40 +10:00
Evan Hunt
b750a49f3f [master] fixed memory leak in dns_compress_add()
4184.	[bug]		Fixed a possible memory leak in name compression
			when rendering long messages. (Also, improved
			wire_test for testing such messages.) [RT #40375]
2015-08-17 22:41:44 -07:00
Evan Hunt
2a49f6bbfe [master] use dns_message_totext() in wire_data 2015-08-10 20:51:22 -07:00
Mark Andrews
f260e3a188 address len being shadowed 2015-08-11 12:59:34 +10:00
Evan Hunt
3812202124 [master] add a "wire_test -d" option to read raw binary data
4169.	[test]		Added a 'wire_test -d' option to read input as
			raw binary data, for use as a fuzzing harness.
			[RT #40312]
2015-08-10 14:44:02 -07:00
Tinderbox User
d70dac20d2 update copyright notice / whitespace 2015-05-23 23:45:25 +00:00
Francis Dupont
3759f10fc5 added print.h includes, updated copyrights 2015-05-23 14:21:51 +02:00
Automatic Updater
70e5a7403f update copyright notice 2007-06-19 23:47:24 +00:00
Automatic Updater
ec5347e2c7 update copyright notice 2007-06-18 23:47:57 +00:00
Mark Andrews
9f069b2771 update copyright notice 2005-03-17 03:56:12 +00:00
Mark Andrews
b6b21d8045 silence compiler warnings 2005-03-16 22:22:31 +00:00
Mark Andrews
dafcb997e3 update copyright notice 2004-03-05 05:14:21 +00:00
Andreas Gustafsson
91cd0f93ad sizeof style 2001-11-27 01:56:32 +00:00
Andreas Gustafsson
93b9133cfa The -t option of wire_test now causes it to use, not just ignore,
the length field of a TCP message, and to process multiple
TCP messages if present.
2001-09-29 18:23:56 +00:00
Brian Wellington
08116c0bbd -t now works 2001-05-09 18:59:55 +00:00
Brian Wellington
fdd2f4e5d0 Add an option to ignore the first 2 bytes (for TCP messages) 2001-05-09 18:56:29 +00:00
Brian Wellington
110c0fae7f add some commandline flags. 2001-05-09 18:51:44 +00:00
Brian Wellington
1448a52296 the output buffer should be 64K, not 4000 bytes. 2001-05-09 00:16:48 +00:00
Brian Wellington
f746db7665 pass the compression context to dns_message_renderbegin (the change last week
was incomplete, but these tests are not built by default)
2001-03-13 02:48:54 +00:00
Brian Wellington
e43b9a2005 move compression context create/delete into the caller of the message
rendering functions.  This reduces the size of the message object.
2001-03-05 21:15:47 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
Brian Wellington
6850cdd449 508. [func] dns_message_parse() can now do a best-effort
attempt, which should allow dig to print more invalid
                        messages.
2000-10-06 18:58:30 +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
15a4474541 word wrap copyright notice at column 70 2000-07-27 09:55:03 +00:00
David Lawrence
9c3531d72a add RCS id string 2000-06-22 22:00:42 +00:00
David Lawrence
1b6d529cb5 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.

Several unused functions removed from dispatch_tcp_test.c (left over
from when it was copied from dispatch_test.c).

Minor other ISC style cleanups.
2000-06-01 19:11:07 +00:00
Brian Wellington
60681e95fe include isc/buffer.h 2000-05-30 23:20:18 +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
Brian Wellington
7df0472d8a Added isc/util.h 2000-04-28 02:12:16 +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
Michael Graff
4195904998 s/DNS_R_/ISC_R_/ change for some codes. 2000-04-06 22:03:35 +00:00
Brian Wellington
c85cd83147 TSIGs don't need to be explicitly rendered 2000-03-29 05:04:45 +00:00
Andreas Gustafsson
5d097eee54 accept # comments in wire data input files 2000-03-16 01:09:13 +00:00
Bob Halley
ca41b452ed update copyrights 2000-02-03 23:08:31 +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