Commit Graph
51 Commits
Author SHA1 Message Date
Andreas Gustafsson e7af081383 removed unused task 2000-09-26 18:26:20 +00:00
Andreas Gustafsson d15f51c600 484. [bug] When the server was reloaded after removing addresses
from the named.conf "listen-on" statement, sockets
                        were still listening on the removed addresses due
                        to reference count loops. [RT #325]

Now there is one client manager object per interface instead of a single
global one; when an interface goes away, it simply destroys the associated
client manager, which will cause all its clients to be shut down in an
orderly fashion.
2000-09-22 00:13:08 +00:00
Brian Wellington fa9a407180 Last set of DESTROYLOCK changes 2000-08-26 01:42:34 +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
Andreas Gustafsson b0e67b3020 removed unnecessary call to isc_socket_cancel() 2000-07-19 20:34:14 +00:00
Andreas Gustafsson 8f874cca90 removed unnecessary locking in ns_interface_shutdown() that
caused the server to deadlock on shutdown on the Alphas.
2000-06-30 02:48:06 +00:00
David Lawrence 9c3531d72a add RCS id string 2000-06-22 22:00:42 +00:00
Brian Wellington b00a764bc8 Only print 'no IPv6 interfaces found' and 'no IPv4 interfaces found'
addresses on startup, not each time interfaces are scanned.
2000-06-08 22:31:55 +00:00
Andreas Gustafsson f1f2f8bd47 Wired up the new 'port' option. Also, the interface manager now has
both a 'listen-on' and a 'listen-on-v6' ACL.  We are still waiting for
the 'listen-on-v6' config file option to set the latter explicitly,
but at least the default value now tracks the 'port' option and the
'-p' command line option.
2000-06-05 19:10:13 +00:00
David Lawrence 7efc8c3f69 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.

Minor other ISC style cleanups.
2000-06-01 18:49:22 +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
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 ca9739800f implement dns_dispatchmgr_t, replacing dns_dispatchlist_t. Use it throughout the library/server. 2000-05-10 21:34:50 +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
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
Bob Halley 738b9aa3de isc_task_create() API change 2000-04-12 01:41:21 +00:00
Michael Graff 4195904998 s/DNS_R_/ISC_R_/ change for some codes. 2000-04-06 22:03:35 +00:00
Andreas Gustafsson e0e78c2ce5 log the destruction of network interfaces 2000-02-16 19:57:06 +00:00
Andreas Gustafsson fd0bc40a25 IP addresses in ACLs are now represented as
isc_netaddr_t, not isc_sockaddr_t
2000-02-15 19:53:05 +00:00
Andreas Gustafsson a174757026 implemented the 'localhost' and 'localnets' ACLs 2000-02-09 22:59:40 +00:00
Andreas Gustafsson e55b792a68 do not listen on interfaces that are not marked 'up' 2000-02-07 18:47:43 +00:00
Bob Halley 7d98a1783f update copyrights 2000-02-03 22:29:57 +00:00
Mark Andrews 25a3fe479f remove unreachable code 2000-02-02 05:55:56 +00:00
Bob Halley bdebe2546b add ns_interfacemgr_findudpdispatcher() 2000-01-26 19:24:28 +00:00
Andreas Gustafsson f5f38e9930 moved listen list reconfiguration code from listenlist.c
to server.c
2000-01-25 21:21:05 +00:00
Bob Halley e485d16462 name tasks 2000-01-25 19:31:23 +00:00
Andreas Gustafsson fe609a031b ignore non-IP4 interfaces in do_ip4() now that the interface
iterator can return such things
2000-01-20 00:00:00 +00:00
Andreas Gustafsson d3f21080e6 report socket errors using isc_log_write, not UNEXPTECTED_ERROR 2000-01-18 22:57:24 +00:00
Andreas Gustafsson e57d7e30f1 merged the two functions ns_clientmgr_addtodispatch() and
ns_clientmgr_accepttcp() into a new single function,
ns_clientmgr_createclients()
2000-01-17 23:48:15 +00:00
Andreas Gustafsson a55d0a9080 obey the 'listen-on' configuration option 2000-01-13 23:32:41 +00:00
Andreas Gustafsson 559b10cc8f client quotas; added reference counting to ns_interface_t
and ns_interfacemgr_t so that they can safely hold quota information
2000-01-11 21:18:22 +00:00
Michael Graff 0941f35ad9 Start moving the dispatcher code to allow it to be used for wire format as well as for lightweight resolver daemon stuff. 2000-01-07 01:17:47 +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
Michael Graff 607dc8013a make dispatcher hash sizes be primes, and provide an increment to help
resolve hash collisions
1999-12-15 17:14:52 +00:00
Bob Halley b8257bd2d8 logging tweaks and fixes 1999-10-23 00:02:23 +00:00
Bob Halley a4b6a1622b really basic logging instead of printf 1999-10-22 19:35:19 +00:00
Bob Halley f4c06dafd5 cancel i/o before detaching from socket 1999-10-07 19:33:54 +00:00
Bob Halley 271d5bfc5c conforming changes for task API simplification 1999-09-23 21:31:03 +00:00
Bob Halley 4c0b089772 allow port to be specified 1999-09-09 02:19:11 +00:00
Bob Halley a2ce103c23 If we can do both IPv4 and IPv6, then use an IPv6 socket for all TCP 1999-08-18 00:36:24 +00:00
Bob Halley b77cab68c6 checkpoint; crude TCP support 1999-08-05 01:51:32 +00:00
Bob Halley af59277d9b overhaul checkpoint; basic IPv6 UDP support; make dispatchers 1999-07-24 01:17:28 +00:00
Bob Halley 22abc74843 eliminate isc/inet.h 1999-07-16 00:32:48 +00:00
Bob Halley eb5670c09e isc_socket_create() API update 1999-07-15 20:18:43 +00:00
Bob Halley ef4b66d355 update isc_sockettype_t enum names 1999-07-13 01:49:33 +00:00
Bob Halley f21dcf7d07 conform to revised socket api 1999-07-07 02:02:52 +00:00
Andreas Gustafsson 3b84ea68c0 use new isc_netaddr_t type to represent network addresses 1999-05-26 06:24:54 +00:00
Andreas Gustafsson 0b718ba733 accessed free memory 1999-05-23 08:26:43 +00:00