2006-12-02 15:46:13 +03:00
/*
Unix SMB / CIFS implementation .
2007-03-14 22:10:21 +03:00
Copyright ( C ) Stefan Metzmacher < metze @ samba . org > 2006
2006-12-02 15:46:13 +03:00
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-10 06:07:03 +04:00
the Free Software Foundation ; either version 3 of the License , or
2006-12-02 15:46:13 +03:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 06:07:03 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2006-12-02 15:46:13 +03:00
*/
2006-12-21 00:54:06 +03:00
# ifndef _LIBNET_BECOME_DC_H
# define _LIBNET_BECOME_DC_H
# include "librpc/gen_ndr/drsuapi.h"
2006-12-20 19:34:35 +03:00
struct libnet_BecomeDC_Domain {
/* input */
const char * dns_name ;
const char * netbios_name ;
const struct dom_sid * sid ;
/* constructed */
struct GUID guid ;
const char * dn_str ;
uint32_t behavior_version ;
2006-12-20 18:34:32 +03:00
uint32_t w2k3_update_revision ;
} ;
2006-12-20 19:34:35 +03:00
struct libnet_BecomeDC_Forest {
/* constructed */
const char * dns_name ;
const char * root_dn_str ;
const char * config_dn_str ;
uint32_t crossref_behavior_version ;
const char * schema_dn_str ;
uint32_t schema_object_version ;
} ;
struct libnet_BecomeDC_SourceDSA {
/* input */
const char * address ;
/* constructed */
const char * dns_name ;
const char * netbios_name ;
const char * site_name ;
const char * server_dn_str ;
const char * ntds_dn_str ;
} ;
struct libnet_BecomeDC_CheckOptions {
const struct libnet_BecomeDC_Domain * domain ;
const struct libnet_BecomeDC_Forest * forest ;
const struct libnet_BecomeDC_SourceDSA * source_dsa ;
} ;
struct libnet_BecomeDC_DestDSA {
/* input */
const char * netbios_name ;
/* constructed */
const char * dns_name ;
const char * site_name ;
struct GUID site_guid ;
const char * computer_dn_str ;
const char * server_dn_str ;
const char * ntds_dn_str ;
struct GUID ntds_guid ;
struct GUID invocation_id ;
uint32_t user_account_control ;
} ;
2006-12-21 00:14:44 +03:00
struct libnet_BecomeDC_PrepareDB {
const struct libnet_BecomeDC_Domain * domain ;
const struct libnet_BecomeDC_Forest * forest ;
const struct libnet_BecomeDC_SourceDSA * source_dsa ;
const struct libnet_BecomeDC_DestDSA * dest_dsa ;
} ;
2006-12-21 00:54:06 +03:00
struct libnet_BecomeDC_StoreChunk ;
struct libnet_BecomeDC_Partition {
struct drsuapi_DsReplicaObjectIdentifier nc ;
struct GUID destination_dsa_guid ;
struct GUID source_dsa_guid ;
struct GUID source_dsa_invocation_id ;
struct drsuapi_DsReplicaHighWaterMark highwatermark ;
2008-07-16 15:01:56 +04:00
bool more_data ;
2006-12-21 00:54:06 +03:00
uint32_t replica_flags ;
2016-10-31 06:19:37 +03:00
WERROR ( * store_chunk ) ( void * private_data ,
const struct libnet_BecomeDC_StoreChunk * info ) ;
2006-12-21 00:54:06 +03:00
} ;
struct libnet_BecomeDC_StoreChunk {
const struct libnet_BecomeDC_Domain * domain ;
const struct libnet_BecomeDC_Forest * forest ;
const struct libnet_BecomeDC_SourceDSA * source_dsa ;
const struct libnet_BecomeDC_DestDSA * dest_dsa ;
const struct libnet_BecomeDC_Partition * partition ;
2011-08-08 12:29:05 +04:00
uint32_t req_level ;
const struct drsuapi_DsGetNCChangesRequest5 * req5 ;
const struct drsuapi_DsGetNCChangesRequest8 * req8 ;
const struct drsuapi_DsGetNCChangesRequest10 * req10 ;
2006-12-21 00:54:06 +03:00
uint32_t ctr_level ;
const struct drsuapi_DsGetNCChangesCtr1 * ctr1 ;
const struct drsuapi_DsGetNCChangesCtr6 * ctr6 ;
2007-02-12 14:20:57 +03:00
const DATA_BLOB * gensec_skey ;
2006-12-21 00:54:06 +03:00
} ;
2006-12-20 18:34:32 +03:00
struct libnet_BecomeDC_Callbacks {
void * private_data ;
2006-12-20 19:34:35 +03:00
NTSTATUS ( * check_options ) ( void * private_data ,
2006-12-21 00:14:44 +03:00
const struct libnet_BecomeDC_CheckOptions * info ) ;
NTSTATUS ( * prepare_db ) ( void * private_data ,
const struct libnet_BecomeDC_PrepareDB * info ) ;
2016-10-31 06:19:37 +03:00
WERROR ( * schema_chunk ) ( void * private_data ,
const struct libnet_BecomeDC_StoreChunk * info ) ;
WERROR ( * config_chunk ) ( void * private_data ,
const struct libnet_BecomeDC_StoreChunk * info ) ;
WERROR ( * domain_chunk ) ( void * private_data ,
const struct libnet_BecomeDC_StoreChunk * info ) ;
2006-12-20 18:34:32 +03:00
} ;
2006-12-02 15:46:13 +03:00
struct libnet_BecomeDC {
struct {
2006-12-03 22:22:51 +03:00
const char * domain_dns_name ;
const char * domain_netbios_name ;
2006-12-07 18:29:38 +03:00
const struct dom_sid * domain_sid ;
2006-12-03 22:22:51 +03:00
const char * source_dsa_address ;
const char * dest_dsa_netbios_name ;
2006-12-20 18:34:32 +03:00
struct libnet_BecomeDC_Callbacks callbacks ;
2010-02-17 19:01:31 +03:00
bool rodc_join ;
} in ;
2006-12-02 15:46:13 +03:00
struct {
const char * error_string ;
} out ;
} ;
2006-12-21 00:54:06 +03:00
# endif /* _LIBNET_BECOME_DC_H */