#include <isc/lang.h>
#include <isc/event.h>
#include <dns/types.h>
Go to the source code of this file.
Data Structures | |
struct | dns_byaddrevent |
A 'dns_byaddrevent_t' is returned when a byaddr completes. The sender field will be set to the byaddr 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_BYADDR_H 1 |
#define | DNS_BYADDROPT_IPV6INT 0x0002 |
Note DNS_BYADDROPT_IPV6NIBBLE is now deprecated. | |
Typedefs | |
typedef ISC_LANG_BEGINDECLS struct dns_byaddrevent | dns_byaddrevent_t |
Functions | |
isc_result_t | dns_byaddr_create (isc_mem_t *mctx, isc_netaddr_t *address, dns_view_t *view, unsigned int options, isc_task_t *task, isc_taskaction_t action, void *arg, dns_byaddr_t **byaddrp) |
Find the domain name of 'address'. | |
void | dns_byaddr_cancel (dns_byaddr_t *byaddr) |
Cancel 'byaddr'. | |
void | dns_byaddr_destroy (dns_byaddr_t **byaddrp) |
Destroy 'byaddr'. | |
isc_result_t | dns_byaddr_createptrname (isc_netaddr_t *address, isc_boolean_t nibble, dns_name_t *name) |
isc_result_t | dns_byaddr_createptrname2 (isc_netaddr_t *address, unsigned int options, dns_name_t *name) |
Creates a name that would be used in a PTR query for this address. The nibble flag indicates that the 'nibble' format is to be used if an IPv6 address is provided, instead of the 'bitstring' format. Since we dropped the support of the bitstring labels, it is expected that the flag is always set. 'options' are the same as for dns_byaddr_create(). |
MP:
Definition in file byaddr.h.
#define DNS_BYADDROPT_IPV6INT 0x0002 |
Note DNS_BYADDROPT_IPV6NIBBLE is now deprecated.
Definition at line 75 of file byaddr.h.
Referenced by byaddr_done(), dns_byaddr_createptrname(), dns_byaddr_createptrname2(), and get_reverse().
typedef ISC_LANG_BEGINDECLS struct dns_byaddrevent dns_byaddrevent_t |
isc_result_t dns_byaddr_create | ( | isc_mem_t * | mctx, | |
isc_netaddr_t * | address, | |||
dns_view_t * | view, | |||
unsigned int | options, | |||
isc_task_t * | task, | |||
isc_taskaction_t | action, | |||
void * | arg, | |||
dns_byaddr_t ** | byaddrp | |||
) |
Find the domain name of 'address'.
Notes:
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa.
Definition at line 215 of file byaddr.c.
References bevent_destroy(), BYADDR_MAGIC, dns_byaddr::canceled, DESTROYLOCK, dns_byaddr_createptrname2(), DNS_EVENT_BYADDRDONE, dns_fixedname_init, dns_fixedname_name, dns_lookup_create(), dns_byaddr::event, isc_event_free(), ISC_EVENT_INIT, ISC_FALSE, ISC_LIST_INIT, 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(), dns_byaddr::lock, dns_byaddr::lookup, lookup_done(), dns_byaddr::magic, dns_byaddr::mctx, dns_byaddr::name, dns_byaddr::options, and dns_byaddr::task.
Referenced by start_byaddr().
void dns_byaddr_cancel | ( | dns_byaddr_t * | byaddr | ) |
Cancel 'byaddr'.
Notes:
Definition at line 286 of file byaddr.c.
References dns_byaddr::canceled, dns_lookup_cancel(), ISC_TRUE, dns_byaddr::lock, LOCK, dns_byaddr::lookup, REQUIRE, UNLOCK, and VALID_BYADDR.
void dns_byaddr_destroy | ( | dns_byaddr_t ** | byaddrp | ) |
Destroy 'byaddr'.
Requires:
Definition at line 301 of file byaddr.c.
References DESTROYLOCK, dns_lookup_destroy(), dns_byaddr::event, isc_mem_putanddetach, dns_byaddr::lock, dns_byaddr::lookup, dns_byaddr::magic, dns_byaddr::mctx, REQUIRE, dns_byaddr::task, and VALID_BYADDR.
Referenced by byaddr_done().
isc_result_t dns_byaddr_createptrname | ( | isc_netaddr_t * | address, | |
isc_boolean_t | nibble, | |||
dns_name_t * | name | |||
) |
Definition at line 52 of file byaddr.c.
References dns_byaddr_createptrname2(), DNS_BYADDROPT_IPV6INT, and UNUSED.
isc_result_t dns_byaddr_createptrname2 | ( | isc_netaddr_t * | address, | |
unsigned int | options, | |||
dns_name_t * | name | |||
) |
Creates a name that would be used in a PTR query for this address. The nibble flag indicates that the 'nibble' format is to be used if an IPv6 address is provided, instead of the 'bitstring' format. Since we dropped the support of the bitstring labels, it is expected that the flag is always set. 'options' are the same as for dns_byaddr_create().
Requires:
Definition at line 65 of file byaddr.c.
References AF_INET6, buffer, DNS_BYADDROPT_IPV6INT, dns_name_fromtext(), dns_rootname, isc_netaddr::family, hex_digits, isc_buffer_add, isc_buffer_init, ISC_R_NOTIMPLEMENTED, REQUIRE, and isc_netaddr::type.
Referenced by dns_byaddr_create(), dns_byaddr_createptrname(), and get_reverse().