#include <isc/lang.h>
#include <dns/types.h>
Go to the source code of this file.
Defines | |
#define | DNS_XFRIN_H 1 |
Typedefs | |
typedef struct dns_xfrin_ctx | dns_xfrin_ctx_t |
A transfer in progress. This is an opaque type. | |
Functions | |
ISC_LANG_BEGINDECLS isc_result_t | dns_xfrin_create (dns_zone_t *zone, dns_rdatatype_t xfrtype, isc_sockaddr_t *masteraddr, dns_tsigkey_t *tsigkey, isc_mem_t *mctx, isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr, isc_task_t *task, dns_xfrindone_t done, dns_xfrin_ctx_t **xfrp) |
see dns_xfrin_create2() | |
isc_result_t | dns_xfrin_create2 (dns_zone_t *zone, dns_rdatatype_t xfrtype, isc_sockaddr_t *masteraddr, isc_sockaddr_t *sourceaddr, dns_tsigkey_t *tsigkey, isc_mem_t *mctx, isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr, isc_task_t *task, dns_xfrindone_t done, dns_xfrin_ctx_t **xfrp) |
isc_result_t | dns_xfrin_create3 (dns_zone_t *zone, dns_rdatatype_t xfrtype, isc_sockaddr_t *masteraddr, isc_sockaddr_t *sourceaddr, isc_dscp_t dscp, dns_tsigkey_t *tsigkey, isc_mem_t *mctx, isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr, isc_task_t *task, dns_xfrindone_t done, dns_xfrin_ctx_t **xfrp) |
Attempt to start an incoming zone transfer of 'zone' from 'masteraddr', creating a dns_xfrin_ctx_t object to manage it. Attach '*xfrp' to the newly created object. | |
void | dns_xfrin_shutdown (dns_xfrin_ctx_t *xfr) |
If the zone transfer 'xfr' has already finished, do nothing. Otherwise, abort it and cause it to call its done callback with a status of ISC_R_CANCELED. | |
void | dns_xfrin_detach (dns_xfrin_ctx_t **xfrp) |
Detach a reference to a zone transfer object. Caller to maintain external locking if required. | |
void | dns_xfrin_attach (dns_xfrin_ctx_t *source, dns_xfrin_ctx_t **target) |
Caller to maintain external locking if required. |
Definition in file xfrin.h.
typedef struct dns_xfrin_ctx dns_xfrin_ctx_t |
ISC_LANG_BEGINDECLS isc_result_t dns_xfrin_create | ( | dns_zone_t * | zone, | |
dns_rdatatype_t | xfrtype, | |||
isc_sockaddr_t * | masteraddr, | |||
dns_tsigkey_t * | tsigkey, | |||
isc_mem_t * | mctx, | |||
isc_timermgr_t * | timermgr, | |||
isc_socketmgr_t * | socketmgr, | |||
isc_task_t * | task, | |||
dns_xfrindone_t | done, | |||
dns_xfrin_ctx_t ** | xfrp | |||
) |
Definition at line 609 of file xfrin.c.
References dns_xfrin_create3(), dns_zone_getxfrsource4(), dns_zone_getxfrsource4dscp(), dns_zone_getxfrsource6(), dns_zone_getxfrsource6dscp(), INSIST, isc_sockaddr_pf(), and PF_INET6.
isc_result_t dns_xfrin_create2 | ( | dns_zone_t * | zone, | |
dns_rdatatype_t | xfrtype, | |||
isc_sockaddr_t * | masteraddr, | |||
isc_sockaddr_t * | sourceaddr, | |||
dns_tsigkey_t * | tsigkey, | |||
isc_mem_t * | mctx, | |||
isc_timermgr_t * | timermgr, | |||
isc_socketmgr_t * | socketmgr, | |||
isc_task_t * | task, | |||
dns_xfrindone_t | done, | |||
dns_xfrin_ctx_t ** | xfrp | |||
) |
isc_result_t dns_xfrin_create3 | ( | dns_zone_t * | zone, | |
dns_rdatatype_t | xfrtype, | |||
isc_sockaddr_t * | masteraddr, | |||
isc_sockaddr_t * | sourceaddr, | |||
isc_dscp_t | dscp, | |||
dns_tsigkey_t * | tsigkey, | |||
isc_mem_t * | mctx, | |||
isc_timermgr_t * | timermgr, | |||
isc_socketmgr_t * | socketmgr, | |||
isc_task_t * | task, | |||
dns_xfrindone_t | done, | |||
dns_xfrin_ctx_t ** | xfrp | |||
) |
Attempt to start an incoming zone transfer of 'zone' from 'masteraddr', creating a dns_xfrin_ctx_t object to manage it. Attach '*xfrp' to the newly created object.
Iff ISC_R_SUCCESS is returned, '*done' is guaranteed to be called in the context of 'task', with 'zone' and a result code as arguments when the transfer finishes.
Requires:
Definition at line 650 of file xfrin.c.
References CHECK, dns_db_detach(), DNS_NAME_MAXTEXT, dns_zone_getclass(), dns_zone_getdb(), dns_zone_getorigin(), dns_zone_name(), dns_xfrin_ctx::done, ISC_LOG_ERROR, ISC_R_SUCCESS, dns_xfrin_ctx::refcount, REQUIRE, xfrin_create(), xfrin_log1(), and xfrin_start().
Referenced by dns_xfrin_create(), dns_xfrin_create2(), and got_transfer_quota().
void dns_xfrin_shutdown | ( | dns_xfrin_ctx_t * | xfr | ) |
If the zone transfer 'xfr' has already finished, do nothing. Otherwise, abort it and cause it to call its done callback with a status of ISC_R_CANCELED.
Definition at line 693 of file xfrin.c.
References ISC_R_CANCELED, dns_xfrin_ctx::shuttingdown, and xfrin_fail().
Referenced by zone_shutdown().
void dns_xfrin_detach | ( | dns_xfrin_ctx_t ** | xfrp | ) |
Detach a reference to a zone transfer object. Caller to maintain external locking if required.
Definition at line 706 of file xfrin.c.
References INSIST, maybe_free(), and dns_xfrin_ctx::refcount.
Referenced by zone_xfrdone().
void dns_xfrin_attach | ( | dns_xfrin_ctx_t * | source, | |
dns_xfrin_ctx_t ** | target | |||
) |
Caller to maintain external locking if required.
Definition at line 699 of file xfrin.c.
References dns_xfrin_ctx::refcount, and REQUIRE.