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 /* RpcServerRegisterIfEx Flags */
107 #define RPC_IF_AUTOLISTEN 0x1
108 #define RPC_IF_OLE 0x2
109 #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY 0x4
110 #define RPC_IF_ALLOW_SECURE_ONLY 0x8
112 RPCRTAPI
void RPC_ENTRY
113 RpcRaiseException( RPC_STATUS exception
);
115 RPCRTAPI RPC_STATUS RPC_ENTRY
116 RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding
, RPC_BINDING_HANDLE
* DestinationBinding
);
118 RPCRTAPI RPC_STATUS RPC_ENTRY
119 RpcBindingFree( RPC_BINDING_HANDLE
* Binding
);
121 RPCRTAPI RPC_STATUS RPC_ENTRY
122 RpcBindingInqObject( RPC_BINDING_HANDLE Binding
, UUID
* ObjectUuid
);
123 RPCRTAPI RPC_STATUS RPC_ENTRY
124 RpcBindingReset( RPC_BINDING_HANDLE Binding
);
125 RPCRTAPI RPC_STATUS RPC_ENTRY
126 RpcBindingSetObject( RPC_BINDING_HANDLE Binding
, UUID
* ObjectUuid
);
127 RPCRTAPI RPC_STATUS RPC_ENTRY
128 RpcObjectSetType( UUID
* ObjUuid
, UUID
* TypeUuid
);
130 RPCRTAPI RPC_STATUS RPC_ENTRY
131 RpcBindingFromStringBindingA( unsigned char *StringBinding
, RPC_BINDING_HANDLE
* Binding
);
132 RPCRTAPI RPC_STATUS RPC_ENTRY
133 RpcBindingFromStringBindingW( unsigned short *StringBinding
, RPC_BINDING_HANDLE
* Binding
);
134 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
136 RPCRTAPI RPC_STATUS RPC_ENTRY
137 RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding
, unsigned char **StringBinding
);
138 RPCRTAPI RPC_STATUS RPC_ENTRY
139 RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding
, unsigned short **StringBinding
);
140 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
142 RPCRTAPI RPC_STATUS RPC_ENTRY
143 RpcBindingVectorFree( RPC_BINDING_VECTOR
** BindingVector
);
145 RPCRTAPI RPC_STATUS RPC_ENTRY
146 RpcStringBindingComposeA( unsigned char *ObjUuid
, unsigned char *Protseq
, unsigned char *NetworkAddr
,
147 unsigned char *Endpoint
, unsigned char *Options
, unsigned char **StringBinding
);
148 RPCRTAPI RPC_STATUS RPC_ENTRY
149 RpcStringBindingComposeW( unsigned short *ObjUuid
, unsigned short *Protseq
, unsigned short *NetworkAddr
,
150 unsigned short *Endpoint
, unsigned short *Options
, unsigned short **StringBinding
);
151 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
153 RPCRTAPI RPC_STATUS RPC_ENTRY
154 RpcStringBindingParseA( unsigned char *StringBinding
, unsigned char **ObjUuid
, unsigned char **Protseq
,
155 unsigned char **NetworkAddr
, unsigned char **Endpoint
, unsigned char **NetworkOptions
);
156 RPCRTAPI RPC_STATUS RPC_ENTRY
157 RpcStringBindingParseW( unsigned short *StringBinding
, unsigned short **ObjUuid
, unsigned short **Protseq
,
158 unsigned short **NetworkAddr
, unsigned short **Endpoint
, unsigned short **NetworkOptions
);
159 #define RpcStringBindingParse WINELIB_NAME_AW(RpcStringBindingParse)
161 RPCRTAPI RPC_STATUS RPC_ENTRY
162 RpcEpResolveBinding( RPC_BINDING_HANDLE Binding
, RPC_IF_HANDLE IfSpec
);
164 RPCRTAPI RPC_STATUS RPC_ENTRY
165 RpcEpRegisterA( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
166 UUID_VECTOR
* UuidVector
, unsigned char *Annotation
);
167 RPCRTAPI RPC_STATUS RPC_ENTRY
168 RpcEpRegisterW( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
169 UUID_VECTOR
* UuidVector
, unsigned short *Annotation
);
170 #define RpcEpRegister WINELIB_NAME_AW(RpcEpRegister)
172 RPCRTAPI RPC_STATUS RPC_ENTRY
173 RpcEpRegisterNoReplaceA( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
174 UUID_VECTOR
* UuidVector
, unsigned char *Annotation
);
175 RPCRTAPI RPC_STATUS RPC_ENTRY
176 RpcEpRegisterNoReplaceW( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
177 UUID_VECTOR
* UuidVector
, unsigned short *Annotation
);
178 #define RpcEpRegisterNoReplace WINELIB_NAME_AW(RpcEpRegisterNoReplace)
180 RPCRTAPI RPC_STATUS RPC_ENTRY
181 RpcEpUnregister( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
182 UUID_VECTOR
* UuidVector
);
184 RPCRTAPI RPC_STATUS RPC_ENTRY
185 RpcServerInqBindings( RPC_BINDING_VECTOR
** BindingVector
);
187 RPCRTAPI RPC_STATUS RPC_ENTRY
188 RpcServerListen( unsigned int MinimumCallThreads
, unsigned int MaxCalls
, unsigned int DontWait
);
190 RPCRTAPI RPC_STATUS RPC_ENTRY
191 RpcMgmtWaitServerListen( void );
193 RPCRTAPI RPC_STATUS RPC_ENTRY
194 RpcMgmtStopServerListening( RPC_BINDING_HANDLE Binding
);
196 RPCRTAPI RPC_STATUS RPC_ENTRY
197 RpcServerRegisterIf( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
);
199 RPCRTAPI RPC_STATUS RPC_ENTRY
200 RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
,
201 unsigned int Flags
, unsigned int MaxCalls
, RPC_IF_CALLBACK_FN
* IfCallbackFn
);
203 RPCRTAPI RPC_STATUS RPC_ENTRY
204 RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
,
205 unsigned int Flags
, unsigned int MaxCalls
, unsigned int MaxRpcSize
, RPC_IF_CALLBACK_FN
* IfCallbackFn
);
207 RPCRTAPI RPC_STATUS RPC_ENTRY
208 RpcServerUnregisterIf( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, unsigned int WaitForCallsToComplete
);
210 RPCRTAPI RPC_STATUS RPC_ENTRY
211 RpcServerUnregisterIfEx( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, int RundownContextHandles
);
214 RPCRTAPI RPC_STATUS RPC_ENTRY
215 RpcServerUseProtseqA(unsigned char *Protseq
, unsigned int MaxCalls
, void *SecurityDescriptor
);
216 RPCRTAPI RPC_STATUS RPC_ENTRY
217 RpcServerUseProtseqW(unsigned short *Protseq
, unsigned int MaxCalls
, void *SecurityDescriptor
);
218 #define RpcServerUseProtseq WINELIB_NAME_AW(RpcServerUseProtseq)
220 RPCRTAPI RPC_STATUS RPC_ENTRY
221 RpcServerUseProtseqEpA( unsigned char *Protseq
, unsigned int MaxCalls
, unsigned char *Endpoint
, void *SecurityDescriptor
);
222 RPCRTAPI RPC_STATUS RPC_ENTRY
223 RpcServerUseProtseqEpW( unsigned short *Protseq
, unsigned int MaxCalls
, unsigned short *Endpoint
, void *SecurityDescriptor
);
224 #define RpcServerUseProtseqEp WINELIB_NAME_AW(RpcServerUseProtseqEp)
226 RPCRTAPI RPC_STATUS RPC_ENTRY
227 RpcServerUseProtseqEpExA( unsigned char *Protseq
, unsigned int MaxCalls
, unsigned char *Endpoint
, void *SecurityDescriptor
,
228 PRPC_POLICY Policy
);
229 RPCRTAPI RPC_STATUS RPC_ENTRY
230 RpcServerUseProtseqEpExW( unsigned short *Protseq
, unsigned int MaxCalls
, unsigned short *Endpoint
, void *SecurityDescriptor
,
231 PRPC_POLICY Policy
);
232 #define RpcServerUseProtseqEpEx WINELIB_NAME_AW(RpcServerUseProtseqEpEx)
234 RPCRTAPI RPC_STATUS RPC_ENTRY
235 RpcServerRegisterAuthInfoA( unsigned char *ServerPrincName
, unsigned long AuthnSvc
, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn
,
237 RPCRTAPI RPC_STATUS RPC_ENTRY
238 RpcServerRegisterAuthInfoW( unsigned short *ServerPrincName
, unsigned long AuthnSvc
, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn
,
240 #define RpcServerRegisterAuthInfo WINELIB_NAME_AW(RpcServerRegisterAuthInfo)
242 RPCRTAPI RPC_STATUS RPC_ENTRY
243 RpcNetworkIsProtseqValidA( unsigned char *protseq
);
244 RPCRTAPI RPC_STATUS RPC_ENTRY
245 RpcNetworkIsProtseqValidW( unsigned short *protseq
);
246 #define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
248 RPCRTAPI RPC_STATUS RPC_ENTRY
249 RpcStringFreeA(unsigned char** String
);
250 RPCRTAPI RPC_STATUS RPC_ENTRY
251 RpcStringFreeW(unsigned short** String
);
252 #define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
254 RPCRTAPI RPC_STATUS RPC_ENTRY
255 UuidToStringA( UUID
* Uuid
, unsigned char** StringUuid
);
256 RPCRTAPI RPC_STATUS RPC_ENTRY
257 UuidToStringW( UUID
* Uuid
, unsigned short** StringUuid
);
258 #define UuidToString WINELIB_NAME_AW(UuidToString)
260 RPCRTAPI RPC_STATUS RPC_ENTRY
261 UuidFromStringA( unsigned char* StringUuid
, UUID
* Uuid
);
262 RPCRTAPI RPC_STATUS RPC_ENTRY
263 UuidFromStringW( unsigned short* StringUuid
, UUID
* Uuid
);
264 #define UuidFromString WINELIB_NAME_AW(UuidFromString)
266 RPCRTAPI RPC_STATUS RPC_ENTRY
267 UuidCreate( UUID
* Uuid
);
268 RPCRTAPI RPC_STATUS RPC_ENTRY
269 UuidCreateSequential( UUID
* Uuid
);
270 RPCRTAPI RPC_STATUS RPC_ENTRY
271 UuidCreateNil( UUID
* Uuid
);
272 RPCRTAPI
signed int RPC_ENTRY
273 UuidCompare( UUID
* Uuid1
, UUID
* Uuid2
, RPC_STATUS
* Status_
);
274 RPCRTAPI
int RPC_ENTRY
275 UuidEqual( UUID
* Uuid1
, UUID
* Uuid2
, RPC_STATUS
* Status_
);
276 RPCRTAPI
unsigned short RPC_ENTRY
277 UuidHash(UUID
* Uuid
, RPC_STATUS
* Status_
);
278 RPCRTAPI
int RPC_ENTRY
279 UuidIsNil( UUID
* Uuid
, RPC_STATUS
* Status_
);
283 #endif /*__WINE_RPCDCE_H */