r10656: BIG merge from trunk. Features not copied over
[Samba/nascimento.git] / source3 / include / rpc_ds.h
blob24bf1e948a36b33744169a4b642a183e9724c5df
1 /*
2 Unix SMB/CIFS implementation.
3 SMB parameters and setup
4 Copyright (C) Gerald Carter 2002
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef _RPC_DS_H /* _RPC_LSA_H */
22 #define _RPC_DS_H
24 /* Opcodes available on PIPE_LSARPC_DS */
26 #define DS_GETPRIMDOMINFO 0x00
27 #define DS_NOP 0xFF /* no op -- placeholder */
29 /* Opcodes available on PIPE_NETLOGON */
31 #define DS_ENUM_DOM_TRUSTS 0x28
34 /* macros for RPC's */
36 /* DSROLE_PRIMARY_DOMAIN_INFO_BASIC */
38 /* flags */
40 #define DSROLE_PRIMARY_DS_RUNNING 0x00000001
41 #define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002
42 #define DSROLE_UPGRADE_IN_PROGRESS 0x00000004
43 #define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000
45 /* machine role */
47 #define DSROLE_STANDALONE_SRV 2
48 #define DSROLE_DOMAIN_MEMBER_SRV 3
49 #define DSROLE_BDC 4
50 #define DSROLE_PDC 5
53 typedef struct
55 uint16 machine_role;
56 uint16 unknown; /* 0x6173 -- maybe just alignment? */
58 uint32 flags;
60 uint32 netbios_ptr;
61 uint32 dnsname_ptr;
62 uint32 forestname_ptr;
64 struct uuid domain_guid;
66 UNISTR2 netbios_domain;
68 UNISTR2 dns_domain; /* our dns domain */
69 UNISTR2 forest_domain; /* root domain of the forest to which we belong */
70 } DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
72 typedef struct
74 DSROLE_PRIMARY_DOMAIN_INFO_BASIC *basic;
75 } DS_DOMINFO_CTR;
77 /* info levels for ds_getprimdominfo() */
79 #define DsRolePrimaryDomainInfoBasic 1
82 /* DS_Q_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() request */
83 typedef struct
85 uint16 level;
86 } DS_Q_GETPRIMDOMINFO;
88 /* DS_R_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() response */
89 typedef struct
91 uint32 ptr;
93 uint16 level;
94 uint16 unknown0; /* 0x455c -- maybe just alignment? */
96 DS_DOMINFO_CTR info;
98 NTSTATUS status;
99 } DS_R_GETPRIMDOMINFO;
101 typedef struct {
102 /* static portion of structure */
103 uint32 netbios_ptr;
104 uint32 dns_ptr;
105 uint32 flags;
106 uint32 parent_index;
107 uint32 trust_type;
108 uint32 trust_attributes;
109 uint32 sid_ptr;
110 struct uuid guid;
112 UNISTR2 netbios_domain;
113 UNISTR2 dns_domain;
114 DOM_SID2 sid;
116 } DS_DOMAIN_TRUSTS;
118 struct ds_domain_trust {
119 /* static portion of structure */
120 uint32 flags;
121 uint32 parent_index;
122 uint32 trust_type;
123 uint32 trust_attributes;
124 struct uuid guid;
126 DOM_SID sid;
127 char *netbios_domain;
128 char *dns_domain;
131 typedef struct {
133 uint32 ptr;
134 uint32 max_count;
135 DS_DOMAIN_TRUSTS *trusts;
137 } DS_DOMAIN_TRUSTS_CTR;
139 #define DS_DOMAIN_IN_FOREST 0x0001 /* domains in the forest to which
140 we belong; even different domain trees */
141 #define DS_DOMAIN_DIRECT_OUTBOUND 0x0002 /* trusted domains */
142 #define DS_DOMAIN_TREE_ROOT 0x0004 /* root of our forest; also available in
143 DsRoleGetPrimaryDomainInfo() */
144 #define DS_DOMAIN_PRIMARY 0x0008 /* our domain */
145 #define DS_DOMAIN_NATIVE_MODE 0x0010 /* native mode AD servers */
146 #define DS_DOMAIN_DIRECT_INBOUND 0x0020 /* trusting domains */
148 /* DS_Q_ENUM_DOM_TRUSTS - DsEnumerateDomainTrusts() request */
149 typedef struct
151 uint32 server_ptr;
152 UNISTR2 server;
153 uint32 flags;
155 } DS_Q_ENUM_DOM_TRUSTS;
157 /* DS_R_ENUM_DOM_TRUSTS - DsEnumerateDomainTrusts() response */
158 typedef struct
160 uint32 num_domains;
161 DS_DOMAIN_TRUSTS_CTR domains;
163 NTSTATUS status;
165 } DS_R_ENUM_DOM_TRUSTS;
168 #endif /* _RPC_DS_H */