#include <isc/lang.h>
#include <isc/event.h>
#include <dns/types.h>
Go to the source code of this file.
Data Structures | |
struct | dns_lookupevent |
A 'dns_lookupevent_t' is returned when a lookup completes. The sender field will be set to the lookup that completed. If 'result' is ISC_R_SUCCESS, then 'names' will contain a list of names associated with the address. The recipient of the event must not change the list and must not refer to any of the name data after the event is freed. More... | |
Defines | |
#define | DNS_LOOKUP_H 1 |
Typedefs | |
typedef ISC_LANG_BEGINDECLS struct dns_lookupevent | dns_lookupevent_t |
Functions | |
isc_result_t | dns_lookup_create (isc_mem_t *mctx, dns_name_t *name, dns_rdatatype_t type, dns_view_t *view, unsigned int options, isc_task_t *task, isc_taskaction_t action, void *arg, dns_lookup_t **lookupp) |
Finds the rrsets matching 'name' and 'type'. | |
void | dns_lookup_cancel (dns_lookup_t *lookup) |
Cancel 'lookup'. | |
void | dns_lookup_destroy (dns_lookup_t **lookupp) |
Destroy 'lookup'. |
MP:
Definition in file lookup.h.
typedef ISC_LANG_BEGINDECLS struct dns_lookupevent dns_lookupevent_t |
isc_result_t dns_lookup_create | ( | isc_mem_t * | mctx, | |
dns_name_t * | name, | |||
dns_rdatatype_t | type, | |||
dns_view_t * | view, | |||
unsigned int | options, | |||
isc_task_t * | task, | |||
isc_taskaction_t | action, | |||
void * | arg, | |||
dns_lookup_t ** | lookupp | |||
) |
Finds the rrsets matching 'name' and 'type'.
Requires:
Definition at line 385 of file lookup.c.
References dns_lookup::canceled, DESTROYLOCK, DNS_EVENT_LOOKUPDONE, dns_fixedname_init, dns_fixedname_name, dns_name_copy(), dns_rdataset_init(), dns_view_attach(), dns_lookup::event, dns_lookup::fetch, isc_event_allocate(), isc_event_free(), ISC_FALSE, isc_mem_attach(), isc_mem_get, isc_mem_putanddetach, isc_mutex_init, ISC_R_FAILURE, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_task_attach(), isc_task_detach(), levent_destroy(), dns_lookup::lock, lookup_find(), LOOKUP_MAGIC, dns_lookup::magic, dns_lookup::mctx, dns_lookup::name, dns_lookup::options, dns_lookup::rdataset, dns_lookup::restarts, dns_lookup::sigrdataset, dns_lookup::task, dns_lookup::type, and dns_lookup::view.
Referenced by dns_byaddr_create(), and start_lookup().
void dns_lookup_cancel | ( | dns_lookup_t * | lookup | ) |
Cancel 'lookup'.
Notes:
Definition at line 462 of file lookup.c.
References dns_lookup::canceled, dns_resolver_cancelfetch(), dns_lookup::fetch, INSIST, ISC_TRUE, dns_lookup::lock, LOCK, REQUIRE, UNLOCK, VALID_LOOKUP, and dns_lookup::view.
Referenced by dns_byaddr_cancel().
void dns_lookup_destroy | ( | dns_lookup_t ** | lookupp | ) |
Destroy 'lookup'.
Requires:
Definition at line 479 of file lookup.c.
References DESTROYLOCK, dns_rdataset_disassociate(), dns_rdataset_isassociated(), dns_lookup::event, isc_mem_putanddetach, dns_lookup::lock, dns_lookup::magic, dns_lookup::mctx, dns_lookup::rdataset, REQUIRE, dns_lookup::sigrdataset, dns_lookup::task, VALID_LOOKUP, and dns_lookup::view.
Referenced by dns_byaddr_destroy(), and lookup_done().