source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/mprapi.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 41.1 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef __ROUTING_MPRADMIN_H__
7#define __ROUTING_MPRADMIN_H__
8
9#include <winapifamily.h>
10
11#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
12
13#include <lmcons.h>
14#include <ras.h>
15#include <in6addr.h>
16#include <wincrypt.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#ifndef CALLBACK
23#define CALLBACK WINAPI
24#endif
25
26#define RRAS_SERVICE_NAME TEXT("RemoteAccess")
27
28#define PID_IPX 0x0000002B
29#define PID_IP 0x00000021
30#define PID_NBF 0x0000003F
31#define PID_ATALK 0x00000029
32
33#define MAX_INTERFACE_NAME_LEN 256
34#define MAX_TRANSPORT_NAME_LEN 40
35#define MAX_MEDIA_NAME 16
36#define MAX_PORT_NAME 16
37#define MAX_DEVICE_NAME 128
38#define MAX_PHONE_NUMBER_LEN 128
39#define MAX_DEVICETYPE_NAME 16
40
41 typedef enum _ROUTER_INTERFACE_TYPE {
42 ROUTER_IF_TYPE_CLIENT,ROUTER_IF_TYPE_HOME_ROUTER,ROUTER_IF_TYPE_FULL_ROUTER,ROUTER_IF_TYPE_DEDICATED,ROUTER_IF_TYPE_INTERNAL,
43 ROUTER_IF_TYPE_LOOPBACK,ROUTER_IF_TYPE_TUNNEL1,ROUTER_IF_TYPE_DIALOUT
44 } ROUTER_INTERFACE_TYPE;
45
46 typedef enum _ROUTER_CONNECTION_STATE {
47 ROUTER_IF_STATE_UNREACHABLE,ROUTER_IF_STATE_DISCONNECTED,ROUTER_IF_STATE_CONNECTING,ROUTER_IF_STATE_CONNECTED
48 } ROUTER_CONNECTION_STATE;
49
50#define MPR_INTERFACE_OUT_OF_RESOURCES 0x00000001
51#define MPR_INTERFACE_ADMIN_DISABLED 0x00000002
52#define MPR_INTERFACE_CONNECTION_FAILURE 0x00000004
53#define MPR_INTERFACE_SERVICE_PAUSED 0x00000008
54#define MPR_INTERFACE_DIALOUT_HOURS_RESTRICTION 0x00000010
55#define MPR_INTERFACE_NO_MEDIA_SENSE 0x00000020
56#define MPR_INTERFACE_NO_DEVICE 0x00000040
57
58 typedef struct _MPR_INTERFACE_0 {
59 WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
60 HANDLE hInterface;
61 WINBOOL fEnabled;
62 ROUTER_INTERFACE_TYPE dwIfType;
63 ROUTER_CONNECTION_STATE dwConnectionState;
64 DWORD fUnReachabilityReasons;
65 DWORD dwLastError;
66 } MPR_INTERFACE_0,*PMPR_INTERFACE_0;
67
68 typedef struct _MPR_IPINIP_INTERFACE_0 {
69 WCHAR wszFriendlyName[MAX_INTERFACE_NAME_LEN+1];
70 GUID Guid;
71 } MPR_IPINIP_INTERFACE_0,*PMPR_IPINIP_INTERFACE_0;
72
73 typedef struct _MPR_INTERFACE_1 {
74 WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
75 HANDLE hInterface;
76 WINBOOL fEnabled;
77 ROUTER_INTERFACE_TYPE dwIfType;
78 ROUTER_CONNECTION_STATE dwConnectionState;
79 DWORD fUnReachabilityReasons;
80 DWORD dwLastError;
81 LPWSTR lpwsDialoutHoursRestriction;
82
83 } MPR_INTERFACE_1,*PMPR_INTERFACE_1;
84
85#define MPR_MaxDeviceType RAS_MaxDeviceType
86#define MPR_MaxPhoneNumber RAS_MaxPhoneNumber
87#define MPR_MaxIpAddress RAS_MaxIpAddress
88#define MPR_MaxIpxAddress RAS_MaxIpxAddress
89
90#define MPR_MaxEntryName RAS_MaxEntryName
91#define MPR_MaxDeviceName RAS_MaxDeviceName
92#define MPR_MaxCallbackNumber RAS_MaxCallbackNumber
93
94#define MPR_MaxAreaCode RAS_MaxAreaCode
95#define MPR_MaxPadType RAS_MaxPadType
96#define MPR_MaxX25Address RAS_MaxX25Address
97#define MPR_MaxFacilities RAS_MaxFacilities
98#define MPR_MaxUserData RAS_MaxUserData
99
100#define MPRIO_SpecificIpAddr RASEO_SpecificIpAddr
101#define MPRIO_SpecificNameServers RASEO_SpecificNameServers
102#define MPRIO_IpHeaderCompression RASEO_IpHeaderCompression
103#define MPRIO_RemoteDefaultGateway RASEO_RemoteDefaultGateway
104#define MPRIO_DisableLcpExtensions RASEO_DisableLcpExtensions
105#define MPRIO_SwCompression RASEO_SwCompression
106#define MPRIO_RequireEncryptedPw RASEO_RequireEncryptedPw
107#define MPRIO_RequireMsEncryptedPw RASEO_RequireMsEncryptedPw
108#define MPRIO_RequireDataEncryption RASEO_RequireDataEncryption
109#define MPRIO_NetworkLogon RASEO_NetworkLogon
110#define MPRIO_PromoteAlternates RASEO_PromoteAlternates
111#define MPRIO_SecureLocalFiles RASEO_SecureLocalFiles
112#define MPRIO_RequireEAP RASEO_RequireEAP
113#define MPRIO_RequirePAP RASEO_RequirePAP
114#define MPRIO_RequireSPAP RASEO_RequireSPAP
115#define MPRIO_SharedPhoneNumbers RASEO_SharedPhoneNumbers
116#define MPRIO_RequireCHAP RASEO_RequireCHAP
117#define MPRIO_RequireMsCHAP RASEO_RequireMsCHAP
118#define MPRIO_RequireMsCHAP2 RASEO_RequireMsCHAP2
119#define MPRIO_IpSecPreSharedKey 0x80000000
120
121#define MPRNP_Ipx RASNP_Ipx
122#define MPRNP_Ip RASNP_Ip
123
124#define MPRDT_Modem RASDT_Modem
125#define MPRDT_Isdn RASDT_Isdn
126#define MPRDT_X25 RASDT_X25
127#define MPRDT_Vpn RASDT_Vpn
128#define MPRDT_Pad RASDT_Pad
129#define MPRDT_Generic RASDT_Generic
130#define MPRDT_Serial RASDT_Serial
131#define MPRDT_FrameRelay RASDT_FrameRelay
132#define MPRDT_Atm RASDT_Atm
133#define MPRDT_Sonet RASDT_Sonet
134#define MPRDT_SW56 RASDT_SW56
135#define MPRDT_Irda RASDT_Irda
136#define MPRDT_Parallel RASDT_Parallel
137
138#define MPRET_Phone RASET_Phone
139#define MPRET_Vpn RASET_Vpn
140#define MPRET_Direct RASET_Direct
141
142#define MPRDM_DialFirst 0
143#define MPRDM_DialAll RASEDM_DialAll
144#define MPRDM_DialAsNeeded RASEDM_DialAsNeeded
145
146#define MPRIDS_Disabled RASIDS_Disabled
147#define MPRIDS_UseGlobalValue RASIDS_UseGlobalValue
148
149#define MPR_ET_None ET_None
150#define MPR_ET_Require ET_Require
151#define MPR_ET_RequireMax ET_RequireMax
152#define MPR_ET_Optional ET_Optional
153
154#define MPR_VS_Default VS_Default
155#define MPR_VS_PptpOnly VS_PptpOnly
156#define MPR_VS_PptpFirst VS_PptpFirst
157#define MPR_VS_L2tpOnly VS_L2tpOnly
158#define MPR_VS_L2tpFirst VS_L2tpFirst
159
160 typedef struct _MPR_INTERFACE_2 {
161 WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
162 HANDLE hInterface;
163 WINBOOL fEnabled;
164 ROUTER_INTERFACE_TYPE dwIfType;
165 ROUTER_CONNECTION_STATE dwConnectionState;
166 DWORD fUnReachabilityReasons;
167 DWORD dwLastError;
168 DWORD dwfOptions;
169 WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1 ];
170 PWCHAR szAlternates;
171 DWORD ipaddr;
172 DWORD ipaddrDns;
173 DWORD ipaddrDnsAlt;
174 DWORD ipaddrWins;
175 DWORD ipaddrWinsAlt;
176 DWORD dwfNetProtocols;
177 WCHAR szDeviceType[MPR_MaxDeviceType + 1 ];
178 WCHAR szDeviceName[MPR_MaxDeviceName + 1 ];
179 WCHAR szX25PadType[MPR_MaxPadType + 1 ];
180 WCHAR szX25Address[MPR_MaxX25Address + 1 ];
181 WCHAR szX25Facilities[MPR_MaxFacilities + 1 ];
182 WCHAR szX25UserData[MPR_MaxUserData + 1 ];
183 DWORD dwChannels;
184 DWORD dwSubEntries;
185 DWORD dwDialMode;
186 DWORD dwDialExtraPercent;
187 DWORD dwDialExtraSampleSeconds;
188 DWORD dwHangUpExtraPercent;
189 DWORD dwHangUpExtraSampleSeconds;
190 DWORD dwIdleDisconnectSeconds;
191 DWORD dwType;
192 DWORD dwEncryptionType;
193 DWORD dwCustomAuthKey;
194 DWORD dwCustomAuthDataSize;
195 LPBYTE lpbCustomAuthData;
196 GUID guidId;
197 DWORD dwVpnStrategy;
198 } MPR_INTERFACE_2,*PMPR_INTERFACE_2;
199
200#if (_WIN32_WINNT >= 0x0600)
201 typedef struct _MPR_INTERFACE_3 {
202 WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
203 HANDLE hInterface;
204 WINBOOL fEnabled;
205 ROUTER_INTERFACE_TYPE dwIfType;
206 ROUTER_CONNECTION_STATE dwConnectionState;
207 DWORD fUnReachabilityReasons;
208 DWORD dwLastError;
209 DWORD dwfOptions;
210 WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
211 PWCHAR szAlternates;
212 DWORD ipaddr;
213 DWORD ipaddrDns;
214 DWORD ipaddrDnsAlt;
215 DWORD ipaddrWins;
216 DWORD ipaddrWinsAlt;
217 DWORD dwfNetProtocols;
218 WCHAR szDeviceType[MPR_MaxDeviceType + 1];
219 WCHAR szDeviceName[MPR_MaxDeviceName + 1];
220 WCHAR szX25PadType[MPR_MaxPadType + 1];
221 WCHAR szX25Address[MPR_MaxX25Address + 1];
222 WCHAR szX25Facilities[MPR_MaxFacilities + 1];
223 WCHAR szX25UserData[MPR_MaxUserData + 1];
224 DWORD dwChannels;
225 DWORD dwSubEntries;
226 DWORD dwDialMode;
227 DWORD dwDialExtraPercent;
228 DWORD dwDialExtraSampleSeconds;
229 DWORD dwHangUpExtraPercent;
230 DWORD dwHangUpExtraSampleSeconds;
231 DWORD dwIdleDisconnectSeconds;
232 DWORD dwType;
233 DWORD dwEncryptionType;
234 DWORD dwCustomAuthKey;
235 DWORD dwCustomAuthDataSize;
236 LPBYTE lpbCustomAuthData;
237 GUID guidId;
238 DWORD dwVpnStrategy;
239 ULONG AddressCount;
240 IN6_ADDR ipv6addrDns;
241 IN6_ADDR ipv6addrDnsAlt;
242 IN6_ADDR * ipv6addr;
243 } MPR_INTERFACE_3, *PMPR_INTERFACE_3;
244#endif
245
246 typedef struct _MPR_DEVICE_0 {
247 WCHAR szDeviceType[MPR_MaxDeviceType + 1 ];
248 WCHAR szDeviceName[MPR_MaxDeviceName + 1 ];
249 } MPR_DEVICE_0,*PMPR_DEVICE_0;
250
251 typedef struct _MPR_DEVICE_1 {
252 WCHAR szDeviceType[MPR_MaxDeviceType + 1 ];
253 WCHAR szDeviceName[MPR_MaxDeviceName + 1 ];
254 WCHAR szLocalPhoneNumber[MPR_MaxPhoneNumber + 1 ];
255 PWCHAR szAlternates;
256 } MPR_DEVICE_1,*PMPR_DEVICE_1;
257
258 typedef struct _MPR_CREDENTIALSEX_0 {
259 DWORD dwSize;
260 LPBYTE lpbCredentialsInfo;
261 } MPR_CREDENTIALSEX_0,*PMPR_CREDENTIALSEX_0;
262
263 typedef struct _MPR_CREDENTIALSEX_1 {
264 DWORD dwSize;
265 LPBYTE lpbCredentialsInfo;
266 } MPR_CREDENTIALSEX_1,*PMPR_CREDENTIALSEX_1;
267
268 typedef struct _MPR_TRANSPORT_0 {
269 DWORD dwTransportId;
270 HANDLE hTransport;
271 WCHAR wszTransportName[MAX_TRANSPORT_NAME_LEN+1];
272 } MPR_TRANSPORT_0,*PMPR_TRANSPORT_0;
273
274 typedef struct _MPR_IFTRANSPORT_0
275 {
276 DWORD dwTransportId;
277 HANDLE hIfTransport;
278 WCHAR wszIfTransportName[MAX_TRANSPORT_NAME_LEN+1];
279
280 }
281 MPR_IFTRANSPORT_0,*PMPR_IFTRANSPORT_0;
282
283 typedef struct _MPR_SERVER_0
284 {
285 WINBOOL fLanOnlyMode;
286 DWORD dwUpTime;
287 DWORD dwTotalPorts;
288 DWORD dwPortsInUse;
289
290 }
291 MPR_SERVER_0,*PMPR_SERVER_0;
292
293#define MPR_ENABLE_RAS_ON_DEVICE 0x00000001
294#define MPR_ENABLE_ROUTING_ON_DEVICE 0x00000002
295
296 typedef struct _MPR_SERVER_1 {
297 DWORD dwNumPptpPorts;
298 DWORD dwPptpPortFlags;
299 DWORD dwNumL2tpPorts;
300 DWORD dwL2tpPortFlags;
301 } MPR_SERVER_1,*PMPR_SERVER_1;
302
303 typedef enum _RAS_PORT_CONDITION {
304 RAS_PORT_NON_OPERATIONAL,RAS_PORT_DISCONNECTED,RAS_PORT_CALLING_BACK,RAS_PORT_LISTENING,RAS_PORT_AUTHENTICATING,RAS_PORT_AUTHENTICATED,
305 RAS_PORT_INITIALIZING
306 } RAS_PORT_CONDITION;
307
308 typedef enum _RAS_HARDWARE_CONDITION {
309 RAS_HARDWARE_OPERATIONAL,RAS_HARDWARE_FAILURE
310 } RAS_HARDWARE_CONDITION;
311
312 typedef struct _RAS_PORT_0 {
313 HANDLE hPort;
314 HANDLE hConnection;
315 RAS_PORT_CONDITION dwPortCondition;
316 DWORD dwTotalNumberOfCalls;
317 DWORD dwConnectDuration;
318 WCHAR wszPortName[MAX_PORT_NAME + 1 ];
319 WCHAR wszMediaName[MAX_MEDIA_NAME + 1 ];
320 WCHAR wszDeviceName[MAX_DEVICE_NAME + 1 ];
321 WCHAR wszDeviceType[MAX_DEVICETYPE_NAME + 1 ];
322 } RAS_PORT_0,*PRAS_PORT_0;
323
324 typedef struct _RAS_PORT_1 {
325 HANDLE hPort;
326 HANDLE hConnection;
327 RAS_HARDWARE_CONDITION dwHardwareCondition;
328 DWORD dwLineSpeed;
329 DWORD dwBytesXmited;
330 DWORD dwBytesRcved;
331 DWORD dwFramesXmited;
332 DWORD dwFramesRcved;
333 DWORD dwCrcErr;
334 DWORD dwTimeoutErr;
335 DWORD dwAlignmentErr;
336 DWORD dwHardwareOverrunErr;
337 DWORD dwFramingErr;
338 DWORD dwBufferOverrunErr;
339 DWORD dwCompressionRatioIn;
340 DWORD dwCompressionRatioOut;
341 } RAS_PORT_1,*PRAS_PORT_1;
342
343#define IPADDRESSLEN 15
344#define IPXADDRESSLEN 22
345#define ATADDRESSLEN 32
346#define MAXIPADRESSLEN 64
347
348 typedef struct _PPP_NBFCP_INFO {
349 DWORD dwError;
350 WCHAR wszWksta[NETBIOS_NAME_LEN + 1 ];
351 } PPP_NBFCP_INFO;
352
353 typedef struct _PPP_IPCP_INFO {
354 DWORD dwError;
355 WCHAR wszAddress[IPADDRESSLEN + 1 ];
356 WCHAR wszRemoteAddress[IPADDRESSLEN + 1 ];
357 } PPP_IPCP_INFO;
358
359#define PPP_IPCP_VJ 0x00000001
360
361 typedef struct _PPP_IPCP_INFO2 {
362 DWORD dwError;
363 WCHAR wszAddress[IPADDRESSLEN + 1 ];
364 WCHAR wszRemoteAddress[IPADDRESSLEN + 1 ];
365 DWORD dwOptions;
366 DWORD dwRemoteOptions;
367 } PPP_IPCP_INFO2;
368
369 typedef struct _PPP_IPXCP_INFO {
370 DWORD dwError;
371 WCHAR wszAddress[IPXADDRESSLEN + 1 ];
372 } PPP_IPXCP_INFO;
373
374 typedef struct _PPP_ATCP_INFO {
375 DWORD dwError;
376 WCHAR wszAddress[ATADDRESSLEN + 1 ];
377 } PPP_ATCP_INFO;
378
379 typedef struct _PPP_INFO {
380 PPP_NBFCP_INFO nbf;
381 PPP_IPCP_INFO ip;
382 PPP_IPXCP_INFO ipx;
383 PPP_ATCP_INFO at;
384 } PPP_INFO;
385
386#define RASCCPCA_MPPC 0x00000006
387#define RASCCPCA_STAC 0x00000005
388
389#define PPP_CCP_COMPRESSION 0x00000001
390#define PPP_CCP_ENCRYPTION40BITOLD 0x00000010
391#define PPP_CCP_ENCRYPTION40BIT 0x00000020
392#define PPP_CCP_ENCRYPTION128BIT 0x00000040
393#define PPP_CCP_ENCRYPTION56BIT 0x00000080
394#define PPP_CCP_HISTORYLESS 0x01000000
395
396 typedef struct _PPP_CCP_INFO {
397 DWORD dwError;
398 DWORD dwCompressionAlgorithm;
399 DWORD dwOptions;
400 DWORD dwRemoteCompressionAlgorithm;
401 DWORD dwRemoteOptions;
402 } PPP_CCP_INFO;
403
404#define PPP_LCP_PAP 0xC023
405#define PPP_LCP_SPAP 0xC027
406#define PPP_LCP_CHAP 0xC223
407#define PPP_LCP_EAP 0xC227
408
409#define PPP_LCP_CHAP_MD5 0x05
410#define PPP_LCP_CHAP_MS 0x80
411#define PPP_LCP_CHAP_MSV2 0x81
412
413#define PPP_LCP_MULTILINK_FRAMING 0x00000001
414#define PPP_LCP_PFC 0x00000002
415#define PPP_LCP_ACFC 0x00000004
416#define PPP_LCP_SSHF 0x00000008
417#define PPP_LCP_DES_56 0x00000010
418#define PPP_LCP_3_DES 0x00000020
419
420 typedef struct _PPP_LCP_INFO {
421 DWORD dwError;
422 DWORD dwAuthenticationProtocol;
423 DWORD dwAuthenticationData;
424 DWORD dwRemoteAuthenticationProtocol;
425 DWORD dwRemoteAuthenticationData;
426 DWORD dwTerminateReason;
427 DWORD dwRemoteTerminateReason;
428 DWORD dwOptions;
429 DWORD dwRemoteOptions;
430 DWORD dwEapTypeId;
431 DWORD dwRemoteEapTypeId;
432 } PPP_LCP_INFO;
433
434 typedef struct _PPP_INFO_2 {
435 PPP_NBFCP_INFO nbf;
436 PPP_IPCP_INFO2 ip;
437 PPP_IPXCP_INFO ipx;
438 PPP_ATCP_INFO at;
439 PPP_CCP_INFO ccp;
440 PPP_LCP_INFO lcp;
441 } PPP_INFO_2;
442
443#define RAS_FLAGS_PPP_CONNECTION 0x00000001
444#define RAS_FLAGS_MESSENGER_PRESENT 0x00000002
445#define RAS_FLAGS_QUARANTINE_PRESENT 0x00000008
446
447 typedef struct _RAS_CONNECTION_0 {
448 HANDLE hConnection;
449 HANDLE hInterface;
450 DWORD dwConnectDuration;
451 ROUTER_INTERFACE_TYPE dwInterfaceType;
452 DWORD dwConnectionFlags;
453 WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN + 1 ];
454 WCHAR wszUserName[UNLEN + 1 ];
455 WCHAR wszLogonDomain[DNLEN + 1 ];
456 WCHAR wszRemoteComputer[NETBIOS_NAME_LEN + 1 ];
457 } RAS_CONNECTION_0,*PRAS_CONNECTION_0;
458
459 typedef struct _RAS_CONNECTION_1 {
460 HANDLE hConnection;
461 HANDLE hInterface;
462 PPP_INFO PppInfo;
463 DWORD dwBytesXmited;
464 DWORD dwBytesRcved;
465 DWORD dwFramesXmited;
466 DWORD dwFramesRcved;
467 DWORD dwCrcErr;
468 DWORD dwTimeoutErr;
469 DWORD dwAlignmentErr;
470 DWORD dwHardwareOverrunErr;
471 DWORD dwFramingErr;
472 DWORD dwBufferOverrunErr;
473 DWORD dwCompressionRatioIn;
474 DWORD dwCompressionRatioOut;
475 } RAS_CONNECTION_1,*PRAS_CONNECTION_1;
476
477 typedef struct _RAS_CONNECTION_2 {
478 HANDLE hConnection;
479 WCHAR wszUserName[UNLEN + 1 ];
480 ROUTER_INTERFACE_TYPE dwInterfaceType;
481 GUID guid;
482 PPP_INFO_2 PppInfo2;
483 } RAS_CONNECTION_2,*PRAS_CONNECTION_2;
484
485#define RASPRIV_NoCallback 0x01
486#define RASPRIV_AdminSetCallback 0x02
487#define RASPRIV_CallerSetCallback 0x04
488#define RASPRIV_DialinPrivilege 0x08
489
490#define RASPRIV2_DialinPolicy 0x1
491
492#define RASPRIV_CallbackType (RASPRIV_AdminSetCallback | RASPRIV_CallerSetCallback | RASPRIV_NoCallback)
493
494 typedef struct _RAS_USER_0 {
495 BYTE bfPrivilege;
496 WCHAR wszPhoneNumber[MAX_PHONE_NUMBER_LEN + 1];
497 } RAS_USER_0,*PRAS_USER_0;
498
499 typedef struct _RAS_USER_1 {
500 BYTE bfPrivilege;
501 WCHAR wszPhoneNumber[MAX_PHONE_NUMBER_LEN + 1];
502 BYTE bfPrivilege2;
503 } RAS_USER_1,*PRAS_USER_1;
504
505 typedef HANDLE RAS_SERVER_HANDLE;
506 typedef HANDLE MPR_SERVER_HANDLE;
507 typedef HANDLE MIB_SERVER_HANDLE;
508
509 DWORD WINAPI MprAdminConnectionEnum(RAS_SERVER_HANDLE hRasServer,DWORD dwLevel,LPBYTE *lplpbBuffer,DWORD dwPrefMaxLen,LPDWORD lpdwEntriesRead,LPDWORD lpdwTotalEntries,LPDWORD lpdwResumeHandle);
510 DWORD WINAPI MprAdminPortEnum(RAS_SERVER_HANDLE hRasServer,DWORD dwLevel,HANDLE hConnection,LPBYTE *lplpbBuffer,DWORD dwPrefMaxLen,LPDWORD lpdwEntriesRead,LPDWORD lpdwTotalEntries,LPDWORD lpdwResumeHandle);
511 DWORD WINAPI MprAdminConnectionGetInfo(RAS_SERVER_HANDLE hRasServer,DWORD dwLevel,HANDLE hConnection,LPBYTE *lplpbBuffer);
512 DWORD WINAPI MprAdminPortGetInfo(RAS_SERVER_HANDLE hRasServer,DWORD dwLevel,HANDLE hPort,LPBYTE *lplpbBuffer);
513 DWORD WINAPI MprAdminConnectionClearStats(RAS_SERVER_HANDLE hRasServer,HANDLE hConnection);
514 DWORD WINAPI MprAdminPortClearStats(RAS_SERVER_HANDLE hRasServer,HANDLE hPort);
515 DWORD WINAPI MprAdminPortReset(RAS_SERVER_HANDLE hRasServer,HANDLE hPort);
516 DWORD WINAPI MprAdminPortDisconnect(RAS_SERVER_HANDLE hRasServer,HANDLE hPort);
517 WINBOOL WINAPI MprAdminAcceptNewConnection(RAS_CONNECTION_0 *pRasConnection0,RAS_CONNECTION_1 *pRasConnection1);
518 WINBOOL WINAPI MprAdminAcceptNewConnection2(RAS_CONNECTION_0 *pRasConnection0,RAS_CONNECTION_1 *pRasConnection1,RAS_CONNECTION_2 *pRasConnection2);
519 WINBOOL WINAPI MprAdminAcceptNewLink (RAS_PORT_0 *pRasPort0,RAS_PORT_1 *pRasPort1);
520 VOID WINAPI MprAdminConnectionHangupNotification(RAS_CONNECTION_0 *pRasConnection0,RAS_CONNECTION_1 *pRasConnection1);
521 VOID WINAPI MprAdminConnectionHangupNotification2(RAS_CONNECTION_0 *pRasConnection0,RAS_CONNECTION_1 *pRasConnection1,RAS_CONNECTION_2 *pRasConnection2);
522 DWORD WINAPI MprAdminConnectionRemoveQuarantine(HANDLE hRasServer,HANDLE hRasConnection,WINBOOL fIsIpAddress);
523 VOID WINAPI MprAdminLinkHangupNotification (RAS_PORT_0 *pRasPort0,RAS_PORT_1 *pRasPort1);
524 DWORD WINAPI MprAdminGetIpAddressForUser (WCHAR *lpwszUserName,WCHAR *lpwszPortName,DWORD *lpdwIpAddress,WINBOOL *bNotifyRelease);
525 VOID WINAPI MprAdminReleaseIpAddress (WCHAR *lpszUserName,WCHAR *lpszPortName,DWORD *lpdwIpAddress);
526 DWORD WINAPI MprAdminInitializeDll(VOID);
527 DWORD WINAPI MprAdminTerminateDll(VOID);
528 DWORD WINAPI MprAdminUserGetInfo(const WCHAR *lpszServer,const WCHAR *lpszUser,DWORD dwLevel,LPBYTE lpbBuffer);
529 DWORD WINAPI MprAdminUserSetInfo(const WCHAR *lpszServer,const WCHAR *lpszUser,DWORD dwLevel,const LPBYTE lpbBuffer);
530 DWORD WINAPI MprAdminSendUserMessage(MPR_SERVER_HANDLE hMprServer,HANDLE hConnection,LPWSTR lpwszMessage);
531 DWORD WINAPI MprAdminGetPDCServer(const WCHAR *lpszDomain,const WCHAR *lpszServer,LPWSTR lpszPDCServer);
532 WINBOOL WINAPI MprAdminIsServiceRunning(LPWSTR lpwsServerName);
533 DWORD WINAPI MprAdminServerConnect(LPWSTR lpwsServerName,MPR_SERVER_HANDLE *phMprServer);
534 VOID WINAPI MprAdminServerDisconnect(MPR_SERVER_HANDLE hMprServer);
535 DWORD WINAPI MprAdminServerGetCredentials(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE *lplpbBuffer);
536 DWORD WINAPI MprAdminServerSetCredentials(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE lpbBuffer);
537 DWORD WINAPI MprAdminBufferFree(LPVOID pBuffer);
538 DWORD WINAPI MprAdminGetErrorString(DWORD dwError,LPWSTR *lpwsErrorString);
539 DWORD WINAPI MprAdminServerGetInfo(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE *lplpbBuffer);
540 DWORD WINAPI MprAdminServerSetInfo(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE lpbBuffer);
541 DWORD WINAPI MprAdminEstablishDomainRasServer (PWCHAR pszDomain,PWCHAR pszMachine,WINBOOL bEnable);
542 DWORD WINAPI MprAdminIsDomainRasServer (PWCHAR pszDomain,PWCHAR pszMachine,PBOOL pbIsRasServer);
543 DWORD WINAPI MprAdminTransportCreate(MPR_SERVER_HANDLE hMprServer,DWORD dwTransportId,LPWSTR lpwsTransportName,LPBYTE pGlobalInfo,DWORD dwGlobalInfoSize,LPBYTE pClientInterfaceInfo,DWORD dwClientInterfaceInfoSize,LPWSTR lpwsDLLPath);
544 DWORD WINAPI MprAdminTransportSetInfo(MPR_SERVER_HANDLE hMprServer,DWORD dwTransportId,LPBYTE pGlobalInfo,DWORD dwGlobalInfoSize,LPBYTE pClientInterfaceInfo,DWORD dwClientInterfaceInfoSize);
545 DWORD WINAPI MprAdminTransportGetInfo(MPR_SERVER_HANDLE hMprServer,DWORD dwTransportId,LPBYTE *ppGlobalInfo,LPDWORD lpdwGlobalInfoSize,LPBYTE *ppClientInterfaceInfo,LPDWORD lpdwClientInterfaceInfoSize);
546 DWORD WINAPI MprAdminDeviceEnum(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE *lplpbBuffer,LPDWORD lpdwTotalEntries);
547 DWORD WINAPI MprAdminInterfaceGetHandle(MPR_SERVER_HANDLE hMprServer,LPWSTR lpwsInterfaceName,HANDLE *phInterface,WINBOOL fIncludeClientInterfaces);
548 DWORD WINAPI MprAdminInterfaceCreate(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE lpbBuffer,HANDLE *phInterface);
549 DWORD WINAPI MprAdminInterfaceGetInfo(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwLevel,LPBYTE *lplpbBuffer);
550 DWORD WINAPI MprAdminInterfaceSetInfo(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwLevel,LPBYTE lpbBuffer);
551 DWORD WINAPI MprAdminInterfaceDelete(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface);
552 DWORD WINAPI MprAdminInterfaceDeviceGetInfo(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwIndex,DWORD dwLevel,LPBYTE *lplpBuffer);
553 DWORD WINAPI MprAdminInterfaceDeviceSetInfo(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwIndex,DWORD dwLevel,LPBYTE lplpBuffer);
554 DWORD WINAPI MprAdminInterfaceTransportRemove(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwTransportId);
555 DWORD WINAPI MprAdminInterfaceTransportAdd(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwTransportId,LPBYTE pInterfaceInfo,DWORD dwInterfaceInfoSize);
556 DWORD WINAPI MprAdminInterfaceTransportGetInfo(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwTransportId,LPBYTE *ppInterfaceInfo,LPDWORD lpdwpInterfaceInfoSize);
557 DWORD WINAPI MprAdminInterfaceTransportSetInfo(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwTransportId,LPBYTE pInterfaceInfo,DWORD dwInterfaceInfoSize);
558 DWORD WINAPI MprAdminInterfaceEnum(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE *lplpbBuffer,DWORD dwPrefMaxLen,LPDWORD lpdwEntriesRead,LPDWORD lpdwTotalEntries,LPDWORD lpdwResumeHandle);
559 DWORD WINAPI MprSetupIpInIpInterfaceFriendlyNameEnum(PWCHAR pwszMachineName,LPBYTE *lplpBuffer,LPDWORD lpdwEntriesRead);
560 DWORD WINAPI MprSetupIpInIpInterfaceFriendlyNameFree(LPVOID lpBuffer);
561 DWORD WINAPI MprSetupIpInIpInterfaceFriendlyNameCreate(PWCHAR pwszMachineName,PMPR_IPINIP_INTERFACE_0 pNameInformation);
562 DWORD WINAPI MprSetupIpInIpInterfaceFriendlyNameDelete(PWCHAR pwszMachineName,GUID *pGuid);
563 DWORD WINAPI MprAdminInterfaceSetCredentials(LPWSTR lpwsServer,LPWSTR lpwsInterfaceName,LPWSTR lpwsUserName,LPWSTR lpwsDomainName,LPWSTR lpwsPassword);
564 DWORD WINAPI MprAdminInterfaceGetCredentials(LPWSTR lpwsServer,LPWSTR lpwsInterfaceName,LPWSTR lpwsUserName,LPWSTR lpwsPassword,LPWSTR lpwsDomainName);
565 DWORD WINAPI MprAdminInterfaceSetCredentialsEx(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwLevel,LPBYTE lpbBuffer);
566 DWORD WINAPI MprAdminInterfaceGetCredentialsEx(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwLevel,LPBYTE *lplpbBuffer);
567 DWORD WINAPI MprAdminInterfaceConnect(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,HANDLE hEvent,WINBOOL fSynchronous);
568 DWORD WINAPI MprAdminInterfaceDisconnect(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface);
569 DWORD WINAPI MprAdminInterfaceUpdateRoutes(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwProtocolId,HANDLE hEvent);
570 DWORD WINAPI MprAdminInterfaceQueryUpdateResult(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface,DWORD dwProtocolId,LPDWORD lpdwUpdateResult);
571 DWORD WINAPI MprAdminInterfaceUpdatePhonebookInfo(MPR_SERVER_HANDLE hMprServer,HANDLE hInterface);
572 DWORD WINAPI MprAdminRegisterConnectionNotification(MPR_SERVER_HANDLE hMprServer,HANDLE hEventNotification);
573 DWORD WINAPI MprAdminDeregisterConnectionNotification(MPR_SERVER_HANDLE hMprServer,HANDLE hEventNotification);
574 DWORD WINAPI MprAdminMIBServerConnect(LPWSTR lpwsServerName,MIB_SERVER_HANDLE *phMibServer);
575 VOID WINAPI MprAdminMIBServerDisconnect(MIB_SERVER_HANDLE hMibServer);
576 DWORD WINAPI MprAdminMIBEntryCreate(MIB_SERVER_HANDLE hMibServer,DWORD dwPid,DWORD dwRoutingPid,LPVOID lpEntry,DWORD dwEntrySize);
577 DWORD WINAPI MprAdminMIBEntryDelete(MIB_SERVER_HANDLE hMibServer,DWORD dwProtocolId,DWORD dwRoutingPid,LPVOID lpEntry,DWORD dwEntrySize);
578 DWORD WINAPI MprAdminMIBEntrySet(MIB_SERVER_HANDLE hMibServer,DWORD dwProtocolId,DWORD dwRoutingPid,LPVOID lpEntry,DWORD dwEntrySize);
579 DWORD WINAPI MprAdminMIBEntryGet(MIB_SERVER_HANDLE hMibServer,DWORD dwProtocolId,DWORD dwRoutingPid,LPVOID lpInEntry,DWORD dwInEntrySize,LPVOID *lplpOutEntry,LPDWORD lpOutEntrySize);
580 DWORD WINAPI MprAdminMIBEntryGetFirst(MIB_SERVER_HANDLE hMibServer,DWORD dwProtocolId,DWORD dwRoutingPid,LPVOID lpInEntry,DWORD dwInEntrySize,LPVOID *lplpOutEntry,LPDWORD lpOutEntrySize);
581 DWORD WINAPI MprAdminMIBEntryGetNext(MIB_SERVER_HANDLE hMibServer,DWORD dwProtocolId,DWORD dwRoutingPid,LPVOID lpInEntry,DWORD dwInEntrySize,LPVOID *lplpOutEntry,LPDWORD lpOutEntrySize);
582 DWORD WINAPI MprAdminMIBGetTrapInfo(MIB_SERVER_HANDLE hMibServer,DWORD dwProtocolId,DWORD dwRoutingPid,LPVOID lpInData,DWORD dwInDataSize,LPVOID *lplpOutData,LPDWORD lpOutDataSize);
583 DWORD WINAPI MprAdminMIBSetTrapInfo(DWORD dwProtocolId,DWORD dwRoutingPid,HANDLE hEvent,LPVOID lpInData,DWORD dwInDataSize,LPVOID *lplpOutData,LPDWORD lpOutDataSize);
584 DWORD WINAPI MprAdminMIBBufferFree(LPVOID pBuffer);
585 DWORD WINAPI MprConfigServerInstall(DWORD dwLevel,PVOID pBuffer);
586 DWORD WINAPI MprConfigServerConnect(LPWSTR lpwsServerName,HANDLE *phMprConfig);
587 VOID WINAPI MprConfigServerDisconnect(HANDLE hMprConfig);
588 DWORD WINAPI MprConfigServerRefresh(HANDLE hMprConfig);
589 DWORD WINAPI MprConfigBufferFree(LPVOID pBuffer);
590 DWORD WINAPI MprConfigServerGetInfo(HANDLE hMprConfig,DWORD dwLevel,LPBYTE *lplpbBuffer);
591 DWORD WINAPI MprConfigServerSetInfo(MPR_SERVER_HANDLE hMprServer,DWORD dwLevel,LPBYTE lpbBuffer);
592 DWORD WINAPI MprConfigServerBackup(HANDLE hMprConfig,LPWSTR lpwsPath);
593 DWORD WINAPI MprConfigServerRestore(HANDLE hMprConfig,LPWSTR lpwsPath);
594 DWORD WINAPI MprConfigTransportCreate(HANDLE hMprConfig,DWORD dwTransportId,LPWSTR lpwsTransportName,LPBYTE pGlobalInfo,DWORD dwGlobalInfoSize,LPBYTE pClientInterfaceInfo,DWORD dwClientInterfaceInfoSize,LPWSTR lpwsDLLPath,HANDLE *phRouterTransport);
595 DWORD WINAPI MprConfigTransportDelete(HANDLE hMprConfig,HANDLE hRouterTransport);
596 DWORD WINAPI MprConfigTransportGetHandle(HANDLE hMprConfig,DWORD dwTransportId,HANDLE *phRouterTransport);
597 DWORD WINAPI MprConfigTransportSetInfo(HANDLE hMprConfig,HANDLE hRouterTransport,LPBYTE pGlobalInfo,DWORD dwGlobalInfoSize,LPBYTE pClientInterfaceInfo,DWORD dwClientInterfaceInfoSize,LPWSTR lpwsDLLPath);
598 DWORD WINAPI MprConfigTransportGetInfo(HANDLE hMprConfig,HANDLE hRouterTransport,LPBYTE *ppGlobalInfo,LPDWORD lpdwGlobalInfoSize,LPBYTE *ppClientInterfaceInfo,LPDWORD lpdwClientInterfaceInfoSize,LPWSTR *lplpwsDLLPath);
599 DWORD WINAPI MprConfigTransportEnum(HANDLE hMprConfig,DWORD dwLevel,LPBYTE *lplpBuffer,DWORD dwPrefMaxLen,LPDWORD lpdwEntriesRead,LPDWORD lpdwTotalEntries,LPDWORD lpdwResumeHandle);
600 DWORD WINAPI MprConfigInterfaceCreate(HANDLE hMprConfig,DWORD dwLevel,LPBYTE lpbBuffer,HANDLE *phRouterInterface);
601 DWORD WINAPI MprConfigInterfaceDelete(HANDLE hMprConfig,HANDLE hRouterInterface);
602 DWORD WINAPI MprConfigInterfaceGetHandle(HANDLE hMprConfig,LPWSTR lpwsInterfaceName,HANDLE *phRouterInterface);
603 DWORD WINAPI MprConfigInterfaceGetInfo(HANDLE hMprConfig,HANDLE hRouterInterface,DWORD dwLevel,LPBYTE *lplpBuffer,LPDWORD lpdwBufferSize);
604 DWORD WINAPI MprConfigInterfaceSetInfo(HANDLE hMprConfig,HANDLE hRouterInterface,DWORD dwLevel,LPBYTE lpbBuffer);
605 DWORD WINAPI MprConfigInterfaceEnum(HANDLE hMprConfig,DWORD dwLevel,LPBYTE *lplpBuffer,DWORD dwPrefMaxLen,LPDWORD lpdwEntriesRead,LPDWORD lpdwTotalEntries,LPDWORD lpdwResumeHandle);
606 DWORD WINAPI MprConfigInterfaceTransportAdd(HANDLE hMprConfig,HANDLE hRouterInterface,DWORD dwTransportId,LPWSTR lpwsTransportName,LPBYTE pInterfaceInfo,DWORD dwInterfaceInfoSize,HANDLE *phRouterIfTransport);
607 DWORD WINAPI MprConfigInterfaceTransportRemove(HANDLE hMprConfig,HANDLE hRouterInterface,HANDLE hRouterIfTransport);
608 DWORD WINAPI MprConfigInterfaceTransportGetHandle(HANDLE hMprConfig,HANDLE hRouterInterface,DWORD dwTransportId,HANDLE *phRouterIfTransport);
609 DWORD WINAPI MprConfigInterfaceTransportGetInfo(HANDLE hMprConfig,HANDLE hRouterInterface,HANDLE hRouterIfTransport,LPBYTE *ppInterfaceInfo,LPDWORD lpdwInterfaceInfoSize);
610 DWORD WINAPI MprConfigInterfaceTransportSetInfo(HANDLE hMprConfig,HANDLE hRouterInterface,HANDLE hRouterIfTransport,LPBYTE pInterfaceInfo,DWORD dwInterfaceInfoSize);
611 DWORD WINAPI MprConfigInterfaceTransportEnum(HANDLE hMprConfig,HANDLE hRouterInterface,DWORD dwLevel,LPBYTE *lplpBuffer,DWORD dwPrefMaxLen,LPDWORD lpdwEntriesRead,LPDWORD lpdwTotalEntries,LPDWORD lpdwResumeHandle);
612 DWORD WINAPI MprConfigGetFriendlyName(HANDLE hMprConfig,PWCHAR pszGuidName,PWCHAR pszBuffer,DWORD dwBufferSize);
613 DWORD WINAPI MprConfigGetGuidName(HANDLE hMprConfig,PWCHAR pszFriendlyName,PWCHAR pszBuffer,DWORD dwBufferSize);
614 DWORD WINAPI MprInfoCreate(DWORD dwVersion,LPVOID *lplpNewHeader);
615 DWORD WINAPI MprInfoDelete(LPVOID lpHeader);
616 DWORD WINAPI MprInfoRemoveAll(LPVOID lpHeader,LPVOID *lplpNewHeader);
617 DWORD WINAPI MprInfoDuplicate(LPVOID lpHeader,LPVOID *lplpNewHeader);
618 DWORD WINAPI MprInfoBlockAdd(LPVOID lpHeader,DWORD dwInfoType,DWORD dwItemSize,DWORD dwItemCount,LPBYTE lpItemData,LPVOID *lplpNewHeader);
619 DWORD WINAPI MprInfoBlockRemove(LPVOID lpHeader,DWORD dwInfoType,LPVOID *lplpNewHeader);
620 DWORD WINAPI MprInfoBlockSet(LPVOID lpHeader,DWORD dwInfoType,DWORD dwItemSize,DWORD dwItemCount,LPBYTE lpItemData,LPVOID *lplpNewHeader);
621 DWORD WINAPI MprInfoBlockFind(LPVOID lpHeader,DWORD dwInfoType,LPDWORD lpdwItemSize,LPDWORD lpdwItemCount,LPBYTE *lplpItemData);
622 DWORD WINAPI MprInfoBlockQuerySize(LPVOID lpHeader);
623
624#define MprInfoBlockExists(h,t) (MprInfoBlockFind((h),(t),NULL,NULL,NULL)==NO_ERROR)
625
626#if (_WIN32_WINNT >= 0x0600)
627typedef enum _RAS_QUARANTINE_STATE {
628 RAS_QUAR_STATE_NORMAL,
629 RAS_QUAR_STATE_QUARANTINE,
630 RAS_QUAR_STATE_PROBATION,
631 RAS_QUAR_STATE_NOT_CAPABLE
632} RAS_QUARANTINE_STATE;
633
634typedef struct _MPR_FILTER_0 {
635 WINBOOL fEnabled;
636} MPR_FILTER_0, *PMPR_FILTER_0;
637
638typedef struct _MPR_SERVER_2 {
639 DWORD dwNumPptpPorts;
640 DWORD dwPptpPortFlags;
641 DWORD dwNumL2tpPorts;
642 DWORD dwL2tpPortFlags;
643 DWORD dwNumSstpPorts;
644 DWORD dwSstpPortFlags;
645} MPR_SERVER_2, *PMPR_SERVER_2;
646
647typedef struct _PPP_IPV6CP_INFO {
648 DWORD dwVersion;
649 DWORD dwSize;
650 DWORD dwError;
651 BYTE bInterfaceIdentifier[8];
652 BYTE bRemoteInterfaceIdentifier[8];
653 DWORD dwOptions;
654 DWORD dwRemoteOptions;
655 BYTE bPrefix[8];
656 DWORD dwPrefixLength;
657} PPP_IPV6_CP_INFO, *PPPP_IPV6_CP_INFO;
658
659typedef struct _PPP_INFO_3 {
660 PPP_NBFCP_INFO nbf;
661 PPP_IPCP_INFO2 ip;
662 PPP_IPV6_CP_INFO ipv6;
663 PPP_CCP_INFO ccp;
664 PPP_LCP_INFO lcp;
665} PPP_INFO_3;
666
667typedef struct _RAS_CONNECTION_3 {
668 DWORD dwVersion;
669 DWORD dwSize;
670 HANDLE hConnection;
671 WCHAR wszUserName[UNLEN + 1];
672 ROUTER_INTERFACE_TYPE dwInterfaceType;
673 GUID guid;
674 PPP_INFO_3 PppInfo3;
675 RAS_QUARANTINE_STATE rasQuarState;
676 FILETIME timer;
677} RAS_CONNECTION_3, *PRAS_CONNECTION_3;
678
679WINBOOL CALLBACK MprAdminAcceptNewConnection3(
680 RAS_CONNECTION_0 *pRasConnection0,
681 RAS_CONNECTION_1 *pRasConnection1,
682 RAS_CONNECTION_2 *pRasConnection2,
683 RAS_CONNECTION_3 *pRasConnection3
684);
685
686WINBOOL CALLBACK MprAdminAcceptReauthentication(
687 RAS_CONNECTION_0 *pRasConnection0,
688 RAS_CONNECTION_1 *pRasConnection1,
689 RAS_CONNECTION_2 *pRasConnection2,
690 RAS_CONNECTION_3 *pRasConnection3
691);
692
693void CALLBACK MprAdminConnectionHangupNotification3(
694 RAS_CONNECTION_0 *pRasConnection0,
695 RAS_CONNECTION_1 *pRasConnection1,
696 RAS_CONNECTION_2 *pRasConnection2,
697 RAS_CONNECTION_3 *pRasConnection3
698);
699
700DWORD CALLBACK MprAdminGetIpv6AddressForUser(
701 WCHAR *lpwszUserName,
702 WCHAR *lpwszPortName,
703 IN6_ADDR *lpdwIpv6Address,
704 WINBOOL *bNotifyRelease
705);
706
707DWORD CALLBACK MprAdminReleaseIpv6AddressForUser(
708 WCHAR *lpwszUserName,
709 WCHAR *lpwszPortName,
710 IN6_ADDR *lpdwIpv6Address
711);
712
713DWORD WINAPI MprConfigFilterGetInfo(
714 HANDLE hMprConfig,
715 DWORD dwLevel,
716 DWORD dwTransportId,
717 LPBYTE lpBuffer
718);
719
720DWORD WINAPI MprConfigFilterSetInfo(
721 HANDLE hMprConfig,
722 DWORD dwLevel,
723 DWORD dwTransportId,
724 LPBYTE lpBuffer
725);
726
727#endif /*(_WIN32_WINNT >= 0x0600)*/
728
729#if (_WIN32_WINNT >= 0x0601)
730#define MPRAPI_RAS_CONNECTION_OBJECT_REVISION_1 0x01
731#define MPRAPI_MPR_SERVER_OBJECT_REVISION_1 0x01
732#define MPRAPI_MPR_SERVER_SET_CONFIG_OBJECT_REVISION_1 0x01
733
734typedef enum {
735 MPRAPI_OBJECT_TYPE_RAS_CONNECTION_OBJECT = 0x1,
736 MPRAPI_OBJECT_TYPE_MPR_SERVER_OBJECT = 0x2,
737 MPRAPI_OBJECT_TYPE_MPR_SERVER_SET_CONFIG_OBJECT = 0x3,
738 MPRAPI_OBJECT_TYPE_AUTH_VALIDATION_OBJECT = 0x4,
739 MPRAPI_OBJECT_TYPE_UPDATE_CONNECTION_OBJECT = 0x5
740} MPRAPI_OBJECT_TYPE;
741
742typedef struct _MPRAPI_OBJECT_HEADER {
743 UCHAR revision;
744 UCHAR type;
745 USHORT size;
746} MPRAPI_OBJECT_HEADER, *PMPRAPI_OBJECT_HEADER;
747
748typedef struct _AUTH_VALIDATION_EX {
749 MPRAPI_OBJECT_HEADER Header;
750 HANDLE hRasConnection;
751 WCHAR wszUserName[UNLEN + 1 ];
752 WCHAR wszLogonDomain[DNLEN + 1 ];
753 DWORD AuthInfoSize;
754 BYTE AuthInfo[1];
755} AUTH_VALIDATION_EX, *PAUTH_VALIDATION_EX;
756
757#define RAS_FLAGS_PPP_CONNECTION 0x00000001
758#define RAS_FLAGS_MESSENGER_PRESENT 0x00000002
759#define RAS_FLAGS_QUARANTINE_PRESENT 0x00000008
760#define RAS_FLAGS_ARAP_CONNECTION 0x00000010
761#define RAS_FLAGS_IKEV2_CONNECTION 0x00000010
762#define RAS_FLAGS_DORMANT 0x00000020
763
764#define IPADDRESSLEN 15
765
766typedef struct _PPP_PROJECTION_INFO {
767 DWORD dwIPv4NegotiationError;
768 WCHAR wszAddress[IPADDRESSLEN + 1];
769 WCHAR wszRemoteAddress[IPADDRESSLEN + 1];
770 DWORD dwIPv4Options;
771 DWORD dwIPv4RemoteOptions;
772 ULONG64 IPv4SubInterfaceIndex;
773 DWORD dwIPv6NegotiationError;
774 BYTE bInterfaceIdentifier[8];
775 BYTE bRemoteInterfaceIdentifier[8];
776 BYTE bPrefix[8];
777 DWORD dwPrefixLength;
778 ULONG64 IPv6SubInterfaceIndex;
779 DWORD dwLcpError;
780 DWORD dwAuthenticationProtocol;
781 DWORD dwAuthenticationData;
782 DWORD dwRemoteAuthenticationProtocol;
783 DWORD dwRemoteAuthenticationData;
784 DWORD dwLcpTerminateReason;
785 DWORD dwLcpRemoteTerminateReason;
786 DWORD dwLcpOptions;
787 DWORD dwLcpRemoteOptions;
788 DWORD dwEapTypeId;
789 DWORD dwRemoteEapTypeId;
790 DWORD dwCcpError;
791 DWORD dwCompressionAlgorithm;
792 DWORD dwCcpOptions;
793 DWORD dwRemoteCompressionAlgorithm;
794 DWORD dwCcpRemoteOptions;
795} PPP_PROJECTION_INFO, *PPPP_PROJECTION_INFO;
796
797typedef struct _IKEV2_PROJECTION_INFO {
798 DWORD dwIPv4NegotiationError;
799 WCHAR wszAddress[IPADDRESSLEN + 1];
800 WCHAR wszRemoteAddress[IPADDRESSLEN + 1];
801 ULONG64 IPv4SubInterfaceIndex;
802 DWORD dwIPv6NegotiationError;
803 BYTE bInterfaceIdentifier[8];
804 BYTE bRemoteInterfaceIdentifier[8];
805 BYTE bPrefix[8];
806 DWORD dwPrefixLength;
807 ULONG64 IPv6SubInterfaceIndex;
808 DWORD dwOptions;
809 DWORD dwAuthenticationProtocol;
810 DWORD dwEapTypeId;
811 DWORD dwCompressionAlgorithm;
812 DWORD dwEncryptionMethod;
813} IKEV2_PROJECTION_INFO, *PIKEV2_PROJECTION_INFO;
814
815typedef struct _PROJECTION_INFO {
816 UCHAR projectionInfoType;
817 __C89_NAMELESS union {
818 IKEV2_PROJECTION_INFO Ikev2ProjectionInfo;
819 PPP_PROJECTION_INFO PppProjectionInfo;
820 } DUMMYUNIONNAME;
821} PROJECTION_INFO, *PPROJECTION_INFO;
822
823typedef struct _RAS_CONNECTION_EX {
824 MPRAPI_OBJECT_HEADER Header;
825 DWORD dwConnectDuration;
826 ROUTER_INTERFACE_TYPE dwInterfaceType;
827 DWORD dwConnectionFlags;
828 WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN + 1];
829 WCHAR wszUserName[UNLEN + 1];
830 WCHAR wszLogonDomain[DNLEN + 1];
831 WCHAR wszRemoteComputer[NETBIOS_NAME_LEN + 1];
832 GUID guid;
833 RAS_QUARANTINE_STATE rasQuarState;
834 FILETIME probationTime;
835 DWORD dwBytesXmited;
836 DWORD dwBytesRcved;
837 DWORD dwFramesXmited;
838 DWORD dwFramesRcved;
839 DWORD dwCrcErr;
840 DWORD dwTimeoutErr;
841 DWORD dwAlignmentErr;
842 DWORD dwHardwareOverrunErr;
843 DWORD dwFramingErr;
844 DWORD dwBufferOverrunErr;
845 DWORD dwCompressionRatioIn;
846 DWORD dwCompressionRatioOut;
847 DWORD dwNumSwitchOvers;
848 WCHAR wszRemoteEndpointAddress[MAXIPADRESSLEN+1];
849 WCHAR wszLocalEndpointAddress[MAXIPADRESSLEN+1];
850 PROJECTION_INFO ProjectionInfo;
851 HANDLE hConnection;
852 HANDLE hInterface;
853} RAS_CONNECTION_EX, *PRAS_CONNECTION_EX;
854
855typedef struct _RAS_UPDATE_CONNECTION {
856 MPRAPI_OBJECT_HEADER Header;
857 DWORD dwIfIndex;
858 WCHAR wszLocalEndpointAddress[MAXIPADRESSLEN+1];
859 WCHAR wszRemoteEndpointAddress[MAXIPADRESSLEN+1];
860} RAS_UPDATE_CONNECTION, *PRAS_UPDATE_CONNECTION;
861
862#define MPRAPI_IKEV2_SET_TUNNEL_CONFIG_PARAMS 0x01
863
864typedef struct _IKEV2_TUNNEL_CONFIG_PARAMS {
865 DWORD dwIdleTimeout;
866 DWORD dwNetworkBlackoutTime;
867 DWORD dwSaLifeTime;
868 DWORD dwSaDataSizeForRenegotiation;
869 DWORD dwConfigOptions;
870 DWORD dwTotalCertificates;
871 CERT_NAME_BLOB *certificateNames;
872} IKEV2_TUNNEL_CONFIG_PARAMS, *PIKEV2_TUNNEL_CONFIG_PARAMS;
873
874typedef struct _IKEV2_CONFIG_PARAMS {
875 DWORD dwNumPorts;
876 DWORD dwPortFlags;
877 DWORD dwTunnelConfigParamFlags;
878 IKEV2_TUNNEL_CONFIG_PARAMS TunnelConfigParams;
879} IKEV2_CONFIG_PARAMS, *PIKEV2_CONFIG_PARAMS;
880
881typedef struct _PPTP_CONFIG_PARAMS {
882 DWORD dwNumPorts;
883 DWORD dwPortFlags;
884} PPTP_CONFIG_PARAMS, *PPPTP_CONFIG_PARAMS;
885
886typedef struct _L2TP_CONFIG_PARAMS {
887 DWORD dwNumPorts;
888 DWORD dwPortFlags;
889} L2TP_CONFIG_PARAMS, *PL2TP_CONFIG_PARAMS;
890
891typedef struct _SSTP_CERT_INFO {
892 BOOL isDefault;
893 CRYPT_HASH_BLOB certBlob;
894} SSTP_CERT_INFO, *PSSTP_CERT_INFO;
895
896typedef struct _SSTP_CONFIG_PARAMS {
897 DWORD dwNumPorts;
898 DWORD dwPortFlags;
899 BOOL isUseHttps;
900 DWORD certAlgorithm;
901 SSTP_CERT_INFO sstpCertDetails;
902} SSTP_CONFIG_PARAMS, *PSSTP_CONFIG_PARAMS;
903
904typedef struct _MPRAPI_TUNNEL_CONFIG_PARAMS {
905 IKEV2_CONFIG_PARAMS IkeConfigParams;
906 PPTP_CONFIG_PARAMS PptpConfigParams;
907 L2TP_CONFIG_PARAMS L2tpConfigParams;
908 SSTP_CONFIG_PARAMS SstpConfigParams;
909} MPRAPI_TUNNEL_CONFIG_PARAMS, *PMPRAPI_TUNNEL_CONFIG_PARAMS;
910
911typedef struct _MPR_SERVER_SET_CONFIG_EX {
912 MPRAPI_OBJECT_HEADER Header;
913 DWORD setConfigForProtocols;
914 MPRAPI_TUNNEL_CONFIG_PARAMS ConfigParams;
915} MPR_SERVER_SET_CONFIG_EX, *PMPR_SERVER_SET_CONFIG_EX;
916
917typedef struct _MPR_SERVER_EX {
918 MPRAPI_OBJECT_HEADER Header;
919 DWORD fLanOnlyMode;
920 DWORD dwUpTime;
921 DWORD dwTotalPorts;
922 DWORD dwPortsInUse;
923 DWORD Reserved;
924 MPRAPI_TUNNEL_CONFIG_PARAMS ConfigParams;
925} MPR_SERVER_EX, *PMPR_SERVER_EX;
926
927typedef DWORD (APIENTRY * PMPRADMINGETIPADDRESSFORUSER)(WCHAR *, WCHAR *, DWORD *, WINBOOL *);
928typedef VOID (APIENTRY * PMPRADMINRELEASEIPADRESS)(WCHAR *, WCHAR *, DWORD *);
929typedef DWORD (APIENTRY * PMPRADMINGETIPV6ADDRESSFORUSER)(WCHAR *, WCHAR *, IN6_ADDR *, WINBOOL *);
930typedef VOID (APIENTRY * PMPRADMINRELEASEIPV6ADDRESSFORUSER)(WCHAR *, WCHAR *, IN6_ADDR *);
931typedef WINBOOL (APIENTRY * PMPRADMINACCEPTNEWLINK)(RAS_PORT_0 *, RAS_PORT_1 *);
932typedef VOID (APIENTRY * PMPRADMINLINKHANGUPNOTIFICATION)(RAS_PORT_0 *, RAS_PORT_1 *);
933typedef DWORD (APIENTRY * PMPRADMINTERMINATEDLL)();
934typedef BOOL (APIENTRY * PMPRADMINACCEPTNEWCONNECTIONEX)(RAS_CONNECTION_EX *);
935typedef BOOL (APIENTRY * PMPRADMINACCEPTREAUTHENTICATIONEX)(RAS_CONNECTION_EX *);
936typedef VOID (APIENTRY * PMPRADMINCONNECTIONHANGUPNOTIFICATIONEX)(RAS_CONNECTION_EX *);
937
938typedef struct _MPRAPI_ADMIN_DLL_CALLBACKS {
939 UCHAR revision;
940 PMPRADMINGETIPADDRESSFORUSER lpfnMprAdminGetIpAddressForUser;
941 PMPRADMINRELEASEIPADRESS lpfnMprAdminReleaseIpAddress;
942 PMPRADMINGETIPV6ADDRESSFORUSER lpfnMprAdminGetIpv6AddressForUser;
943 PMPRADMINRELEASEIPV6ADDRESSFORUSER lpfnMprAdminReleaseIpV6AddressForUser;
944 PMPRADMINACCEPTNEWLINK lpfnRasAdminAcceptNewLink;
945 PMPRADMINLINKHANGUPNOTIFICATION lpfnRasAdminLinkHangupNotification;
946 PMPRADMINTERMINATEDLL lpfnRasAdminTerminateDll;
947 PMPRADMINACCEPTNEWCONNECTIONEX lpfnRasAdminAcceptNewConnectionEx;
948 PMPRADMINACCEPTREAUTHENTICATIONEX lpfnRasAdminAcceptReauthenticationEx;
949 PMPRADMINCONNECTIONHANGUPNOTIFICATIONEX lpfnRasAdminConnectionHangupNotificationEx;
950} MPRAPI_ADMIN_DLL_CALLBACKS, *PMPRAPI_ADMIN_DLL_CALLBACKS;
951
952DWORD APIENTRY MprConfigServerSetInfoEx(HANDLE hMprConfig,MPR_SERVER_SET_CONFIG_EX *pSetServerConfig);
953
954DWORD APIENTRY MprConfigServerGetInfoEx(
955 HANDLE hMprConfig,
956 MPR_SERVER_EX *pServerInfo
957);
958
959DWORD APIENTRY MprAdminConnectionEnumEx(
960 RAS_SERVER_HANDLE hRasServer,
961 PMPRAPI_OBJECT_HEADER pObjectHeader,
962 DWORD dwPreferedMaxLen,
963 LPDWORD lpdwEntriesRead,
964 LPDWORD lpdwTotalEntries,
965 PRAS_CONNECTION_EX *ppRasConn,
966 LPDWORD lpdwResumeHandle
967);
968
969DWORD APIENTRY MprAdminConnectionGetInfoEx(
970 RAS_SERVER_HANDLE hRasServer,
971 HANDLE hConnection,
972 PRAS_CONNECTION_EX pRasConnection
973);
974
975DWORD APIENTRY MprAdminInitializeDllEx(
976 PMPRAPI_ADMIN_DLL_CALLBACKS pAdminCallbacks
977);
978
979DWORD APIENTRY MprAdminIsServiceInitialized(
980 LPWSTR lpwsServerName,
981 WINBOOL *fIsServiceInitialized
982);
983
984DWORD APIENTRY MprAdminServerGetInfoEx(
985 MPR_SERVER_HANDLE hMprServer,
986 MPR_SERVER_EX *pServerInfo
987);
988
989DWORD APIENTRY MprAdminServerSetInfoEx(
990 MPR_SERVER_HANDLE hMprServer,
991 MPR_SERVER_SET_CONFIG_EX *pServerInfo
992);
993
994#endif /*(_WIN32_WINNT >= 0x0601)*/
995
996#ifdef __cplusplus
997}
998#endif
999
1000#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) */
1001
1002#endif /* __ROUTING_MPRADMIN_H__ */
Note: See TracBrowser for help on using the repository browser.