dns+kcc: adding dns scavenging to kcc periodic run
[Samba.git] / source4 / dsdb / kcc / kcc_service.h
blob00122ab84c7bc094bff8501023462d6d05113936
1 /*
2 Unix SMB/CIFS mplementation.
4 KCC service
6 Copyright (C) Andrew Tridgell 2009
7 based on drepl service code
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef _DSDB_REPL_KCC_SERVICE_H_
25 #define _DSDB_REPL_KCC_SERVICE_H_
27 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
28 #include "dsdb/common/util.h"
30 struct kccsrv_service {
31 /* the whole kcc service is in one task */
32 struct task_server *task;
34 /* the time the service was started */
35 struct timeval startup_time;
37 /* dn of our configuration partition */
38 struct ldb_dn *config_dn;
40 /*
41 * system session info
42 * with machine account credentials
44 struct auth_session_info *system_session_info;
46 /* list of local partitions */
47 struct dsdb_ldb_dn_list_node *partitions;
50 * a connection to the local samdb
52 struct ldb_context *samdb;
54 /* the guid of our NTDS Settings object, which never changes! */
55 struct GUID ntds_guid;
57 /* some stuff for periodic processing */
58 struct {
60 * the interval between to periodic runs
62 uint32_t interval;
65 * the timestamp for the next event,
66 * this is the timstamp passed to event_add_timed()
68 struct timeval next_event;
70 /* here we have a reference to the timed event the schedules the periodic stuff */
71 struct tevent_timer *te;
73 /* samba_runcmd_send service for samba_kcc */
74 struct tevent_req *subreq;
76 /* return status of samba_kcc */
77 NTSTATUS status;
79 } periodic;
81 time_t last_deleted_check;
83 time_t last_dns_scavenge;
85 time_t last_dns_tombstone_collection;
87 time_t last_full_scan_deleted_check;
89 bool am_rodc;
91 /* run new samba_kcc topology generator code */
92 bool samba_kcc_code;
95 struct kcc_connection_list;
97 #include "dsdb/kcc/garbage_collect_tombstones.h"
98 #include "dsdb/kcc/scavenge_dns_records.h"
99 #include "dsdb/kcc/kcc_service_proto.h"
101 #endif /* _DSDB_REPL_KCC_SERVICE_H_ */