Lines Matching refs:client
184 ns_lwdclient_t *client;
203 client = event->ev_arg;
204 cm = client->clientmgr;
205 INSIST(client->lookup == (dns_lookup_t *)event->ev_sender);
208 grbn = &client->grbn;
215 dns_lookup_destroy(&client->lookup);
222 result = ns_lwsearchctx_next(&client->searchctx);
226 start_lookup(client);
237 ns_lwdclient_errorpktsend(client, lwresult);
242 b = client->recv_buffer;
254 result = dns_name_totext(name, ISC_TRUE, &client->recv_buffer);
258 grbn->realnamelen = isc_buffer_usedlength(&client->recv_buffer) -
264 grbn->rdtype = client->rdtype;
323 client->pkt.recvlength = LWRES_RECVLENGTH;
324 client->pkt.authtype = 0; /* XXXMLG */
325 client->pkt.authlength = 0;
326 client->pkt.result = LWRES_R_SUCCESS;
329 grbn, &client->pkt, &lwb);
347 client->sendbuf = r.base;
348 client->sendlength = r.length;
349 result = ns_lwdclient_sendreply(client, &r);
353 NS_LWDCLIENT_SETSEND(client);
355 dns_lookup_destroy(&client->lookup);
375 if (client->lookup != NULL)
376 dns_lookup_destroy(&client->lookup);
383 ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
387 start_lookup(ns_lwdclient_t *client) {
392 cm = client->clientmgr;
394 INSIST(client->lookup == NULL);
402 while (ns_lwsearchctx_current(&client->searchctx,
404 if (ns_lwsearchctx_next(&client->searchctx) != ISC_R_SUCCESS) {
405 ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
412 client->rdtype, cm->view,
413 client->options, cm->task, lookup_done,
414 client, &client->lookup);
416 ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
422 init_grbn(ns_lwdclient_t *client) {
423 client->grbn.rdclass = 0;
424 client->grbn.rdtype = 0;
425 client->grbn.ttl = 0;
426 client->grbn.nrdatas = 0;
427 client->grbn.realname = NULL;
428 client->grbn.realnamelen = 0;
429 client->grbn.rdatas = 0;
430 client->grbn.rdatalen = 0;
431 client->grbn.base = NULL;
432 client->grbn.baselen = 0;
433 isc_buffer_init(&client->recv_buffer, client->buffer, LWRES_RECVLENGTH);
437 ns_lwdclient_processgrbn(ns_lwdclient_t *client, lwres_buffer_t *b) {
443 REQUIRE(NS_LWDCLIENT_ISRECVDONE(client));
444 INSIST(client->byaddr == NULL);
446 cm = client->clientmgr;
450 b, &client->pkt, &req);
456 client->options = 0;
464 client->rdtype = req->rdtype;
469 dns_fixedname_init(&client->query_name);
470 result = dns_name_fromtext(dns_fixedname_name(&client->query_name),
474 ns_lwsearchctx_init(&client->searchctx,
476 dns_fixedname_name(&client->query_name),
478 ns_lwsearchctx_first(&client->searchctx);
480 ns_lwdclient_log(50, "client %p looking for type %d",
481 client, client->rdtype);
492 init_grbn(client);
497 start_lookup(client);
508 ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);