2 * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2000, 2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: lwresd.h,v 1.12.208.3 2006/03/02 00:37:20 marka Exp $ */
20 #ifndef NAMED_LWRESD_H
21 #define NAMED_LWRESD_H 1
23 #include <isc/types.h>
24 #include <isc/sockaddr.h>
26 #include <isccfg/cfg.h>
28 #include <dns/types.h>
35 ns_lwsearchlist_t
*search
;
38 isc_boolean_t shutting_down
;
42 struct ns_lwreslistener
{
47 isc_sockaddr_t address
;
51 ISC_LIST(ns_lwdclientmgr_t
) cmgrs
;
52 ISC_LINK(ns_lwreslistener_t
) link
;
59 ns_lwresd_configure(isc_mem_t
*mctx
, const cfg_obj_t
*config
);
62 ns_lwresd_parseeresolvconf(isc_mem_t
*mctx
, cfg_parser_t
*pctx
,
69 ns_lwresd_shutdown(void);
75 ns_lwdmanager_create(isc_mem_t
*mctx
, const cfg_obj_t
*lwres
,
76 ns_lwresd_t
**lwresdp
);
79 ns_lwdmanager_attach(ns_lwresd_t
*source
, ns_lwresd_t
**targetp
);
82 ns_lwdmanager_detach(ns_lwresd_t
**lwresdp
);
88 ns_lwreslistener_attach(ns_lwreslistener_t
*source
,
89 ns_lwreslistener_t
**targetp
);
92 ns_lwreslistener_detach(ns_lwreslistener_t
**listenerp
);
95 ns_lwreslistener_unlinkcm(ns_lwreslistener_t
*listener
, ns_lwdclientmgr_t
*cm
);
98 ns_lwreslistener_linkcm(ns_lwreslistener_t
*listener
, ns_lwdclientmgr_t
*cm
);
104 * INTERNAL FUNCTIONS.
107 ns__lwresd_memalloc(void *arg
, size_t size
);
110 ns__lwresd_memfree(void *arg
, void *mem
, size_t size
);
112 #endif /* NAMED_LWRESD_H */