c01d10554ec444e45c147c289e22057028236bdb
[tprouty/samba.git] / source3 / include / rpc_ds.h
1 /* 
2    Unix SMB/CIFS implementation.
3    SMB parameters and setup
4    Copyright (C) Gerald Carter                  2002
5       
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.
10    
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.
15    
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.
19 */
20
21 #ifndef _RPC_DS_H /* _RPC_LSA_H */
22 #define _RPC_DS_H 
23
24 #include "rpc_misc.h"
25
26
27 /* Opcodes available on PIPE_LSARPC_DS */
28
29 #define DS_GETPRIMDOMINFO      0x00
30
31
32 /* macros for RPC's */
33
34 #define DSROLE_PRIMARY_DS_RUNNING           0x00000001
35 #define DSROLE_PRIMARY_DS_MIXED_MODE        0x00000002
36 #define DSROLE_UPGRADE_IN_PROGRESS          0x00000004
37 #define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT  0x01000000
38
39 typedef struct
40 {
41         uint16          machine_role;
42         uint16          unknown;                /* 0x6173 -- maybe just alignment? */
43         
44         uint32          flags;
45         
46         uint32          netbios_ptr;
47         uint32          dnsname_ptr;
48         uint32          forestname_ptr;
49         
50         GUID            domain_guid;
51         
52         UNISTR2 netbios_domain;
53         /* these 2 might be reversed in order.  I can't tell from 
54            my tests as both values are the same --jerry */
55         UNISTR2 dns_domain;
56         UNISTR2 forest_domain;
57 } DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
58
59 typedef struct
60 {
61         DSROLE_PRIMARY_DOMAIN_INFO_BASIC        *basic;
62 } DS_DOMINFO_CTR;
63
64 /* info levels for ds_getprimdominfo() */
65
66 #define DsRolePrimaryDomainInfoBasic            1
67
68
69 /* DS_Q_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() request */
70 typedef struct 
71 {
72         uint16  level;
73 } DS_Q_GETPRIMDOMINFO;
74
75 /* DS_R_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() response */
76 typedef struct 
77 {
78         uint32          ptr;
79                 
80         uint16          level;
81         uint16          unknown0;       /* 0x455c -- maybe just alignment? */
82
83         DS_DOMINFO_CTR  info;
84         
85         NTSTATUS status;
86 } DS_R_GETPRIMDOMINFO;
87
88
89
90
91 #endif /* _RPC_DS_H */