Commit 81ce556e authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

moved xfrin.c from bin/named to lib/dns by repository copy

parent d43c2cc7
......@@ -38,7 +38,7 @@ SUBDIRS = unix
TARGETS = named
OBJS = client.@O@ interfacemgr.@O@ log.@O@ main.@O@ query.@O@ \
rootns.@O@ server.@O@ update.@O@ xfrin.@O@ xfrout.@O@
rootns.@O@ server.@O@ update.@O@ xfrout.@O@
UOBJS = unix/os.@O@
......
/*
* Copyright (C) 1999 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef NS_XFRIN_H
#define NS_XFRIN_H 1
/*****
***** Module Info
*****/
/*
* Incoming zone transfers (AXFR + IXFR).
*/
#include <dns/types.h>
/***
*** Functions
***/
void ns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master);
#endif /* NS_XFRIN_H */
This diff is collapsed.
......@@ -123,7 +123,7 @@ OBJS = a6.@O@ adb.@O@ callbacks.@O@ compress.@O@ \
rdataset.@O@ rdatasetiter.@O@ rdataslab.@O@ resolver.@O@ \
result.@O@ \
tcpmsg.@O@ time.@O@ tkey.@O@ tsig.@O@ ttl.@O@ \
version.@O@ view.@O@ zone.@O@ zt.@O@ \
version.@O@ view.@O@ xfrin.@O@ zone.@O@ zt.@O@ \
${DSTOBJS} ${OPENSSLOBJS} ${DNSSAFEOBJS} ${CONFOBJS}
# Alphabetically
......@@ -136,7 +136,7 @@ SRCS = a6.c adb.c callbacks.c compress.c \
rdataset.c rdatasetiter.c rdataslab.c resolver.c \
result.c \
tcpmsg.c time.c tkey.c tsig.c ttl.c \
version.c view.c zone.c zt.c
version.c view.c xfrin.c zone.c zt.c
SUBDIRS = include sec config
TARGETS = include/dns/enumtype.h include/dns/enumclass.h \
......
......@@ -25,6 +25,7 @@ HEADERS = adb.h callbacks.h cert.h compress.h db.h dbiterator.h dbtable.h \
rcode.h rdata.h rdataclass.h rdatalist.h rdataset.h \
rdatasetiter.h rdataslab.h rdatatype.h result.h \
secalg.h tcpmsg.h time.h tkey.h tsig.h ttl.h types.h view.h \
xfrin.h \
confacl.h confcommon.h confctl.h confctx.h confcache.h \
confip.h confkeys.h conflog.h conflsn.h confparser.h \
confresolv.h confrrset.h confserv.h confzone.h
......
......@@ -15,8 +15,8 @@
* SOFTWARE.
*/
#ifndef NS_XFRIN_H
#define NS_XFRIN_H 1
#ifndef DNS_XFRIN_H
#define DNS_XFRIN_H 1
/*****
***** Module Info
......@@ -32,6 +32,8 @@
*** Functions
***/
void ns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master);
void dns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master,
isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr);
#endif /* NS_XFRIN_H */
#endif /* DNS_XFRIN_H */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrin.c,v 1.20 1999/10/28 19:11:33 gson Exp $ */
/* $Id: xfrin.c,v 1.21 1999/10/29 02:12:01 gson Exp $ */
#include <config.h>
......@@ -51,12 +51,10 @@
#include <dns/journal.h>
#include <dns/view.h>
#include <dns/tsig.h>
#include <dns/xfrin.h>
#include <dns/zone.h>
#include <dns/zt.h>
#include <named/globals.h>
#include <named/xfrin.h>
/*
* Incoming AXFR and IXFR.
*/
......@@ -167,6 +165,7 @@ xfrin_create(isc_mem_t *mctx,
dns_db_t *db,
isc_task_t *task,
isc_socketmgr_t *socketmgr,
isc_timermgr_t *timermgr,
dns_name_t *zonename,
dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype,
......@@ -456,7 +455,10 @@ xfr_rr(xfrin_ctx_t *xfr,
}
void
ns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master) {
dns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master,
isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr)
{
dns_name_t *zonename;
isc_task_t *task;
xfrin_ctx_t *xfr;
......@@ -475,7 +477,7 @@ ns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master) {
CHECK(result);
task = NULL;
RUNTIME_CHECK(isc_task_create(ns_g_taskmgr, ns_g_mctx, 0, &task)
RUNTIME_CHECK(isc_task_create(taskmgr, mctx, 0, &task)
== DNS_R_SUCCESS);
if (db == NULL) {
......@@ -486,11 +488,12 @@ ns_xfrin_start(dns_zone_t *zone, isc_sockaddr_t *master) {
xfrtype = dns_rdatatype_ixfr;
}
CHECK(xfrin_create(ns_g_mctx,
CHECK(xfrin_create(mctx,
zone,
db,
task,
ns_g_socketmgr,
socketmgr,
timermgr,
zonename,
dns_rdataclass_in, xfrtype,
master, key, &xfr));
......@@ -535,6 +538,7 @@ xfrin_create(isc_mem_t *mctx,
dns_db_t *db,
isc_task_t *task,
isc_socketmgr_t *socketmgr,
isc_timermgr_t *timermgr,
dns_name_t *zonename,
dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype,
......@@ -601,7 +605,7 @@ xfrin_create(isc_mem_t *mctx,
CHECK(dns_name_dup(zonename, mctx, &xfr->name));
isc_interval_set(&interval, 3600, 0); /* XXX */
CHECK(isc_timer_create(ns_g_timermgr, isc_timertype_once,
CHECK(isc_timer_create(timermgr, isc_timertype_once,
NULL, &interval, task,
xfrin_timeout, xfr, &xfr->timer));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment