Lines Matching defs:lwresd

52 #include <named/lwresd.h>
286 * Handle lwresd manager objects
292 ns_lwresd_t *lwresd;
301 lwresd = isc_mem_get(mctx, sizeof(ns_lwresd_t));
302 if (lwresd == NULL)
305 lwresd->mctx = NULL;
306 isc_mem_attach(mctx, &lwresd->mctx);
307 lwresd->view = NULL;
308 lwresd->search = NULL;
309 lwresd->refs = 1;
314 lwresd->ndots = cfg_obj_asuint32(obj);
316 lwresd->ndots = 1;
318 RUNTIME_CHECK(isc_mutex_init(&lwresd->lock) == ISC_R_SUCCESS);
320 lwresd->shutting_down = ISC_FALSE;
336 &lwresd->view);
347 lwresd->search = NULL;
348 result = ns_lwsearchlist_create(lwresd->mctx,
349 &lwresd->search);
387 result = ns_lwsearchlist_append(lwresd->search, name);
399 lwresd->magic = LWRESD_MAGIC;
401 *lwresdp = lwresd;
405 if (lwresd->view != NULL)
406 dns_view_detach(&lwresd->view);
407 if (lwresd->search != NULL)
408 ns_lwsearchlist_detach(&lwresd->search);
409 if (lwresd->mctx != NULL)
410 isc_mem_detach(&lwresd->mctx);
411 isc_mem_put(mctx, lwresd, sizeof(ns_lwresd_t));
429 ns_lwresd_t *lwresd;
436 lwresd = *lwresdp;
439 LOCK(&lwresd->lock);
440 INSIST(lwresd->refs > 0);
441 lwresd->refs--;
442 if (lwresd->refs == 0)
444 UNLOCK(&lwresd->lock);
449 dns_view_detach(&lwresd->view);
450 if (lwresd->search != NULL)
451 ns_lwsearchlist_detach(&lwresd->search);
452 mctx = lwresd->mctx;
453 lwresd->magic = 0;
454 isc_mem_put(mctx, lwresd, sizeof(*lwresd));
511 listener_create(isc_mem_t *mctx, ns_lwresd_t *lwresd,
535 ns_lwdmanager_attach(lwresd, &listener->manager);
695 configure_listener(isc_sockaddr_t *address, ns_lwresd_t *lwresd,
704 result = listener_create(mctx, lwresd, &listener);
766 ns_lwresd_t *lwresd = NULL;
796 CHECK(ns_lwdmanager_create(mctx, lwres, &lwresd));
810 CHECK(configure_listener(&address, lwresd, mctx,
818 CHECK(configure_listener(&addrs[i], lwresd,
822 ns_lwdmanager_detach(&lwresd);
851 if (lwresd != NULL)
852 ns_lwdmanager_detach(&lwresd);