include/rpc_ds.h

説明を見る。
00001 /* 
00002    Unix SMB/CIFS implementation.
00003    SMB parameters and setup
00004    Copyright (C) Gerald Carter                  2002
00005       
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015    
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 
00021 #ifndef _RPC_DS_H /* _RPC_LSA_H */
00022 #define _RPC_DS_H 
00023 
00024 /* Opcodes available on PIPE_LSARPC_DS */
00025 
00026 #define DS_GETPRIMDOMINFO      0x00
00027 #define DS_NOP                 0xFF     /* no op -- placeholder */
00028 
00029 /* Opcodes available on PIPE_NETLOGON */
00030 
00031 #define DS_ENUM_DOM_TRUSTS      0x28
00032 
00033 
00034 /* macros for RPC's */
00035 
00036 /* DSROLE_PRIMARY_DOMAIN_INFO_BASIC */
00037 
00038 /* flags */
00039 
00040 #define DSROLE_PRIMARY_DS_RUNNING           0x00000001
00041 #define DSROLE_PRIMARY_DS_MIXED_MODE        0x00000002
00042 #define DSROLE_UPGRADE_IN_PROGRESS          0x00000004
00043 #define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT  0x01000000
00044 
00045 /* machine role */
00046 
00047 #define DSROLE_DOMAIN_MEMBER_WKS        1
00048 #define DSROLE_STANDALONE_SRV           2       
00049 #define DSROLE_DOMAIN_MEMBER_SRV        3
00050 #define DSROLE_BDC                      4
00051 #define DSROLE_PDC                      5
00052 
00053 /* Settings for the domainFunctionality attribute in the rootDSE */
00054 
00055 #define DS_DOMAIN_FUNCTION_2000         0
00056 #define DS_DOMAIN_FUCNTION_2003_MIXED   1
00057 #define DS_DOMAIN_FUNCTION_2003         2
00058 
00059 
00060 
00061 typedef struct
00062 {
00063         uint16          machine_role;
00064         uint32          flags;  
00065         uint32          netbios_ptr;
00066         uint32          dnsname_ptr;
00067         uint32          forestname_ptr;
00068         
00069         struct GUID     domain_guid;    
00070         UNISTR2 netbios_domain;
00071         UNISTR2 dns_domain;     /* our dns domain */
00072         UNISTR2 forest_domain;  /* root domain of the forest to which we belong */
00073 } DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
00074 
00075 typedef struct
00076 {
00077         DSROLE_PRIMARY_DOMAIN_INFO_BASIC        *basic;
00078 } DS_DOMINFO_CTR;
00079 
00080 /* info levels for ds_getprimdominfo() */
00081 
00082 #define DsRolePrimaryDomainInfoBasic            1
00083 
00084 
00085 /* DS_Q_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() request */
00086 typedef struct 
00087 {
00088         uint16  level;
00089 } DS_Q_GETPRIMDOMINFO;
00090 
00091 /* DS_R_GETPRIMDOMINFO - DsGetPrimaryDomainInformation() response */
00092 typedef struct 
00093 {
00094         uint32          ptr;
00095                 
00096         uint16          level;
00097         uint16          unknown0;       /* 0x455c -- maybe just alignment? */
00098 
00099         DS_DOMINFO_CTR  info;
00100         
00101         NTSTATUS status;
00102 } DS_R_GETPRIMDOMINFO;
00103 
00104 typedef struct {
00105         /* static portion of structure */
00106         uint32          netbios_ptr;
00107         uint32          dns_ptr;
00108         uint32          flags;
00109         uint32          parent_index;
00110         uint32          trust_type;
00111         uint32          trust_attributes;
00112         uint32          sid_ptr;
00113         struct GUID     guid;
00114         
00115         UNISTR2         netbios_domain;
00116         UNISTR2         dns_domain;
00117         DOM_SID2        sid;
00118 
00119 } DS_DOMAIN_TRUSTS;
00120 
00121 struct ds_domain_trust {
00122         /* static portion of structure */
00123         uint32          flags;
00124         uint32          parent_index;
00125         uint32          trust_type;
00126         uint32          trust_attributes;
00127         struct GUID     guid;
00128         
00129         DOM_SID sid;
00130         char *netbios_domain;
00131         char *dns_domain;
00132 };
00133 
00134 typedef struct {
00135 
00136         uint32                  ptr;
00137         uint32                  max_count;
00138         DS_DOMAIN_TRUSTS        *trusts;
00139         
00140 } DS_DOMAIN_TRUSTS_CTR;
00141 
00142 #define DS_DOMAIN_IN_FOREST           0x0001    /* domains in the forest to which 
00143                                                    we belong; even different domain trees */
00144 #define DS_DOMAIN_DIRECT_OUTBOUND     0x0002    /* trusted domains */
00145 #define DS_DOMAIN_TREE_ROOT           0x0004    /* root of our forest; also available in
00146                                                    DsRoleGetPrimaryDomainInfo() */
00147 #define DS_DOMAIN_PRIMARY             0x0008    /* our domain */
00148 #define DS_DOMAIN_NATIVE_MODE         0x0010    /* native mode AD servers */
00149 #define DS_DOMAIN_DIRECT_INBOUND      0x0020    /* trusting domains */
00150 
00151 /* DS_Q_ENUM_DOM_TRUSTS - DsEnumerateDomainTrusts() request */
00152 typedef struct 
00153 {
00154         uint32          server_ptr;
00155         UNISTR2         server;
00156         uint32          flags;
00157         
00158 } DS_Q_ENUM_DOM_TRUSTS;
00159 
00160 /* DS_R_ENUM_DOM_TRUSTS - DsEnumerateDomainTrusts() response */
00161 typedef struct 
00162 {
00163         uint32                  num_domains;
00164         DS_DOMAIN_TRUSTS_CTR    domains;
00165                 
00166         NTSTATUS status;
00167 
00168 } DS_R_ENUM_DOM_TRUSTS;
00169 
00170 
00171 #endif /* _RPC_DS_H */

Sambaに対してSat Aug 29 21:22:55 2009に生成されました。  doxygen 1.4.7