2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-23 10:39:16 +00:00

145 Commits

Author SHA1 Message Date
Michael Graff
a72ca8608c revert part of a previous commit. This makes net/host unreachable hard errors again. 2000-06-26 20:16:01 +00:00
Michael Graff
53b63f5467 minor change to make certain 'on' is defined. This used to be used only by USE_CMSG, but is also used to turn on BSD compatibility, so test on SO_BSDCOMPAT too. 2000-06-26 18:20:25 +00:00
Michael Graff
18a8c21c77 turn on BSD compatibility to avoid the annoying linux 'return host unreachable for unconnected UDP datagrams' bug. 2000-06-26 17:48:26 +00:00
Michael Graff
79f9369c4f gc DOIO_UNEXPECTED as it was never used 2000-06-23 19:58:38 +00:00
David Lawrence
9c3531d72a add RCS id string 2000-06-22 22:00:42 +00:00
David Lawrence
49dbdb0186 update_copyrights 2000-06-21 22:05:07 +00:00
Michael Graff
3036f326e5 attach to the memory context on manager create, and detach on destroy 2000-06-21 00:01:52 +00:00
Michael Graff
8470db5b12 clean up ; remove unneeded function arguments 2000-06-20 17:24:47 +00:00
Michael Graff
f64ded0ac7 set ISC_SOCKEVENTATTR_MULTICAST on packets received from a multicast address 2000-06-15 18:25:49 +00:00
Michael Graff
ccc067f7d5 enable INSIST/REQUIRE() checking of bound status on sockets 2000-06-08 00:23:54 +00:00
Michael Graff
9f732d73da put the correct (new) socket on the linked list, not the existing (listen) socket. 2000-06-02 20:09:01 +00:00
Michael Graff
0a161e9da7 use a linked list, rather than a counter, to keep track of sockets. This makes
debugging easier.  Also, while here, s/EMPTY/ISC_LIST_EMPTY/g
2000-06-02 01:27:27 +00:00
David Lawrence
87cafc5e70 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 was added to isc/util.h to deal with a handful of very
special places where something is qualified as const but really needs to have
its const qualifier removed.

Also cleaned up a few places where variable names clashed with reserved
identifiers.  (Which mostly works fine, but strictly speaking is undefined
by the standard.)

Minor other ISC style cleanups.
2000-06-01 17:20:56 +00:00
Michael Graff
d98c74e2ec set the default destination port in the view, and use it when returning addresses from the adb. 2000-06-01 00:30:58 +00:00
Michael Graff
bfd98dd959 don't log ports where they don't make sense 2000-05-31 23:03:01 +00:00
David Lawrence
ed019cabc1 fixed lines > 79 columns wide 2000-05-24 05:10:00 +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
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
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
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
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
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
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
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
7ce10e3d8f quiet a compiler warning 2000-04-19 22:36:07 +00:00
Michael Graff
e44487bfc2 convert sender, arg, action, etc. to ev_sender, ev_arg, ev_action, etc. 2000-04-17 19:22:44 +00:00
Michael Graff
0ed4c4ee35 make unreachable hard errors. 2000-04-14 15:38:28 +00:00
Mark Andrews
b61bbad878 Freebsd 4.0 needs sys/param.h for ALIGN 2000-04-13 08:10:18 +00:00
Michael Graff
b206fa17b2 allocate space for cmsg more correctly. Grr. 2000-03-15 20:05:06 +00:00
Michael Graff
788354c051 Currently, descriptors with changes are sent to the watcher via a pipe.
Previously, both ends were set to non-blocking I/O.  Now, only the
reader is set non-blocking.  This means the writer will block for a while
if the pipe fills, but since the watcher is in a different thread from
the reader, the pipe will eventually drain, and the writer can continue.

This is really nothing more than a lock, just not a mutex-type lock.
2000-03-15 19:48:11 +00:00
Michael Graff
ae8d0aedd6 implement pktinfo through dispatcher -> named client 2000-03-14 03:30:52 +00:00
Michael Graff
0205c5a4ad fix case where CMSG_SPACE() is not a macro 2000-03-13 21:09:56 +00:00
Andreas Gustafsson
427c9218c2 isc_socket_connect() leaked memory when connect() returned
EHOSTUNREACH
2000-02-09 19:02:40 +00:00
Bob Halley
ca41b452ed update copyrights 2000-02-03 23:08:31 +00:00
Michael Graff
5726326ccd fix? a socket problem with canceling things, again 2000-02-02 19:00:01 +00:00
Bob Halley
6e1e90b9b6 Undo 1.100 which caused problems on platforms other than Linux. 2000-02-02 02:34:30 +00:00
Andreas Gustafsson
7b24a94d11 typo in comment 2000-02-02 00:41:26 +00:00
Bob Halley
2314617d4a Fix problem with canceling connecting sockets.
The manager will no longer try to dispatch internal events for dead sockets,
preventing a situation where the ref count could go from 0 back to 1!
2000-01-28 01:31:21 +00:00
Bob Halley
b199c609b1 Only set SO_REUSEADDR for TCP sockets. 2000-01-22 02:29:49 +00:00
Michael Graff
440be4c866 move util.h to <isc/util.h> 1999-12-16 22:24:22 +00:00
Michael Graff
f39add73bc Actually commit the ipv6 socket code I wrote last week. 1999-12-15 20:47:38 +00:00
Michael Graff
efff2a52af Make this compile (without ipv6 socket support) on half-done implementations. 1999-12-10 16:51:39 +00:00
Michael Graff
c2b450fa72 don't hide the fact that some ipv6 stacks aren't all there. 1999-12-09 00:19:31 +00:00