2 * Copyright (C) 2000 Francois Gouget
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_RPCDCE_H
20 #define __WINE_RPCDCE_H
41 typedef void* RPC_AUTH_IDENTITY_HANDLE;
42 typedef void* RPC_AUTHZ_HANDLE;
43 typedef void* RPC_IF_HANDLE;
44 typedef I_RPC_HANDLE RPC_BINDING_HANDLE;
45 typedef RPC_BINDING_HANDLE handle_t;
46 #define rpc_binding_handle_t RPC_BINDING_HANDLE
47 #define RPC_MGR_EPV void
49 typedef struct _RPC_BINDING_VECTOR
52 RPC_BINDING_HANDLE BindingH[1];
54 #define rpc_binding_vector_t RPC_BINDING_VECTOR
56 typedef struct _UUID_VECTOR
61 #define uuid_vector_t UUID_VECTOR
63 typedef struct _RPC_IF_ID
66 unsigned short VersMajor;
67 unsigned short VersMinor;
70 #define RPC_C_BINDING_INFINITE_TIMEOUT 10
71 #define RPC_C_BINDING_MIN_TIMEOUT 0
72 #define RPC_C_BINDING_DEFAULT_TIMEOUT 5
73 #define RPC_C_BINDING_MAX_TIMEOUT 9
75 #define RPC_C_CANCEL_INFINITE_TIMEOUT -1
77 #define RPC_C_LISTEN_MAX_CALLS_DEFAULT 1234
78 #define RPC_C_PROTSEQ_MAX_REQS_DEFAULT 10
80 /* RPC_POLICY EndpointFlags */
81 #define RPC_C_BIND_TO_ALL_NICS 0x1
82 #define RPC_C_USE_INTERNET_PORT 0x1
83 #define RPC_C_USE_INTRANET_PORT 0x2
84 #define RPC_C_DONT_FAIL 0x4
86 /* RPC_POLICY EndpointFlags specific to the Falcon/RPC transport */
87 #define RPC_C_MQ_TEMPORARY 0x0000
88 #define RPC_C_MQ_PERMANENT 0x0001
89 #define RPC_C_MQ_CLEAR_ON_OPEN 0x0002
90 #define RPC_C_MQ_USE_EXISTING_SECURITY 0x0004
91 #define RPC_C_MQ_AUTHN_LEVEL_NONE 0x0000
92 #define RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY 0x0008
93 #define RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY 0x0010
96 typedef RPC_STATUS RPC_ENTRY RPC_IF_CALLBACK_FN( RPC_IF_HANDLE InterfaceUuid, void *Context );
97 typedef void (__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)();
99 typedef struct _RPC_POLICY
102 unsigned long EndpointFlags;
103 unsigned long NICFlags;
104 } RPC_POLICY, *PRPC_POLICY;
106 typedef struct _SEC_WINNT_AUTH_IDENTITY_W
108 unsigned short __RPC_FAR* User;
109 unsigned long UserLength;
110 unsigned short __RPC_FAR* Domain;
111 unsigned long DomainLength;
112 unsigned short __RPC_FAR* Password;
113 unsigned long PasswordLength;
115 } SEC_WINNT_AUTH_IDENTITY_W, *PSEC_WINNT_AUTH_IDENTITY_W;
117 typedef struct _SEC_WINNT_AUTH_IDENTITY_A
119 unsigned char __RPC_FAR* User;
120 unsigned long UserLength;
121 unsigned char __RPC_FAR* Domain;
122 unsigned long DomainLength;
123 unsigned char __RPC_FAR* Password;
124 unsigned long PasswordLength;
126 } SEC_WINNT_AUTH_IDENTITY_A, *PSEC_WINNT_AUTH_IDENTITY_A;
128 #define _SEC_WINNT_AUTH_IDENTITY WINELIB_NAME_AW(_SEC_WINNT_AUTH_IDENTITY_)
129 #define SEC_WINNT_AUTH_IDENTITY WINELIB_NAME_AW(SEC_WINNT_AUTH_IDENTITY_)
130 #define PSEC_WINNT_AUTH_IDENTITY WINELIB_NAME_AW(PSEC_WINNT_AUTH_IDENTITY_)
132 /* SEC_WINNT_AUTH Flags */
133 #define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
134 #define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
136 /* RpcServerRegisterIfEx Flags */
137 #define RPC_IF_AUTOLISTEN 0x1
138 #define RPC_IF_OLE 0x2
139 #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY 0x4
140 #define RPC_IF_ALLOW_SECURE_ONLY 0x8
142 RPC_STATUS RPC_ENTRY DceErrorInqTextA(RPC_STATUS e, unsigned char *buffer);
143 RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS e, unsigned short *buffer);
144 #define DceErrorInqText WINELIB_NAME_AW(DceErrorInqText)
146 RPCRTAPI void RPC_ENTRY
147 RpcRaiseException( RPC_STATUS exception );
149 RPCRTAPI RPC_STATUS RPC_ENTRY
150 RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE* DestinationBinding );
152 RPCRTAPI RPC_STATUS RPC_ENTRY
153 RpcBindingFree( RPC_BINDING_HANDLE* Binding );
155 RPCRTAPI RPC_STATUS RPC_ENTRY
156 RpcBindingInqObject( RPC_BINDING_HANDLE Binding, UUID* ObjectUuid );
157 RPCRTAPI RPC_STATUS RPC_ENTRY
158 RpcBindingReset( RPC_BINDING_HANDLE Binding );
159 RPCRTAPI RPC_STATUS RPC_ENTRY
160 RpcBindingSetObject( RPC_BINDING_HANDLE Binding, UUID* ObjectUuid );
161 RPCRTAPI RPC_STATUS RPC_ENTRY
162 RpcObjectSetType( UUID* ObjUuid, UUID* TypeUuid );
164 RPCRTAPI RPC_STATUS RPC_ENTRY
165 RpcBindingFromStringBindingA( unsigned char *StringBinding, RPC_BINDING_HANDLE* Binding );
166 RPCRTAPI RPC_STATUS RPC_ENTRY
167 RpcBindingFromStringBindingW( unsigned short *StringBinding, RPC_BINDING_HANDLE* Binding );
168 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
170 RPCRTAPI RPC_STATUS RPC_ENTRY
171 RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding, unsigned char **StringBinding );
172 RPCRTAPI RPC_STATUS RPC_ENTRY
173 RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, unsigned short **StringBinding );
174 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
176 RPCRTAPI RPC_STATUS RPC_ENTRY
177 RpcBindingVectorFree( RPC_BINDING_VECTOR** BindingVector );
179 RPCRTAPI RPC_STATUS RPC_ENTRY
180 RpcStringBindingComposeA( unsigned char *ObjUuid, unsigned char *Protseq, unsigned char *NetworkAddr,
181 unsigned char *Endpoint, unsigned char *Options, unsigned char **StringBinding );
182 RPCRTAPI RPC_STATUS RPC_ENTRY
183 RpcStringBindingComposeW( unsigned short *ObjUuid, unsigned short *Protseq, unsigned short *NetworkAddr,
184 unsigned short *Endpoint, unsigned short *Options, unsigned short **StringBinding );
185 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
187 RPCRTAPI RPC_STATUS RPC_ENTRY
188 RpcStringBindingParseA( unsigned char *StringBinding, unsigned char **ObjUuid, unsigned char **Protseq,
189 unsigned char **NetworkAddr, unsigned char **Endpoint, unsigned char **NetworkOptions );
190 RPCRTAPI RPC_STATUS RPC_ENTRY
191 RpcStringBindingParseW( unsigned short *StringBinding, unsigned short **ObjUuid, unsigned short **Protseq,
192 unsigned short **NetworkAddr, unsigned short **Endpoint, unsigned short **NetworkOptions );
193 #define RpcStringBindingParse WINELIB_NAME_AW(RpcStringBindingParse)
195 RPCRTAPI RPC_STATUS RPC_ENTRY
196 RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE IfSpec );
198 RPCRTAPI RPC_STATUS RPC_ENTRY
199 RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
200 UUID_VECTOR* UuidVector, unsigned char *Annotation );
201 RPCRTAPI RPC_STATUS RPC_ENTRY
202 RpcEpRegisterW( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
203 UUID_VECTOR* UuidVector, unsigned short *Annotation );
204 #define RpcEpRegister WINELIB_NAME_AW(RpcEpRegister)
206 RPCRTAPI RPC_STATUS RPC_ENTRY
207 RpcEpRegisterNoReplaceA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
208 UUID_VECTOR* UuidVector, unsigned char *Annotation );
209 RPCRTAPI RPC_STATUS RPC_ENTRY
210 RpcEpRegisterNoReplaceW( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
211 UUID_VECTOR* UuidVector, unsigned short *Annotation );
212 #define RpcEpRegisterNoReplace WINELIB_NAME_AW(RpcEpRegisterNoReplace)
214 RPCRTAPI RPC_STATUS RPC_ENTRY
215 RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
216 UUID_VECTOR* UuidVector );
218 RPCRTAPI RPC_STATUS RPC_ENTRY
219 RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector );
221 RPCRTAPI RPC_STATUS RPC_ENTRY
222 RpcServerListen( unsigned int MinimumCallThreads, unsigned int MaxCalls, unsigned int DontWait );
224 RPCRTAPI RPC_STATUS RPC_ENTRY
225 RpcMgmtWaitServerListen( void );
227 RPCRTAPI RPC_STATUS RPC_ENTRY
228 RpcMgmtStopServerListening( RPC_BINDING_HANDLE Binding );
230 RPCRTAPI RPC_STATUS RPC_ENTRY
231 RpcServerRegisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv );
233 RPCRTAPI RPC_STATUS RPC_ENTRY
234 RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
235 unsigned int Flags, unsigned int MaxCalls, RPC_IF_CALLBACK_FN* IfCallbackFn );
237 RPCRTAPI RPC_STATUS RPC_ENTRY
238 RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
239 unsigned int Flags, unsigned int MaxCalls, unsigned int MaxRpcSize, RPC_IF_CALLBACK_FN* IfCallbackFn );
241 RPCRTAPI RPC_STATUS RPC_ENTRY
242 RpcServerUnregisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, unsigned int WaitForCallsToComplete );
244 RPCRTAPI RPC_STATUS RPC_ENTRY
245 RpcServerUnregisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, int RundownContextHandles );
248 RPCRTAPI RPC_STATUS RPC_ENTRY
249 RpcServerUseProtseqA(unsigned char *Protseq, unsigned int MaxCalls, void *SecurityDescriptor);
250 RPCRTAPI RPC_STATUS RPC_ENTRY
251 RpcServerUseProtseqW(unsigned short *Protseq, unsigned int MaxCalls, void *SecurityDescriptor);
252 #define RpcServerUseProtseq WINELIB_NAME_AW(RpcServerUseProtseq)
254 RPCRTAPI RPC_STATUS RPC_ENTRY
255 RpcServerUseProtseqEpA( unsigned char *Protseq, unsigned int MaxCalls, unsigned char *Endpoint, void *SecurityDescriptor );
256 RPCRTAPI RPC_STATUS RPC_ENTRY
257 RpcServerUseProtseqEpW( unsigned short *Protseq, unsigned int MaxCalls, unsigned short *Endpoint, void *SecurityDescriptor );
258 #define RpcServerUseProtseqEp WINELIB_NAME_AW(RpcServerUseProtseqEp)
260 RPCRTAPI RPC_STATUS RPC_ENTRY
261 RpcServerUseProtseqEpExA( unsigned char *Protseq, unsigned int MaxCalls, unsigned char *Endpoint, void *SecurityDescriptor,
262 PRPC_POLICY Policy );
263 RPCRTAPI RPC_STATUS RPC_ENTRY
264 RpcServerUseProtseqEpExW( unsigned short *Protseq, unsigned int MaxCalls, unsigned short *Endpoint, void *SecurityDescriptor,
265 PRPC_POLICY Policy );
266 #define RpcServerUseProtseqEpEx WINELIB_NAME_AW(RpcServerUseProtseqEpEx)
268 RPCRTAPI RPC_STATUS RPC_ENTRY
269 RpcServerRegisterAuthInfoA( unsigned char *ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
271 RPCRTAPI RPC_STATUS RPC_ENTRY
272 RpcServerRegisterAuthInfoW( unsigned short *ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
274 #define RpcServerRegisterAuthInfo WINELIB_NAME_AW(RpcServerRegisterAuthInfo)
276 RPCRTAPI RPC_STATUS RPC_ENTRY
277 RpcNetworkIsProtseqValidA( unsigned char *protseq );
278 RPCRTAPI RPC_STATUS RPC_ENTRY
279 RpcNetworkIsProtseqValidW( unsigned short *protseq );
280 #define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
282 RPCRTAPI RPC_STATUS RPC_ENTRY
283 RpcStringFreeA(unsigned char** String);
284 RPCRTAPI RPC_STATUS RPC_ENTRY
285 RpcStringFreeW(unsigned short** String);
286 #define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
288 RPCRTAPI RPC_STATUS RPC_ENTRY
289 UuidToStringA( UUID* Uuid, unsigned char** StringUuid );
290 RPCRTAPI RPC_STATUS RPC_ENTRY
291 UuidToStringW( UUID* Uuid, unsigned short** StringUuid );
292 #define UuidToString WINELIB_NAME_AW(UuidToString)
294 RPCRTAPI RPC_STATUS RPC_ENTRY
295 UuidFromStringA( unsigned char* StringUuid, UUID* Uuid );
296 RPCRTAPI RPC_STATUS RPC_ENTRY
297 UuidFromStringW( unsigned short* StringUuid, UUID* Uuid );
298 #define UuidFromString WINELIB_NAME_AW(UuidFromString)
300 RPCRTAPI RPC_STATUS RPC_ENTRY
301 UuidCreate( UUID* Uuid );
302 RPCRTAPI RPC_STATUS RPC_ENTRY
303 UuidCreateSequential( UUID* Uuid );
304 RPCRTAPI RPC_STATUS RPC_ENTRY
305 UuidCreateNil( UUID* Uuid );
306 RPCRTAPI signed int RPC_ENTRY
307 UuidCompare( UUID* Uuid1, UUID* Uuid2, RPC_STATUS* Status_ );
308 RPCRTAPI int RPC_ENTRY
309 UuidEqual( UUID* Uuid1, UUID* Uuid2, RPC_STATUS* Status_ );
310 RPCRTAPI unsigned short RPC_ENTRY
311 UuidHash(UUID* Uuid, RPC_STATUS* Status_ );
312 RPCRTAPI int RPC_ENTRY
313 UuidIsNil( UUID* Uuid, RPC_STATUS* Status_ );
317 #endif /*__WINE_RPCDCE_H */