#include <config.h>#include <isc/mem.h>#include <isc/socket.h>#include <isc/string.h>#include <isc/util.h>#include <dns/db.h>#include <dns/lookup.h>#include <dns/rdata.h>#include <dns/rdataset.h>#include <dns/rdatasetiter.h>#include <dns/result.h>#include <dns/view.h>#include <named/types.h>#include <named/lwdclient.h>#include <named/lwresd.h>#include <named/lwsearch.h>Go to the source code of this file.
Functions | |
| static void | start_lookup (ns_lwdclient_t *) |
| static isc_result_t | fill_array (int *pos, dns_rdataset_t *rdataset, int size, unsigned char **rdatas, lwres_uint16_t *rdatalen) |
| static isc_result_t | iterate_node (lwres_grbnresponse_t *grbn, dns_db_t *db, dns_dbnode_t *node, isc_mem_t *mctx) |
| static void | lookup_done (isc_task_t *task, isc_event_t *event) |
| static void | init_grbn (ns_lwdclient_t *client) |
| void | ns_lwdclient_processgrbn (ns_lwdclient_t *client, lwres_buffer_t *b) |
Definition in file lwdgrbn.c.
| static void start_lookup | ( | ns_lwdclient_t * | client | ) | [static] |
Definition at line 396 of file lwdgrbn.c.
References ns_lwdclient::clientmgr, dns_fixedname_init, dns_fixedname_name, dns_lookup_create(), INSIST, ISC_R_SUCCESS, ns_lwdclient::lookup, lookup_done(), ns_lwdclientmgr::mctx, ns_lwdclient_errorpktsend(), ns_lwsearchctx_current(), ns_lwdclient::options, ns_lwdclient::rdtype, ns_lwdclient::searchctx, start_lookup(), ns_lwdclientmgr::task, and ns_lwdclientmgr::view.
| static isc_result_t fill_array | ( | int * | pos, | |
| dns_rdataset_t * | rdataset, | |||
| int | size, | |||
| unsigned char ** | rdatas, | |||
| lwres_uint16_t * | rdatalen | |||
| ) | [static] |
Definition at line 45 of file lwdgrbn.c.
References isc_region::base, dns_rdata_init(), dns_rdata_reset(), dns_rdata_toregion(), dns_rdataset_current(), dns_rdataset_first(), dns_rdataset_next(), INSIST, ISC_R_NOMORE, ISC_R_SUCCESS, isc_region::length, r, and UNUSED.
Referenced by iterate_node(), and lookup_done().
| static isc_result_t iterate_node | ( | lwres_grbnresponse_t * | grbn, | |
| dns_db_t * | db, | |||
| dns_dbnode_t * | node, | |||
| isc_mem_t * | mctx | |||
| ) | [static] |
Definition at line 73 of file lwdgrbn.c.
References dns_db_allrdatasets(), dns_rdataset_count(), dns_rdataset_disassociate(), dns_rdataset_init(), dns_rdatasetiter_current(), dns_rdatasetiter_destroy(), dns_rdatasetiter_first(), dns_rdatasetiter_next(), dns_trust_secure, fill_array(), ISC_INT32_MAX, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_NOMORE, ISC_R_SUCCESS, and ttl.
Referenced by lookup_done().
| static void lookup_done | ( | isc_task_t * | task, | |
| isc_event_t * | event | |||
| ) | [static] |
Definition at line 192 of file lwdgrbn.c.
References isc_region::base, ns_lwdclient::clientmgr, dns_lookup_destroy(), dns_name_totext(), DNS_R_NCACHENXDOMAIN, DNS_R_NCACHENXRRSET, DNS_R_NXDOMAIN, DNS_R_NXRRSET, dns_rdataset_count(), dns_trust_secure, fill_array(), ns_lwdclient::grbn, INSIST, isc_buffer_used, isc_buffer_usedlength, isc_event_free(), isc_mem_get, isc_mem_put, ISC_R_SUCCESS, isc_result_totext(), ISC_TRUE, iterate_node(), isc_region::length, ns_lwdclient::lookup, ns_lwdclientmgr::lwctx, ns_lwdclientmgr::mctx, name, ns_lwdclient_errorpktsend(), ns_lwdclient_log(), ns_lwdclient_sendreply(), NS_LWDCLIENT_SETSEND, ns_lwsearchctx_next(), ns_lwdclient::pkt, r, dns_view::rdclass, ns_lwdclient::rdtype, ns_lwdclient::recv_buffer, REQUIRE, ns_lwdclient::searchctx, ns_lwdclient::sendbuf, ns_lwdclient::sendlength, start_lookup(), dns_rdataset::trust, dns_rdataset::ttl, UNUSED, and ns_lwdclientmgr::view.
| static void init_grbn | ( | ns_lwdclient_t * | client | ) | [static] |
Definition at line 427 of file lwdgrbn.c.
References ns_lwdclient::buffer, ns_lwdclient::grbn, isc_buffer_init, and ns_lwdclient::recv_buffer.
Referenced by ns_lwdclient_processgrbn().
| void ns_lwdclient_processgrbn | ( | ns_lwdclient_t * | client, | |
| lwres_buffer_t * | b | |||
| ) |
Definition at line 442 of file lwdgrbn.c.
References ns_lwdclient::byaddr, ns_lwdclient::clientmgr, dns_fixedname_init, dns_fixedname_name, dns_name_fromtext(), init_grbn(), INSIST, isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, ns_lwdclientmgr::listener, ns_lwdclientmgr::lwctx, ns_lwreslistener::manager, namebuf, ns_lwresd::ndots, ns_lwdclient_errorpktsend(), NS_LWDCLIENT_ISRECVDONE, ns_lwdclient_log(), ns_lwsearchctx_first(), ns_lwsearchctx_init(), ns_lwdclient::options, ns_lwdclient::pkt, ns_lwdclient::query_name, dns_view::rdclass, ns_lwdclient::rdtype, REQUIRE, ns_lwresd::search, ns_lwdclient::searchctx, start_lookup(), and ns_lwdclientmgr::view.
Referenced by process_request().