xref: /reactos/sdk/include/psdk/ntdsapi.h (revision 2e5bae69)
1 /*
2  * Copyright (C) 2006 Dmitry Timoshkov
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #ifndef __WINE_NTDSAPI_H
20 #define __WINE_NTDSAPI_H
21 
22 /* FIXME: #include <schedule.h> */
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 DWORD WINAPI DsClientMakeSpnForTargetServerA(LPCSTR, LPCSTR, DWORD*, LPSTR);
29 DWORD WINAPI DsClientMakeSpnForTargetServerW(LPCWSTR, LPCWSTR, DWORD*, LPWSTR);
30 #define DsClientMakeSpnForTargetServer WINELIB_NAME_AW(DsClientMakeSpnForTargetServer)
31 
32 DWORD WINAPI DsMakeSpnA(LPCSTR, LPCSTR, LPCSTR, USHORT, LPCSTR, DWORD*, LPSTR);
33 DWORD WINAPI DsMakeSpnW(LPCWSTR, LPCWSTR, LPCWSTR, USHORT, LPCWSTR, DWORD*, LPWSTR);
34 #define DsMakeSpn WINELIB_NAME_AW(DsMakeSpn)
35 
36 typedef enum
37 {
38     DS_NAME_NO_FLAGS              = 0x0,
39     DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1,
40     DS_NAME_FLAG_EVAL_AT_DC       = 0x2,
41     DS_NAME_FLAG_GCVERIFY         = 0x4,
42     DS_NAME_FLAG_TRUST_REFERRAL   = 0x8
43 } DS_NAME_FLAGS;
44 
45 typedef enum
46 {
47     DS_UNKNOWN_NAME            = 0,
48     DS_FQDN_1779_NAME          = 1,
49     DS_NT4_ACCOUNT_NAME        = 2,
50     DS_DISPLAY_NAME            = 3,
51     DS_UNIQUE_ID_NAME          = 6,
52     DS_CANONICAL_NAME          = 7,
53     DS_USER_PRINCIPAL_NAME     = 8,
54     DS_CANONICAL_NAME_EX       = 9,
55     DS_SERVICE_PRINCIPAL_NAME  = 10,
56     DS_SID_OR_SID_HISTORY_NAME = 11,
57     DS_DNS_DOMAIN_NAME         = 12
58 } DS_NAME_FORMAT;
59 
60 typedef enum
61 {
62     DS_SPN_DNS_HOST    = 0,
63     DS_SPN_DN_HOST     = 1,
64     DS_SPN_NB_HOST     = 2,
65     DS_SPN_DOMAIN      = 3,
66     DS_SPN_NB_DOMAIN   = 4,
67     DS_SPN_SERVICE     = 5
68 } DS_SPN_NAME_TYPE;
69 
70 typedef enum
71 {
72     DS_SPN_ADD_SPN_OP     = 0,
73     DS_SPN_REPLACE_SPN_OP = 1,
74     DS_SPN_DELETE_SPN_OP  = 2
75 } DS_SPN_WRITE_OP;
76 
77 typedef struct
78 {
79     DWORD status;
80     LPSTR pDomain;
81     LPSTR pName;
82 } DS_NAME_RESULT_ITEMA, *PDS_NAME_RESULT_ITEMA;
83 
84 typedef struct
85 {
86     DWORD  status;
87     LPWSTR pDomain;
88     LPWSTR pName;
89 } DS_NAME_RESULT_ITEMW, *PDS_NAME_RESULT_ITEMW;
90 
91 DECL_WINELIB_TYPE_AW(DS_NAME_RESULT_ITEM)
92 DECL_WINELIB_TYPE_AW(PDS_NAME_RESULT_ITEM)
93 
94 typedef struct
95 {
96     DWORD                 cItems;
97     PDS_NAME_RESULT_ITEMA rItems;
98 } DS_NAME_RESULTA, *PDS_NAME_RESULTA;
99 
100 typedef struct
101 {
102     DWORD                 cItems;
103     PDS_NAME_RESULT_ITEMW rItems;
104 } DS_NAME_RESULTW, *PDS_NAME_RESULTW;
105 
106 DECL_WINELIB_TYPE_AW(DS_NAME_RESULT)
107 DECL_WINELIB_TYPE_AW(PDS_NAME_RESULT)
108 
109 DWORD WINAPI DsCrackNamesA(HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, DWORD num, const CHAR **names, PDS_NAME_RESULTA *result);
110 DWORD WINAPI DsCrackNamesW(HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, DWORD num, const WCHAR **names, PDS_NAME_RESULTW *result);
111 #define DsCrackNames WINELIB_NAME_AW(DsCrackNames)
112 DWORD WINAPI DsServerRegisterSpnA(DS_SPN_WRITE_OP operation, LPCSTR ServiceClass, LPCSTR UserObjectDN);
113 DWORD WINAPI DsServerRegisterSpnW(DS_SPN_WRITE_OP operation, LPCWSTR ServiceClass, LPCWSTR UserObjectDN);
114 #define DsServerRegisterSpn WINELIB_NAME_AW(DsServerRegisterSpn)
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #endif /* __WINE_NTDSAPI_H */
121