#ifndef _RPC_DS_H
#define _RPC_DS_H
#include "rpc_misc.h"
#define DS_GETPRIMDOMINFO 0x00
#define DS_NOP 0xFF
#define DS_ENUM_DOM_TRUSTS 0x28
#define DSROLE_PRIMARY_DS_RUNNING 0x00000001
#define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002
#define DSROLE_UPGRADE_IN_PROGRESS 0x00000004
#define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000
#define DSROLE_STANDALONE_SRV 2
#define DSROLE_DOMAIN_MEMBER_SRV 3
#define DSROLE_BDC 4
#define DSROLE_PDC 5
typedef struct
{
uint16 machine_role;
uint16 unknown;
uint32 flags;
uint32 netbios_ptr;
uint32 dnsname_ptr;
uint32 forestname_ptr;
GUID domain_guid;
UNISTR2 netbios_domain;
UNISTR2 dns_domain;
UNISTR2 forest_domain;
} DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
typedef struct
{
DSROLE_PRIMARY_DOMAIN_INFO_BASIC *basic;
} DS_DOMINFO_CTR;
#define DsRolePrimaryDomainInfoBasic 1
typedef struct
{
uint16 level;
} DS_Q_GETPRIMDOMINFO;
typedef struct
{
uint32 ptr;
uint16 level;
uint16 unknown0;
DS_DOMINFO_CTR info;
NTSTATUS status;
} DS_R_GETPRIMDOMINFO;
typedef struct {
uint32 netbios_ptr;
uint32 dns_ptr;
uint32 flags;
uint32 parent_index;
uint32 trust_type;
uint32 trust_attributes;
uint32 sid_ptr;
GUID guid;
UNISTR2 netbios_domain;
UNISTR2 dns_domain;
DOM_SID2 sid;
} DS_DOMAIN_TRUSTS;
struct ds_domain_trust {
uint32 flags;
uint32 parent_index;
uint32 trust_type;
uint32 trust_attributes;
GUID guid;
DOM_SID sid;
char *netbios_domain;
char *dns_domain;
};
typedef struct {
uint32 ptr;
uint32 max_count;
DS_DOMAIN_TRUSTS *trusts;
} DS_DOMAIN_TRUSTS_CTR;
#define DS_DOMAIN_IN_FOREST 0x0001
#define DS_DOMAIN_DIRECT_OUTBOUND 0x0002
#define DS_DOMAIN_TREE_ROOT 0x0004
#define DS_DOMAIN_PRIMARY 0x0008
#define DS_DOMAIN_NATIVE_MODE 0x0010
#define DS_DOMAIN_DIRECT_INBOUND 0x0020
typedef struct
{
uint32 server_ptr;
UNISTR2 server;
uint32 flags;
} DS_Q_ENUM_DOM_TRUSTS;
typedef struct
{
uint32 num_domains;
DS_DOMAIN_TRUSTS_CTR domains;
NTSTATUS status;
} DS_R_ENUM_DOM_TRUSTS;
#endif