From 5673e2cec946502da84956f866658718e7632a3e Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 15 Dec 2011 17:44:32 +1100 Subject: s4:rpc-dnsserver: Cache DNS partition information This information will be used for the RPC calls for partition information. --- source4/rpc_server/dnsserver/dnsserver.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'source4/rpc_server/dnsserver/dnsserver.h') diff --git a/source4/rpc_server/dnsserver/dnsserver.h b/source4/rpc_server/dnsserver/dnsserver.h index 818dc60b62..938f2f4b01 100644 --- a/source4/rpc_server/dnsserver/dnsserver.h +++ b/source4/rpc_server/dnsserver/dnsserver.h @@ -126,8 +126,6 @@ struct dnsserver_zoneinfo { struct IP4_ARRAY * aipLocalMasters; - uint32_t dwDpFlags; - char * pszDpFqdn; char * pwszZoneDn; uint32_t dwLastSuccessfulSoaCheck; @@ -142,10 +140,20 @@ struct dnsserver_zoneinfo { }; +struct dnsserver_partition { + struct dnsserver_partition *prev, *next; + struct ldb_dn *partition_dn; + const char *pszDpFqdn; + uint32_t dwDpFlags; + bool is_forest; + int zones_count; +}; + + struct dnsserver_zone { struct dnsserver_zone *prev, *next; + struct dnsserver_partition *partition; const char *name; - struct ldb_dn *partition_dn; struct ldb_dn *zone_dn; struct dnsserver_zoneinfo *zoneinfo; }; @@ -192,8 +200,9 @@ struct dnsserver_serverinfo *dnsserver_init_serverinfo(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct ldb_context *samdb); struct dnsserver_zoneinfo *dnsserver_init_zoneinfo(struct dnsserver_zone *zone, - struct dnsserver_serverinfo *serverinfo, - bool is_forest); + struct dnsserver_serverinfo *serverinfo); +struct dnsserver_partition *dnsserver_find_partition(struct dnsserver_partition *partitions, + const char *dp_fqdn); struct dnsserver_zone *dnsserver_find_zone(struct dnsserver_zone *zones, const char *zone_name); struct ldb_dn *dnsserver_name_to_dn(TALLOC_CTX *mem_ctx, struct dnsserver_zone *z, @@ -203,9 +212,12 @@ uint32_t dnsserver_zone_to_request_filter(const char *zone); /* Database functions from dnsdb.c */ +struct dnsserver_partition *dnsserver_db_enumerate_partitions(TALLOC_CTX *mem_ctx, + struct dnsserver_serverinfo *serverinfo, + struct ldb_context *samdb); struct dnsserver_zone *dnsserver_db_enumerate_zones(TALLOC_CTX *mem_ctx, struct ldb_context *samdb, - bool is_forest); + struct dnsserver_partition *p); WERROR dnsserver_db_add_empty_node(TALLOC_CTX *mem_ctx, struct ldb_context *samdb, struct dnsserver_zone *z, -- cgit