Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1804 lines
50 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. mpradmin.h
  5. Abstract:
  6. This file contains the structures, defines and function prototypes for the
  7. following APIs:
  8. MprAdminIsServiceRunning
  9. MprAdminServerConnect
  10. MprAdminServerDisconnect
  11. MprAdminBufferFree
  12. MprAdminPortEnum
  13. MprAdminConnectionEnum
  14. MprAdminPortGetInfo
  15. MprAdminConnectionGetInfo
  16. MprAdminPortClearStats
  17. MprAdminPortReset
  18. MprAdminConnectionClearStats
  19. MprAdminPortDisconnect
  20. MprAdminGetErrorString
  21. MprAdminAcceptNewConnection
  22. MprAdminAcceptNewLink
  23. MprAdminConnectionHangupNotification
  24. MprAdminLinkHangupNotification
  25. MprAdminGetIpAddressForUser
  26. MprAdminReleaseIpAddress
  27. MprAdminInitializeDll
  28. MprAdminTerminateDll
  29. MprAdminAcceptNewConnection2
  30. MprAdminConnectionHangupNotification2
  31. MprAdminUserGetInfo
  32. MprAdminUserSetInfo
  33. MprAdminSendUserMessage
  34. MprAdminGetPDCServer
  35. MprAdminRegisterConnectionNotification
  36. MprAdminDeregisterConnectionNotification
  37. MprAdminIsServiceRunning
  38. MprAdminServerConnect
  39. MprAdminServerDisconnect
  40. MprAdminBufferFree
  41. MprAdminServerGetInfo
  42. MprAdminGetErrorString
  43. MprAdminTransportCreate
  44. MprAdminTransportSetInfo
  45. MprAdminTransportGetInfo
  46. MprAdminInterfaceCreate
  47. MprAdminInterfaceDelete
  48. MprAdminInterfaceGetInfo
  49. MprAdminInterfaceTransportAdd
  50. MprAdminInterfaceTransportGetInfo
  51. MprAdminInterfaceTransportSetInfo
  52. MprAdminInterfaceTransportRemove
  53. MprAdminInterfaceGetHandle
  54. MprAdminInterfaceSetCredentials
  55. MprAdminInterfaceGetCredentials
  56. MprAdminInterfaceEnum
  57. MprAdminInterfaceConnect
  58. MprAdminInterfaceDisconnect
  59. MprAdminInterfaceUpdateRoutes
  60. MprAdminInterfaceQueryUpdateResult
  61. MprAdminInterfaceUpdatePhonebookInfo
  62. MprAdminMIBServerConnect
  63. MprAdminMIBServerDisconnect
  64. MprAdminMIBBufferFree
  65. MprAdminMIBEntryCreate
  66. MprAdminMIBEntryDelete
  67. MprAdminMIBEntryGet
  68. MprAdminMIBEntrySet
  69. MprAdminMIBEntryGetFirst
  70. MprAdminMIBEntryGetNext
  71. MprAdminMIBSetTrapInfo
  72. MprAdminMIBGetTrapInfo
  73. All MIB APIs operate with the conceptual MIB row.
  74. MprConfigServerConnect
  75. MprConfigServerDisconnect
  76. MprConfigBufferFree
  77. MprConfigServerGetInfo
  78. MprConfigServerBackup
  79. MprConfigServerRestore
  80. MprConfigTransportCreate
  81. MprConfigTransportDelete
  82. MprConfigTransportGetHandle
  83. MprConfigTransportSetInfo
  84. MprConfigTransportGetInfo
  85. MprConfigTransportEnum
  86. MprConfigInterfaceCreate
  87. MprConfigInterfaceDelete
  88. MprConfigInterfaceGetHandle
  89. MprConfigInterfaceGetInfo
  90. MprConfigInterfaceEnum
  91. MprConfigInterfaceTransportAdd
  92. MprConfigInterfaceTransportRemove
  93. MprConfigInterfaceTransportGetHandle
  94. MprConfigInterfaceTransportGetInfo
  95. MprConfigInterfaceTransportSetInfo
  96. MprConfigInterfaceTransportEnum
  97. MprSetupIpInIpInterfaceFriendlyNameEnum
  98. MprSetupIpInIpInterfaceFriendlyNameFree
  99. MprSetupIpInIpInterfaceFriendlyNameCreate
  100. MprSetupIpInIpInterfaceFriendlyNameDelete
  101. --*/
  102. #ifndef __ROUTING_MPRADMIN_H__
  103. #define __ROUTING_MPRADMIN_H__
  104. #if _MSC_VER > 1000
  105. #pragma once
  106. #endif
  107. #include <lmcons.h>
  108. #include <ras.h>
  109. #ifdef __cplusplus
  110. extern "C" {
  111. #endif
  112. //#if(WINVER >= 0x0403)
  113. //
  114. // Name of the Routing and RemoteAccess Service
  115. //
  116. #define RRAS_SERVICE_NAME TEXT("RemoteAccess")
  117. //
  118. // Protocol IDs
  119. //
  120. #define PID_IPX 0x0000002B
  121. #define PID_IP 0x00000021
  122. #define PID_NBF 0x0000003F
  123. #define PID_ATALK 0x00000029
  124. #define MAX_INTERFACE_NAME_LEN 256
  125. #define MAX_TRANSPORT_NAME_LEN 40
  126. #define MAX_MEDIA_NAME 16
  127. #define MAX_PORT_NAME 16
  128. #define MAX_DEVICE_NAME 128
  129. #define MAX_PHONE_NUMBER_LEN 128
  130. #define MAX_DEVICETYPE_NAME 16
  131. //
  132. // MPR Interface structures and definitions.
  133. //
  134. //
  135. // MPR Interface types
  136. //
  137. typedef enum _ROUTER_INTERFACE_TYPE
  138. {
  139. ROUTER_IF_TYPE_CLIENT,
  140. ROUTER_IF_TYPE_HOME_ROUTER,
  141. ROUTER_IF_TYPE_FULL_ROUTER,
  142. ROUTER_IF_TYPE_DEDICATED,
  143. ROUTER_IF_TYPE_INTERNAL,
  144. ROUTER_IF_TYPE_LOOPBACK,
  145. ROUTER_IF_TYPE_TUNNEL1,
  146. ROUTER_IF_TYPE_DIALOUT
  147. }
  148. ROUTER_INTERFACE_TYPE;
  149. typedef enum _ROUTER_CONNECTION_STATE
  150. {
  151. ROUTER_IF_STATE_UNREACHABLE,
  152. ROUTER_IF_STATE_DISCONNECTED,
  153. ROUTER_IF_STATE_CONNECTING,
  154. ROUTER_IF_STATE_CONNECTED
  155. }
  156. ROUTER_CONNECTION_STATE;
  157. #define MPR_INTERFACE_OUT_OF_RESOURCES 0x00000001
  158. #define MPR_INTERFACE_ADMIN_DISABLED 0x00000002
  159. #define MPR_INTERFACE_CONNECTION_FAILURE 0x00000004
  160. #define MPR_INTERFACE_SERVICE_PAUSED 0x00000008
  161. #define MPR_INTERFACE_DIALOUT_HOURS_RESTRICTION 0x00000010
  162. #define MPR_INTERFACE_NO_MEDIA_SENSE 0x00000020
  163. #define MPR_INTERFACE_NO_DEVICE 0x00000040
  164. typedef struct _MPR_INTERFACE_0
  165. {
  166. IN OUT WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
  167. OUT HANDLE hInterface;
  168. IN OUT BOOL fEnabled;
  169. IN OUT ROUTER_INTERFACE_TYPE dwIfType;
  170. OUT ROUTER_CONNECTION_STATE dwConnectionState;
  171. OUT DWORD fUnReachabilityReasons;
  172. OUT DWORD dwLastError;
  173. }
  174. MPR_INTERFACE_0, *PMPR_INTERFACE_0;
  175. typedef struct _MPR_IPINIP_INTERFACE_0
  176. {
  177. WCHAR wszFriendlyName[MAX_INTERFACE_NAME_LEN+1];
  178. GUID Guid;
  179. }MPR_IPINIP_INTERFACE_0, *PMPR_IPINIP_INTERFACE_0;
  180. #if(WINVER >= 0x0500)
  181. typedef struct _MPR_INTERFACE_1
  182. {
  183. IN OUT WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
  184. OUT HANDLE hInterface;
  185. IN OUT BOOL fEnabled;
  186. IN OUT ROUTER_INTERFACE_TYPE dwIfType;
  187. OUT ROUTER_CONNECTION_STATE dwConnectionState;
  188. OUT DWORD fUnReachabilityReasons;
  189. OUT DWORD dwLastError;
  190. OUT LPWSTR lpwsDialoutHoursRestriction;
  191. }
  192. MPR_INTERFACE_1, *PMPR_INTERFACE_1;
  193. //
  194. // MPR_INTERFACE_2 definitions
  195. //
  196. #define MPR_MaxDeviceType RAS_MaxDeviceType
  197. #define MPR_MaxPhoneNumber RAS_MaxPhoneNumber
  198. #define MPR_MaxIpAddress RAS_MaxIpAddress
  199. #define MPR_MaxIpxAddress RAS_MaxIpxAddress
  200. #define MPR_MaxEntryName RAS_MaxEntryName
  201. #define MPR_MaxDeviceName RAS_MaxDeviceName
  202. #define MPR_MaxCallbackNumber RAS_MaxCallbackNumber
  203. #define MPR_MaxAreaCode RAS_MaxAreaCode
  204. #define MPR_MaxPadType RAS_MaxPadType
  205. #define MPR_MaxX25Address RAS_MaxX25Address
  206. #define MPR_MaxFacilities RAS_MaxFacilities
  207. #define MPR_MaxUserData RAS_MaxUserData
  208. //
  209. // MPR_INTERFACE_2 'dwfOptions' bit flags.
  210. //
  211. #define MPRIO_SpecificIpAddr RASEO_SpecificIpAddr
  212. #define MPRIO_SpecificNameServers RASEO_SpecificNameServers
  213. #define MPRIO_IpHeaderCompression RASEO_IpHeaderCompression
  214. #define MPRIO_RemoteDefaultGateway RASEO_RemoteDefaultGateway
  215. #define MPRIO_DisableLcpExtensions RASEO_DisableLcpExtensions
  216. #define MPRIO_SwCompression RASEO_SwCompression
  217. #define MPRIO_RequireEncryptedPw RASEO_RequireEncryptedPw
  218. #define MPRIO_RequireMsEncryptedPw RASEO_RequireMsEncryptedPw
  219. #define MPRIO_RequireDataEncryption RASEO_RequireDataEncryption
  220. #define MPRIO_NetworkLogon RASEO_NetworkLogon
  221. #define MPRIO_PromoteAlternates RASEO_PromoteAlternates
  222. #define MPRIO_SecureLocalFiles RASEO_SecureLocalFiles
  223. #define MPRIO_RequireEAP RASEO_RequireEAP
  224. #define MPRIO_RequirePAP RASEO_RequirePAP
  225. #define MPRIO_RequireSPAP RASEO_RequireSPAP
  226. #define MPRIO_SharedPhoneNumbers RASEO_SharedPhoneNumbers
  227. #define MPRIO_RequireCHAP RASEO_RequireCHAP
  228. #define MPRIO_RequireMsCHAP RASEO_RequireMsCHAP
  229. #define MPRIO_RequireMsCHAP2 RASEO_RequireMsCHAP2
  230. #if (WINVER >= 0x501)
  231. #define MPRIO_IpSecPreSharedKey 0x80000000
  232. #endif
  233. //
  234. // MPR_INTERFACE_2 'dwProtocols' bit flags.
  235. //
  236. #define MPRNP_Ipx RASNP_Ipx
  237. #define MPRNP_Ip RASNP_Ip
  238. //
  239. // MPR_INTERFACE_2 'szDeviceType' default strings.
  240. //
  241. #define MPRDT_Modem RASDT_Modem
  242. #define MPRDT_Isdn RASDT_Isdn
  243. #define MPRDT_X25 RASDT_X25
  244. #define MPRDT_Vpn RASDT_Vpn
  245. #define MPRDT_Pad RASDT_Pad
  246. #define MPRDT_Generic RASDT_Generic
  247. #define MPRDT_Serial RASDT_Serial
  248. #define MPRDT_FrameRelay RASDT_FrameRelay
  249. #define MPRDT_Atm RASDT_Atm
  250. #define MPRDT_Sonet RASDT_Sonet
  251. #define MPRDT_SW56 RASDT_SW56
  252. #define MPRDT_Irda RASDT_Irda
  253. #define MPRDT_Parallel RASDT_Parallel
  254. //
  255. // MPR_INTERFACE_2 'dwType' settings
  256. //
  257. #define MPRET_Phone RASET_Phone
  258. #define MPRET_Vpn RASET_Vpn
  259. #define MPRET_Direct RASET_Direct
  260. //
  261. // MPR_INTERFACE_2 'dwDialMode' values.
  262. //
  263. #define MPRDM_DialFirst 0
  264. #define MPRDM_DialAll RASEDM_DialAll
  265. #define MPRDM_DialAsNeeded RASEDM_DialAsNeeded
  266. //
  267. // MPR_INTERFACE_2 'dwIdleDisconnectSeconds' constants.
  268. //
  269. #define MPRIDS_Disabled RASIDS_Disabled
  270. #define MPRIDS_UseGlobalValue RASIDS_UseGlobalValue
  271. //
  272. // MPR_INTERFACE_2 encryption types.
  273. //
  274. #define MPR_ET_None ET_None
  275. #define MPR_ET_Require ET_Require
  276. #define MPR_ET_RequireMax ET_RequireMax
  277. #define MPR_ET_Optional ET_Optional
  278. //
  279. // MPR_INTERFACE_2 Vpn strategies
  280. //
  281. #define MPR_VS_Default VS_Default
  282. #define MPR_VS_PptpOnly VS_PptpOnly
  283. #define MPR_VS_PptpFirst VS_PptpFirst
  284. #define MPR_VS_L2tpOnly VS_L2tpOnly
  285. #define MPR_VS_L2tpFirst VS_L2tpFirst
  286. //
  287. // Used to create/get/set a demand dial interface plus its
  288. // ras configuration.
  289. //
  290. typedef struct _MPR_INTERFACE_2
  291. {
  292. IN OUT WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
  293. OUT HANDLE hInterface;
  294. IN OUT BOOL fEnabled;
  295. IN OUT ROUTER_INTERFACE_TYPE dwIfType;
  296. OUT ROUTER_CONNECTION_STATE dwConnectionState;
  297. OUT DWORD fUnReachabilityReasons;
  298. OUT DWORD dwLastError;
  299. //
  300. // Demand dial-specific properties
  301. //
  302. DWORD dwfOptions;
  303. //
  304. // Location/phone number
  305. //
  306. WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  307. PWCHAR szAlternates;
  308. //
  309. // PPP/Ip
  310. //
  311. DWORD ipaddr;
  312. DWORD ipaddrDns;
  313. DWORD ipaddrDnsAlt;
  314. DWORD ipaddrWins;
  315. DWORD ipaddrWinsAlt;
  316. //
  317. // NetProtocols
  318. //
  319. DWORD dwfNetProtocols;
  320. //
  321. // Device
  322. //
  323. WCHAR szDeviceType[ MPR_MaxDeviceType + 1 ];
  324. WCHAR szDeviceName[ MPR_MaxDeviceName + 1 ];
  325. //
  326. // X.25
  327. //
  328. WCHAR szX25PadType[ MPR_MaxPadType + 1 ];
  329. WCHAR szX25Address[ MPR_MaxX25Address + 1 ];
  330. WCHAR szX25Facilities[ MPR_MaxFacilities + 1 ];
  331. WCHAR szX25UserData[ MPR_MaxUserData + 1 ];
  332. DWORD dwChannels;
  333. //
  334. // Multilink
  335. //
  336. DWORD dwSubEntries;
  337. DWORD dwDialMode;
  338. DWORD dwDialExtraPercent;
  339. DWORD dwDialExtraSampleSeconds;
  340. DWORD dwHangUpExtraPercent;
  341. DWORD dwHangUpExtraSampleSeconds;
  342. //
  343. // Idle timeout
  344. //
  345. DWORD dwIdleDisconnectSeconds;
  346. //
  347. // Entry Type
  348. //
  349. DWORD dwType;
  350. //
  351. // EncryptionType
  352. //
  353. DWORD dwEncryptionType;
  354. //
  355. // EAP information
  356. //
  357. DWORD dwCustomAuthKey;
  358. DWORD dwCustomAuthDataSize;
  359. LPBYTE lpbCustomAuthData;
  360. //
  361. // Guid of the connection
  362. //
  363. GUID guidId;
  364. //
  365. // Vpn Strategy
  366. //
  367. DWORD dwVpnStrategy;
  368. } MPR_INTERFACE_2, *PMPR_INTERFACE_2;
  369. //
  370. // Used to set/get per-link information for multilinked demand
  371. // dial interfaces.
  372. //
  373. typedef struct _MPR_DEVICE_0
  374. {
  375. //
  376. // Device
  377. //
  378. WCHAR szDeviceType[ MPR_MaxDeviceType + 1 ];
  379. WCHAR szDeviceName[ MPR_MaxDeviceName + 1 ];
  380. }
  381. MPR_DEVICE_0, *PMPR_DEVICE_0;
  382. typedef struct _MPR_DEVICE_1
  383. {
  384. //
  385. // Device
  386. //
  387. WCHAR szDeviceType[ MPR_MaxDeviceType + 1 ];
  388. WCHAR szDeviceName[ MPR_MaxDeviceName + 1 ];
  389. //
  390. // Phone numbers
  391. //
  392. WCHAR szLocalPhoneNumber[ MPR_MaxPhoneNumber + 1 ];
  393. PWCHAR szAlternates;
  394. }
  395. MPR_DEVICE_1, *PMPR_DEVICE_1;
  396. //
  397. // Used to get/set extended credentials information such as
  398. // eap credentials info.
  399. //
  400. typedef struct _MPR_CREDENTIALSEX_0
  401. {
  402. DWORD dwSize;
  403. LPBYTE lpbCredentialsInfo;
  404. }
  405. MPR_CREDENTIALSEX_0, *PMPR_CREDENTIALSEX_0;
  406. typedef struct _MPR_CREDENTIALSEX_1
  407. {
  408. DWORD dwSize;
  409. LPBYTE lpbCredentialsInfo;
  410. }
  411. MPR_CREDENTIALSEX_1, *PMPR_CREDENTIALSEX_1;
  412. #endif /* WINVER >= 0x0500 */
  413. typedef struct _MPR_TRANSPORT_0
  414. {
  415. OUT DWORD dwTransportId;
  416. OUT HANDLE hTransport;
  417. OUT WCHAR wszTransportName[MAX_TRANSPORT_NAME_LEN+1];
  418. }
  419. MPR_TRANSPORT_0, *PMPR_TRANSPORT_0;
  420. typedef struct _MPR_IFTRANSPORT_0
  421. {
  422. OUT DWORD dwTransportId;
  423. OUT HANDLE hIfTransport;
  424. OUT WCHAR wszIfTransportName[MAX_TRANSPORT_NAME_LEN+1];
  425. }
  426. MPR_IFTRANSPORT_0, *PMPR_IFTRANSPORT_0;
  427. typedef struct _MPR_SERVER_0
  428. {
  429. OUT BOOL fLanOnlyMode;
  430. OUT DWORD dwUpTime; // In seconds
  431. OUT DWORD dwTotalPorts;
  432. OUT DWORD dwPortsInUse;
  433. }
  434. MPR_SERVER_0, *PMPR_SERVER_0;
  435. //
  436. // Port condition codes
  437. //
  438. typedef enum _RAS_PORT_CONDITION
  439. {
  440. RAS_PORT_NON_OPERATIONAL,
  441. RAS_PORT_DISCONNECTED,
  442. RAS_PORT_CALLING_BACK,
  443. RAS_PORT_LISTENING,
  444. RAS_PORT_AUTHENTICATING,
  445. RAS_PORT_AUTHENTICATED,
  446. RAS_PORT_INITIALIZING
  447. }
  448. RAS_PORT_CONDITION;
  449. //
  450. // Hardware condition codes
  451. //
  452. typedef enum _RAS_HARDWARE_CONDITION
  453. {
  454. RAS_HARDWARE_OPERATIONAL,
  455. RAS_HARDWARE_FAILURE
  456. }
  457. RAS_HARDWARE_CONDITION;
  458. typedef struct _RAS_PORT_0
  459. {
  460. OUT HANDLE hPort;
  461. OUT HANDLE hConnection;
  462. OUT RAS_PORT_CONDITION dwPortCondition;
  463. OUT DWORD dwTotalNumberOfCalls;
  464. OUT DWORD dwConnectDuration; // In seconds
  465. OUT WCHAR wszPortName[ MAX_PORT_NAME + 1 ];
  466. OUT WCHAR wszMediaName[ MAX_MEDIA_NAME + 1 ];
  467. OUT WCHAR wszDeviceName[ MAX_DEVICE_NAME + 1 ];
  468. OUT WCHAR wszDeviceType[ MAX_DEVICETYPE_NAME + 1 ];
  469. }
  470. RAS_PORT_0, *PRAS_PORT_0;
  471. typedef struct _RAS_PORT_1
  472. {
  473. OUT HANDLE hPort;
  474. OUT HANDLE hConnection;
  475. OUT RAS_HARDWARE_CONDITION dwHardwareCondition;
  476. OUT DWORD dwLineSpeed; // in bits/second
  477. OUT DWORD dwBytesXmited;
  478. OUT DWORD dwBytesRcved;
  479. OUT DWORD dwFramesXmited;
  480. OUT DWORD dwFramesRcved;
  481. OUT DWORD dwCrcErr;
  482. OUT DWORD dwTimeoutErr;
  483. OUT DWORD dwAlignmentErr;
  484. OUT DWORD dwHardwareOverrunErr;
  485. OUT DWORD dwFramingErr;
  486. OUT DWORD dwBufferOverrunErr;
  487. OUT DWORD dwCompressionRatioIn;
  488. OUT DWORD dwCompressionRatioOut;
  489. }
  490. RAS_PORT_1, *PRAS_PORT_1;
  491. //
  492. // Maximum length of address string, e.g. "255.255.255.255" for IP.
  493. //
  494. #define IPADDRESSLEN 15
  495. #define IPXADDRESSLEN 22
  496. #define ATADDRESSLEN 32
  497. typedef struct _PPP_NBFCP_INFO
  498. {
  499. OUT DWORD dwError;
  500. OUT WCHAR wszWksta[ NETBIOS_NAME_LEN + 1 ];
  501. }
  502. PPP_NBFCP_INFO;
  503. typedef struct _PPP_IPCP_INFO
  504. {
  505. OUT DWORD dwError;
  506. OUT WCHAR wszAddress[ IPADDRESSLEN + 1 ];
  507. OUT WCHAR wszRemoteAddress[ IPADDRESSLEN + 1 ];
  508. }
  509. PPP_IPCP_INFO;
  510. //
  511. // PPP_IPCP_INFO2 dwOptions values.
  512. //
  513. #define PPP_IPCP_VJ 0x00000001
  514. typedef struct _PPP_IPCP_INFO2
  515. {
  516. OUT DWORD dwError;
  517. OUT WCHAR wszAddress[ IPADDRESSLEN + 1 ];
  518. OUT WCHAR wszRemoteAddress[ IPADDRESSLEN + 1 ];
  519. OUT DWORD dwOptions;
  520. OUT DWORD dwRemoteOptions;
  521. }
  522. PPP_IPCP_INFO2;
  523. typedef struct _PPP_IPXCP_INFO
  524. {
  525. OUT DWORD dwError;
  526. OUT WCHAR wszAddress[ IPXADDRESSLEN + 1 ];
  527. }
  528. PPP_IPXCP_INFO;
  529. typedef struct _PPP_ATCP_INFO
  530. {
  531. OUT DWORD dwError;
  532. OUT WCHAR wszAddress[ ATADDRESSLEN + 1 ];
  533. }
  534. PPP_ATCP_INFO;
  535. typedef struct _PPP_INFO
  536. {
  537. OUT PPP_NBFCP_INFO nbf;
  538. OUT PPP_IPCP_INFO ip;
  539. OUT PPP_IPXCP_INFO ipx;
  540. OUT PPP_ATCP_INFO at;
  541. } PPP_INFO;
  542. #if(WINVER >= 0x0500)
  543. //
  544. // PPP_CCP dwCompressionAlgorithm values.
  545. //
  546. #define RASCCPCA_MPPC 0x00000006
  547. #define RASCCPCA_STAC 0x00000005
  548. //
  549. // PPP_CCP dwOptions values.
  550. //
  551. #define PPP_CCP_COMPRESSION 0x00000001
  552. #define PPP_CCP_ENCRYPTION40BITOLD 0x00000010
  553. #define PPP_CCP_ENCRYPTION40BIT 0x00000020
  554. #define PPP_CCP_ENCRYPTION128BIT 0x00000040
  555. #define PPP_CCP_ENCRYPTION56BIT 0x00000080
  556. #define PPP_CCP_HISTORYLESS 0x01000000
  557. typedef struct _PPP_CCP_INFO
  558. {
  559. OUT DWORD dwError;
  560. OUT DWORD dwCompressionAlgorithm;
  561. OUT DWORD dwOptions;
  562. OUT DWORD dwRemoteCompressionAlgorithm;
  563. OUT DWORD dwRemoteOptions;
  564. }
  565. PPP_CCP_INFO;
  566. //
  567. // PPP_LCP dwAuthenticatonProtocol values.
  568. //
  569. #define PPP_LCP_PAP 0xC023
  570. #define PPP_LCP_SPAP 0xC027
  571. #define PPP_LCP_CHAP 0xC223
  572. #define PPP_LCP_EAP 0xC227
  573. //
  574. // PPP_LCP dwAuthenticatonData values.
  575. //
  576. #define PPP_LCP_CHAP_MD5 0x05
  577. #define PPP_LCP_CHAP_MS 0x80
  578. #define PPP_LCP_CHAP_MSV2 0x81
  579. //
  580. // PPP_LCP dwOption values
  581. //
  582. #define PPP_LCP_MULTILINK_FRAMING 0x00000001
  583. #define PPP_LCP_PFC 0x00000002
  584. #define PPP_LCP_ACFC 0x00000004
  585. #define PPP_LCP_SSHF 0x00000008
  586. #define PPP_LCP_DES_56 0x00000010
  587. #define PPP_LCP_3_DES 0x00000020
  588. typedef struct _PPP_LCP_INFO
  589. {
  590. OUT DWORD dwError;
  591. OUT DWORD dwAuthenticationProtocol;
  592. OUT DWORD dwAuthenticationData;
  593. OUT DWORD dwRemoteAuthenticationProtocol;
  594. OUT DWORD dwRemoteAuthenticationData;
  595. OUT DWORD dwTerminateReason;
  596. OUT DWORD dwRemoteTerminateReason;
  597. OUT DWORD dwOptions;
  598. OUT DWORD dwRemoteOptions;
  599. OUT DWORD dwEapTypeId;
  600. OUT DWORD dwRemoteEapTypeId;
  601. }
  602. PPP_LCP_INFO;
  603. typedef struct _PPP_INFO_2
  604. {
  605. OUT PPP_NBFCP_INFO nbf;
  606. OUT PPP_IPCP_INFO2 ip;
  607. OUT PPP_IPXCP_INFO ipx;
  608. OUT PPP_ATCP_INFO at;
  609. OUT PPP_CCP_INFO ccp;
  610. OUT PPP_LCP_INFO lcp;
  611. }
  612. PPP_INFO_2;
  613. #endif /* WINVER >= 0x0500 */
  614. //
  615. // Possible bits set in Connection Flags field
  616. //
  617. #define RAS_FLAGS_PPP_CONNECTION 0x00000001
  618. #define RAS_FLAGS_MESSENGER_PRESENT 0x00000002
  619. #if(WINVER < 0x0501)
  620. #define RAS_FLAGS_RAS_CONNECTION 0x00000004
  621. #endif
  622. #define RAS_FLAGS_QUARANTINE_PRESENT 0x00000008
  623. typedef struct _RAS_CONNECTION_0
  624. {
  625. OUT HANDLE hConnection;
  626. OUT HANDLE hInterface;
  627. OUT DWORD dwConnectDuration; // In seconds
  628. OUT ROUTER_INTERFACE_TYPE dwInterfaceType;
  629. OUT DWORD dwConnectionFlags;
  630. OUT WCHAR wszInterfaceName[ MAX_INTERFACE_NAME_LEN + 1 ];
  631. OUT WCHAR wszUserName[ UNLEN + 1 ];
  632. OUT WCHAR wszLogonDomain[ DNLEN + 1 ];
  633. OUT WCHAR wszRemoteComputer[ NETBIOS_NAME_LEN + 1 ];
  634. }
  635. RAS_CONNECTION_0, *PRAS_CONNECTION_0;
  636. typedef struct _RAS_CONNECTION_1
  637. {
  638. OUT HANDLE hConnection;
  639. OUT HANDLE hInterface;
  640. OUT PPP_INFO PppInfo;
  641. OUT DWORD dwBytesXmited;
  642. OUT DWORD dwBytesRcved;
  643. OUT DWORD dwFramesXmited;
  644. OUT DWORD dwFramesRcved;
  645. OUT DWORD dwCrcErr;
  646. OUT DWORD dwTimeoutErr;
  647. OUT DWORD dwAlignmentErr;
  648. OUT DWORD dwHardwareOverrunErr;
  649. OUT DWORD dwFramingErr;
  650. OUT DWORD dwBufferOverrunErr;
  651. OUT DWORD dwCompressionRatioIn;
  652. OUT DWORD dwCompressionRatioOut;
  653. }
  654. RAS_CONNECTION_1, *PRAS_CONNECTION_1;
  655. #if(WINVER >= 0x0500)
  656. typedef struct _RAS_CONNECTION_2
  657. {
  658. OUT HANDLE hConnection;
  659. OUT WCHAR wszUserName[ UNLEN + 1 ];
  660. OUT ROUTER_INTERFACE_TYPE dwInterfaceType;
  661. OUT GUID guid;
  662. OUT PPP_INFO_2 PppInfo2;
  663. }
  664. RAS_CONNECTION_2, *PRAS_CONNECTION_2;
  665. #endif /* WINVER >= 0x0500 */
  666. //
  667. // Structures used by the MPRADMIN USER APIs. Use level 0 to get/set this
  668. // structure.
  669. //
  670. //
  671. // Bits indicating user's Remote Access privileges and mask to isolate
  672. // call back privilege.
  673. //
  674. // Note: Bit 0 MUST represent NoCallback due to a quirk of the "userparms"
  675. // storage method. When a new LAN Manager user is created, bit 0 of the
  676. // userparms field is set to 1 and all other bits are 0. These bits are
  677. // arranged so this "no Dial-In info" state maps to the "default Dial-In
  678. // privilege" state.
  679. #define RASPRIV_NoCallback 0x01
  680. #define RASPRIV_AdminSetCallback 0x02
  681. #define RASPRIV_CallerSetCallback 0x04
  682. #define RASPRIV_DialinPrivilege 0x08
  683. //
  684. // The following are flags for the bfPrivilege2 member of RAS_USER_1
  685. // structure
  686. //
  687. #define RASPRIV2_DialinPolicy 0x1
  688. #define RASPRIV_CallbackType (RASPRIV_AdminSetCallback \
  689. | RASPRIV_CallerSetCallback \
  690. | RASPRIV_NoCallback)
  691. typedef struct _RAS_USER_0
  692. {
  693. OUT BYTE bfPrivilege;
  694. OUT WCHAR wszPhoneNumber[ MAX_PHONE_NUMBER_LEN + 1];
  695. }
  696. RAS_USER_0, *PRAS_USER_0;
  697. typedef struct _RAS_USER_1
  698. {
  699. OUT BYTE bfPrivilege;
  700. OUT WCHAR wszPhoneNumber[ MAX_PHONE_NUMBER_LEN + 1];
  701. OUT BYTE bfPrivilege2;
  702. }
  703. RAS_USER_1, *PRAS_USER_1;
  704. //
  705. // Used as RPC binding handle to server
  706. //
  707. typedef HANDLE RAS_SERVER_HANDLE;
  708. typedef HANDLE MPR_SERVER_HANDLE;
  709. typedef HANDLE MIB_SERVER_HANDLE;
  710. //
  711. // RAS ADMIN APIs
  712. //
  713. DWORD APIENTRY
  714. MprAdminConnectionEnum(
  715. IN RAS_SERVER_HANDLE hRasServer,
  716. IN DWORD dwLevel,
  717. OUT LPBYTE * lplpbBuffer,
  718. IN DWORD dwPrefMaxLen,
  719. OUT LPDWORD lpdwEntriesRead,
  720. OUT LPDWORD lpdwTotalEntries,
  721. IN LPDWORD lpdwResumeHandle OPTIONAL
  722. );
  723. DWORD APIENTRY
  724. MprAdminPortEnum(
  725. IN RAS_SERVER_HANDLE hRasServer,
  726. IN DWORD dwLevel,
  727. IN HANDLE hConnection,
  728. OUT LPBYTE * lplpbBuffer,
  729. IN DWORD dwPrefMaxLen,
  730. OUT LPDWORD lpdwEntriesRead,
  731. OUT LPDWORD lpdwTotalEntries,
  732. IN LPDWORD lpdwResumeHandle OPTIONAL
  733. );
  734. DWORD APIENTRY
  735. MprAdminConnectionGetInfo(
  736. IN RAS_SERVER_HANDLE hRasServer,
  737. IN DWORD dwLevel,
  738. IN HANDLE hConnection,
  739. OUT LPBYTE * lplpbBuffer
  740. );
  741. DWORD APIENTRY
  742. MprAdminPortGetInfo(
  743. IN RAS_SERVER_HANDLE hRasServer,
  744. IN DWORD dwLevel,
  745. IN HANDLE hPort,
  746. OUT LPBYTE * lplpbBuffer
  747. );
  748. DWORD APIENTRY
  749. MprAdminConnectionClearStats(
  750. IN RAS_SERVER_HANDLE hRasServer,
  751. IN HANDLE hConnection
  752. );
  753. DWORD APIENTRY
  754. MprAdminPortClearStats(
  755. IN RAS_SERVER_HANDLE hRasServer,
  756. IN HANDLE hPort
  757. );
  758. DWORD APIENTRY
  759. MprAdminPortReset(
  760. IN RAS_SERVER_HANDLE hRasServer,
  761. IN HANDLE hPort
  762. );
  763. DWORD APIENTRY
  764. MprAdminPortDisconnect(
  765. IN RAS_SERVER_HANDLE hRasServer,
  766. IN HANDLE hPort
  767. );
  768. BOOL APIENTRY
  769. MprAdminAcceptNewConnection(
  770. IN RAS_CONNECTION_0 * pRasConnection0,
  771. IN RAS_CONNECTION_1 * pRasConnection1
  772. );
  773. #if(WINVER >= 0x0500)
  774. BOOL APIENTRY
  775. MprAdminAcceptNewConnection2(
  776. IN RAS_CONNECTION_0 * pRasConnection0,
  777. IN RAS_CONNECTION_1 * pRasConnection1,
  778. IN RAS_CONNECTION_2 * pRasConnection2
  779. );
  780. #endif /* WINVER >= 0x0500 */
  781. BOOL APIENTRY
  782. MprAdminAcceptNewLink (
  783. IN RAS_PORT_0 * pRasPort0,
  784. IN RAS_PORT_1 * pRasPort1
  785. );
  786. VOID APIENTRY
  787. MprAdminConnectionHangupNotification(
  788. IN RAS_CONNECTION_0 * pRasConnection0,
  789. IN RAS_CONNECTION_1 * pRasConnection1
  790. );
  791. #if(WINVER >= 0x0500)
  792. VOID APIENTRY
  793. MprAdminConnectionHangupNotification2(
  794. IN RAS_CONNECTION_0 * pRasConnection0,
  795. IN RAS_CONNECTION_1 * pRasConnection1,
  796. IN RAS_CONNECTION_2 * pRasConnection2
  797. );
  798. #endif /* WINVER >= 0x0500 */
  799. #if (WINVER >= 0x501)
  800. DWORD APIENTRY
  801. MprAdminConnectionRemoveQuarantine(
  802. IN HANDLE hRasServer,
  803. IN HANDLE hRasConnection,
  804. IN BOOL fIsIpAddress
  805. );
  806. #endif
  807. VOID APIENTRY
  808. MprAdminLinkHangupNotification (
  809. IN RAS_PORT_0 * pRasPort0,
  810. IN RAS_PORT_1 * pRasPort1
  811. );
  812. DWORD APIENTRY
  813. MprAdminGetIpAddressForUser (
  814. IN WCHAR * lpwszUserName,
  815. IN WCHAR * lpwszPortName,
  816. IN OUT DWORD * lpdwIpAddress,
  817. OUT BOOL * bNotifyRelease
  818. );
  819. VOID APIENTRY
  820. MprAdminReleaseIpAddress (
  821. IN WCHAR * lpszUserName,
  822. IN WCHAR * lpszPortName,
  823. IN DWORD * lpdwIpAddress
  824. );
  825. #if(WINVER >= 0x0500)
  826. DWORD APIENTRY
  827. MprAdminInitializeDll(
  828. VOID
  829. );
  830. DWORD APIENTRY
  831. MprAdminTerminateDll(
  832. VOID
  833. );
  834. #endif
  835. //
  836. // MprAdminUser APIs
  837. //
  838. DWORD APIENTRY
  839. MprAdminUserGetInfo(
  840. IN const WCHAR * lpszServer,
  841. IN const WCHAR * lpszUser,
  842. IN DWORD dwLevel,
  843. OUT LPBYTE lpbBuffer
  844. );
  845. DWORD APIENTRY
  846. MprAdminUserSetInfo(
  847. IN const WCHAR * lpszServer,
  848. IN const WCHAR * lpszUser,
  849. IN DWORD dwLevel,
  850. IN const LPBYTE lpbBuffer
  851. );
  852. #if(WINVER >= 0x0500)
  853. DWORD APIENTRY
  854. MprAdminSendUserMessage(
  855. IN MPR_SERVER_HANDLE hMprServer,
  856. IN HANDLE hConnection,
  857. IN LPWSTR lpwszMessage
  858. );
  859. #endif /* WINVER >= 0x0500 */
  860. DWORD APIENTRY
  861. MprAdminGetPDCServer(
  862. IN const WCHAR * lpszDomain,
  863. IN const WCHAR * lpszServer,
  864. OUT LPWSTR lpszPDCServer
  865. );
  866. //
  867. // Router APIs
  868. //
  869. BOOL APIENTRY
  870. MprAdminIsServiceRunning(
  871. IN LPWSTR lpwsServerName
  872. );
  873. DWORD APIENTRY
  874. MprAdminServerConnect(
  875. IN LPWSTR lpwsServerName OPTIONAL,
  876. OUT MPR_SERVER_HANDLE * phMprServer
  877. );
  878. VOID APIENTRY
  879. MprAdminServerDisconnect(
  880. IN MPR_SERVER_HANDLE hMprServer
  881. );
  882. #if (WINVER >= 0x501)
  883. DWORD APIENTRY
  884. MprAdminServerGetCredentials(
  885. IN MPR_SERVER_HANDLE hMprServer,
  886. IN DWORD dwLevel,
  887. IN LPBYTE * lplpbBuffer
  888. );
  889. DWORD APIENTRY
  890. MprAdminServerSetCredentials(
  891. IN MPR_SERVER_HANDLE hMprServer,
  892. IN DWORD dwLevel,
  893. IN LPBYTE lpbBuffer
  894. );
  895. #endif
  896. DWORD APIENTRY
  897. MprAdminBufferFree(
  898. IN LPVOID pBuffer
  899. );
  900. DWORD APIENTRY
  901. MprAdminGetErrorString(
  902. IN DWORD dwError,
  903. OUT LPWSTR * lpwsErrorString
  904. );
  905. DWORD APIENTRY
  906. MprAdminServerGetInfo(
  907. IN MPR_SERVER_HANDLE hMprServer,
  908. IN DWORD dwLevel,
  909. OUT LPBYTE * lplpbBuffer
  910. );
  911. #if(WINVER >= 0x0500)
  912. DWORD APIENTRY
  913. MprAdminTransportCreate(
  914. IN MPR_SERVER_HANDLE hMprServer,
  915. IN DWORD dwTransportId,
  916. IN LPWSTR lpwsTransportName OPTIONAL,
  917. IN LPBYTE pGlobalInfo,
  918. IN DWORD dwGlobalInfoSize,
  919. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  920. IN DWORD dwClientInterfaceInfoSize OPTIONAL,
  921. IN LPWSTR lpwsDLLPath
  922. );
  923. #endif /* WINVER >= 0x0500 */
  924. DWORD APIENTRY
  925. MprAdminTransportSetInfo(
  926. IN MPR_SERVER_HANDLE hMprServer,
  927. IN DWORD dwTransportId,
  928. IN LPBYTE pGlobalInfo OPTIONAL,
  929. IN DWORD dwGlobalInfoSize,
  930. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  931. IN DWORD dwClientInterfaceInfoSize
  932. );
  933. DWORD APIENTRY
  934. MprAdminTransportGetInfo(
  935. IN MPR_SERVER_HANDLE hMprServer,
  936. IN DWORD dwTransportId,
  937. OUT LPBYTE * ppGlobalInfo OPTIONAL,
  938. OUT LPDWORD lpdwGlobalInfoSize OPTIONAL,
  939. OUT LPBYTE * ppClientInterfaceInfo OPTIONAL,
  940. OUT LPDWORD lpdwClientInterfaceInfoSize OPTIONAL
  941. );
  942. #if(WINVER >= 0x0500)
  943. DWORD APIENTRY
  944. MprAdminDeviceEnum(
  945. IN MPR_SERVER_HANDLE hMprServer,
  946. IN DWORD dwLevel,
  947. OUT LPBYTE* lplpbBuffer,
  948. OUT LPDWORD lpdwTotalEntries);
  949. #endif /* WINVER >= 0x0500 */
  950. DWORD APIENTRY
  951. MprAdminInterfaceGetHandle(
  952. IN MPR_SERVER_HANDLE hMprServer,
  953. IN LPWSTR lpwsInterfaceName,
  954. OUT HANDLE * phInterface,
  955. IN BOOL fIncludeClientInterfaces
  956. );
  957. DWORD APIENTRY
  958. MprAdminInterfaceCreate(
  959. IN MPR_SERVER_HANDLE hMprServer,
  960. IN DWORD dwLevel,
  961. IN LPBYTE lpbBuffer,
  962. OUT HANDLE * phInterface
  963. );
  964. DWORD APIENTRY
  965. MprAdminInterfaceGetInfo(
  966. IN MPR_SERVER_HANDLE hMprServer,
  967. IN HANDLE hInterface,
  968. IN DWORD dwLevel,
  969. IN LPBYTE * lplpbBuffer
  970. );
  971. DWORD APIENTRY
  972. MprAdminInterfaceSetInfo(
  973. IN MPR_SERVER_HANDLE hMprServer,
  974. IN HANDLE hInterface,
  975. IN DWORD dwLevel,
  976. IN LPBYTE lpbBuffer
  977. );
  978. DWORD APIENTRY
  979. MprAdminInterfaceDelete(
  980. IN MPR_SERVER_HANDLE hMprServer,
  981. IN HANDLE hInterface
  982. );
  983. #if(WINVER >= 0x0500)
  984. DWORD APIENTRY
  985. MprAdminInterfaceDeviceGetInfo(
  986. IN MPR_SERVER_HANDLE hMprServer,
  987. IN HANDLE hInterface,
  988. IN DWORD dwIndex,
  989. IN DWORD dwLevel,
  990. OUT LPBYTE* lplpBuffer
  991. );
  992. DWORD APIENTRY
  993. MprAdminInterfaceDeviceSetInfo(
  994. IN MPR_SERVER_HANDLE hMprServer,
  995. IN HANDLE hInterface,
  996. IN DWORD dwIndex,
  997. IN DWORD dwLevel,
  998. IN LPBYTE lplpBuffer
  999. );
  1000. #endif /* WINVER >= 0x0500 */
  1001. DWORD APIENTRY
  1002. MprAdminInterfaceTransportRemove(
  1003. IN MPR_SERVER_HANDLE hMprServer,
  1004. IN HANDLE hInterface,
  1005. IN DWORD dwTransportId
  1006. );
  1007. DWORD APIENTRY
  1008. MprAdminInterfaceTransportAdd(
  1009. IN MPR_SERVER_HANDLE hMprServer,
  1010. IN HANDLE hInterface,
  1011. IN DWORD dwTransportId,
  1012. IN LPBYTE pInterfaceInfo,
  1013. IN DWORD dwInterfaceInfoSize
  1014. );
  1015. DWORD APIENTRY
  1016. MprAdminInterfaceTransportGetInfo(
  1017. IN MPR_SERVER_HANDLE hMprServer,
  1018. IN HANDLE hInterface,
  1019. IN DWORD dwTransportId,
  1020. OUT LPBYTE * ppInterfaceInfo,
  1021. OUT LPDWORD lpdwpInterfaceInfoSize OPTIONAL
  1022. );
  1023. DWORD APIENTRY
  1024. MprAdminInterfaceTransportSetInfo(
  1025. IN MPR_SERVER_HANDLE hMprServer,
  1026. IN HANDLE hInterface,
  1027. IN DWORD dwTransportId,
  1028. IN LPBYTE pInterfaceInfo,
  1029. IN DWORD dwInterfaceInfoSize
  1030. );
  1031. DWORD APIENTRY
  1032. MprAdminInterfaceEnum(
  1033. IN MPR_SERVER_HANDLE hMprServer,
  1034. IN DWORD dwLevel,
  1035. OUT LPBYTE * lplpbBuffer,
  1036. IN DWORD dwPrefMaxLen,
  1037. OUT LPDWORD lpdwEntriesRead,
  1038. OUT LPDWORD lpdwTotalEntries,
  1039. IN LPDWORD lpdwResumeHandle OPTIONAL
  1040. );
  1041. DWORD APIENTRY
  1042. MprSetupIpInIpInterfaceFriendlyNameEnum(
  1043. IN PWCHAR pwszMachineName,
  1044. OUT LPBYTE* lplpBuffer,
  1045. OUT LPDWORD lpdwEntriesRead
  1046. );
  1047. DWORD APIENTRY
  1048. MprSetupIpInIpInterfaceFriendlyNameFree(
  1049. IN LPVOID lpBuffer
  1050. );
  1051. DWORD APIENTRY
  1052. MprSetupIpInIpInterfaceFriendlyNameCreate(
  1053. PWCHAR pwszMachineName,
  1054. PMPR_IPINIP_INTERFACE_0 pNameInformation
  1055. );
  1056. DWORD APIENTRY
  1057. MprSetupIpInIpInterfaceFriendlyNameDelete(
  1058. IN PWCHAR pwszMachineName,
  1059. IN GUID *pGuid
  1060. );
  1061. DWORD APIENTRY
  1062. MprAdminInterfaceSetCredentials(
  1063. IN LPWSTR lpwsServer OPTIONAL,
  1064. IN LPWSTR lpwsInterfaceName,
  1065. IN LPWSTR lpwsUserName OPTIONAL,
  1066. IN LPWSTR lpwsDomainName OPTIONAL,
  1067. IN LPWSTR lpwsPassword OPTIONAL
  1068. );
  1069. DWORD APIENTRY
  1070. MprAdminInterfaceGetCredentials(
  1071. IN LPWSTR lpwsServer OPTIONAL,
  1072. IN LPWSTR lpwsInterfaceName,
  1073. OUT LPWSTR lpwsUserName OPTIONAL,
  1074. OUT LPWSTR lpwsPassword OPTIONAL,
  1075. OUT LPWSTR lpwsDomainName OPTIONAL
  1076. );
  1077. #if(WINVER >= 0x0500)
  1078. DWORD APIENTRY
  1079. MprAdminInterfaceSetCredentialsEx(
  1080. IN MPR_SERVER_HANDLE hMprServer,
  1081. IN HANDLE hInterface,
  1082. IN DWORD dwLevel,
  1083. IN LPBYTE lpbBuffer
  1084. );
  1085. DWORD APIENTRY
  1086. MprAdminInterfaceGetCredentialsEx(
  1087. IN MPR_SERVER_HANDLE hMprServer,
  1088. IN HANDLE hInterface,
  1089. IN DWORD dwLevel,
  1090. OUT LPBYTE * lplpbBuffer
  1091. );
  1092. #endif /* WINVER >= 0x0500 */
  1093. DWORD APIENTRY
  1094. MprAdminInterfaceConnect(
  1095. IN MPR_SERVER_HANDLE hMprServer,
  1096. IN HANDLE hInterface,
  1097. IN HANDLE hEvent,
  1098. IN BOOL fSynchronous
  1099. );
  1100. DWORD APIENTRY
  1101. MprAdminInterfaceDisconnect(
  1102. IN MPR_SERVER_HANDLE hMprServer,
  1103. IN HANDLE hInterface
  1104. );
  1105. DWORD APIENTRY
  1106. MprAdminInterfaceUpdateRoutes(
  1107. IN MPR_SERVER_HANDLE hMprServer,
  1108. IN HANDLE hInterface,
  1109. IN DWORD dwProtocolId,
  1110. IN HANDLE hEvent
  1111. );
  1112. DWORD APIENTRY
  1113. MprAdminInterfaceQueryUpdateResult(
  1114. IN MPR_SERVER_HANDLE hMprServer,
  1115. IN HANDLE hInterface,
  1116. IN DWORD dwProtocolId,
  1117. OUT LPDWORD lpdwUpdateResult
  1118. );
  1119. DWORD APIENTRY
  1120. MprAdminInterfaceUpdatePhonebookInfo(
  1121. IN MPR_SERVER_HANDLE hMprServer,
  1122. IN HANDLE hInterface
  1123. );
  1124. #if(WINVER >= 0x0500)
  1125. DWORD APIENTRY
  1126. MprAdminRegisterConnectionNotification(
  1127. IN MPR_SERVER_HANDLE hMprServer,
  1128. IN HANDLE hEventNotification
  1129. );
  1130. DWORD APIENTRY
  1131. MprAdminDeregisterConnectionNotification(
  1132. IN MPR_SERVER_HANDLE hMprServer,
  1133. IN HANDLE hEventNotification
  1134. );
  1135. #endif /* WINVER >= 0x0500 */
  1136. //
  1137. // MIB APIs
  1138. //
  1139. DWORD APIENTRY
  1140. MprAdminMIBServerConnect(
  1141. IN LPWSTR lpwsServerName OPTIONAL,
  1142. OUT MIB_SERVER_HANDLE * phMibServer
  1143. );
  1144. VOID APIENTRY
  1145. MprAdminMIBServerDisconnect(
  1146. IN MIB_SERVER_HANDLE hMibServer
  1147. );
  1148. DWORD APIENTRY
  1149. MprAdminMIBEntryCreate(
  1150. IN MIB_SERVER_HANDLE hMibServer,
  1151. IN DWORD dwPid,
  1152. IN DWORD dwRoutingPid,
  1153. IN LPVOID lpEntry,
  1154. IN DWORD dwEntrySize
  1155. );
  1156. DWORD APIENTRY
  1157. MprAdminMIBEntryDelete(
  1158. IN MIB_SERVER_HANDLE hMibServer,
  1159. IN DWORD dwProtocolId,
  1160. IN DWORD dwRoutingPid,
  1161. IN LPVOID lpEntry,
  1162. IN DWORD dwEntrySize
  1163. );
  1164. DWORD APIENTRY
  1165. MprAdminMIBEntrySet(
  1166. IN MIB_SERVER_HANDLE hMibServer,
  1167. IN DWORD dwProtocolId,
  1168. IN DWORD dwRoutingPid,
  1169. IN LPVOID lpEntry,
  1170. IN DWORD dwEntrySize
  1171. );
  1172. DWORD APIENTRY
  1173. MprAdminMIBEntryGet(
  1174. IN MIB_SERVER_HANDLE hMibServer,
  1175. IN DWORD dwProtocolId,
  1176. IN DWORD dwRoutingPid,
  1177. IN LPVOID lpInEntry,
  1178. IN DWORD dwInEntrySize,
  1179. OUT LPVOID* lplpOutEntry,
  1180. OUT LPDWORD lpOutEntrySize
  1181. );
  1182. DWORD APIENTRY
  1183. MprAdminMIBEntryGetFirst(
  1184. IN MIB_SERVER_HANDLE hMibServer,
  1185. IN DWORD dwProtocolId,
  1186. IN DWORD dwRoutingPid,
  1187. IN LPVOID lpInEntry,
  1188. IN DWORD dwInEntrySize,
  1189. OUT LPVOID* lplpOutEntry,
  1190. OUT LPDWORD lpOutEntrySize
  1191. );
  1192. DWORD APIENTRY
  1193. MprAdminMIBEntryGetNext(
  1194. IN MIB_SERVER_HANDLE hMibServer,
  1195. IN DWORD dwProtocolId,
  1196. IN DWORD dwRoutingPid,
  1197. IN LPVOID lpInEntry,
  1198. IN DWORD dwInEntrySize,
  1199. OUT LPVOID* lplpOutEntry,
  1200. OUT LPDWORD lpOutEntrySize
  1201. );
  1202. DWORD APIENTRY
  1203. MprAdminMIBGetTrapInfo(
  1204. IN MIB_SERVER_HANDLE hMibServer,
  1205. IN DWORD dwProtocolId,
  1206. IN DWORD dwRoutingPid,
  1207. IN LPVOID lpInData,
  1208. IN DWORD dwInDataSize,
  1209. OUT LPVOID* lplpOutData,
  1210. IN OUT LPDWORD lpOutDataSize
  1211. );
  1212. DWORD APIENTRY
  1213. MprAdminMIBSetTrapInfo(
  1214. IN DWORD dwProtocolId,
  1215. IN DWORD dwRoutingPid,
  1216. IN HANDLE hEvent,
  1217. IN LPVOID lpInData,
  1218. IN DWORD dwInDataSize,
  1219. OUT LPVOID* lplpOutData,
  1220. IN OUT LPDWORD lpOutDataSize
  1221. );
  1222. DWORD APIENTRY
  1223. MprAdminMIBBufferFree(
  1224. IN LPVOID pBuffer
  1225. );
  1226. //
  1227. // Configuration APIs
  1228. //
  1229. DWORD APIENTRY
  1230. MprConfigServerInstall(
  1231. IN DWORD dwLevel,
  1232. IN PVOID pBuffer
  1233. );
  1234. DWORD APIENTRY
  1235. MprConfigServerConnect(
  1236. IN LPWSTR lpwsServerName,
  1237. OUT HANDLE* phMprConfig
  1238. );
  1239. VOID APIENTRY
  1240. MprConfigServerDisconnect(
  1241. IN HANDLE hMprConfig
  1242. );
  1243. DWORD APIENTRY
  1244. MprConfigServerRefresh(
  1245. IN HANDLE hMprConfig
  1246. );
  1247. DWORD APIENTRY
  1248. MprConfigBufferFree(
  1249. IN LPVOID pBuffer
  1250. );
  1251. DWORD APIENTRY
  1252. MprConfigServerGetInfo(
  1253. IN HANDLE hMprConfig,
  1254. IN DWORD dwLevel,
  1255. OUT LPBYTE * lplpbBuffer
  1256. );
  1257. DWORD APIENTRY
  1258. MprConfigServerBackup(
  1259. IN HANDLE hMprConfig,
  1260. IN LPWSTR lpwsPath
  1261. );
  1262. DWORD APIENTRY
  1263. MprConfigServerRestore(
  1264. IN HANDLE hMprConfig,
  1265. IN LPWSTR lpwsPath
  1266. );
  1267. DWORD APIENTRY
  1268. MprConfigTransportCreate(
  1269. IN HANDLE hMprConfig,
  1270. IN DWORD dwTransportId,
  1271. IN LPWSTR lpwsTransportName OPTIONAL,
  1272. IN LPBYTE pGlobalInfo,
  1273. IN DWORD dwGlobalInfoSize,
  1274. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  1275. IN DWORD dwClientInterfaceInfoSize OPTIONAL,
  1276. IN LPWSTR lpwsDLLPath,
  1277. OUT HANDLE* phRouterTransport
  1278. );
  1279. DWORD APIENTRY
  1280. MprConfigTransportDelete(
  1281. IN HANDLE hMprConfig,
  1282. IN HANDLE hRouterTransport
  1283. );
  1284. DWORD APIENTRY
  1285. MprConfigTransportGetHandle(
  1286. IN HANDLE hMprConfig,
  1287. IN DWORD dwTransportId,
  1288. OUT HANDLE* phRouterTransport
  1289. );
  1290. DWORD APIENTRY
  1291. MprConfigTransportSetInfo(
  1292. IN HANDLE hMprConfig,
  1293. IN HANDLE hRouterTransport,
  1294. IN LPBYTE pGlobalInfo OPTIONAL,
  1295. IN DWORD dwGlobalInfoSize OPTIONAL,
  1296. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  1297. IN DWORD dwClientInterfaceInfoSize OPTIONAL,
  1298. IN LPWSTR lpwsDLLPath OPTIONAL
  1299. );
  1300. DWORD APIENTRY
  1301. MprConfigTransportGetInfo(
  1302. IN HANDLE hMprConfig,
  1303. IN HANDLE hRouterTransport,
  1304. IN OUT LPBYTE* ppGlobalInfo OPTIONAL,
  1305. OUT LPDWORD lpdwGlobalInfoSize OPTIONAL,
  1306. IN OUT LPBYTE* ppClientInterfaceInfo OPTIONAL,
  1307. OUT LPDWORD lpdwClientInterfaceInfoSize OPTIONAL,
  1308. IN OUT LPWSTR* lplpwsDLLPath OPTIONAL
  1309. );
  1310. DWORD APIENTRY
  1311. MprConfigTransportEnum(
  1312. IN HANDLE hMprConfig,
  1313. IN DWORD dwLevel,
  1314. IN OUT LPBYTE* lplpBuffer,
  1315. IN DWORD dwPrefMaxLen,
  1316. OUT LPDWORD lpdwEntriesRead,
  1317. OUT LPDWORD lpdwTotalEntries,
  1318. IN OUT LPDWORD lpdwResumeHandle OPTIONAL
  1319. );
  1320. DWORD APIENTRY
  1321. MprConfigInterfaceCreate(
  1322. IN HANDLE hMprConfig,
  1323. IN DWORD dwLevel,
  1324. IN LPBYTE lpbBuffer,
  1325. OUT HANDLE* phRouterInterface
  1326. );
  1327. DWORD APIENTRY
  1328. MprConfigInterfaceDelete(
  1329. IN HANDLE hMprConfig,
  1330. IN HANDLE hRouterInterface
  1331. );
  1332. DWORD APIENTRY
  1333. MprConfigInterfaceGetHandle(
  1334. IN HANDLE hMprConfig,
  1335. IN LPWSTR lpwsInterfaceName,
  1336. OUT HANDLE* phRouterInterface
  1337. );
  1338. DWORD APIENTRY
  1339. MprConfigInterfaceGetInfo(
  1340. IN HANDLE hMprConfig,
  1341. IN HANDLE hRouterInterface,
  1342. IN DWORD dwLevel,
  1343. IN OUT LPBYTE* lplpBuffer,
  1344. OUT LPDWORD lpdwBufferSize
  1345. );
  1346. DWORD APIENTRY
  1347. MprConfigInterfaceSetInfo(
  1348. IN HANDLE hMprConfig,
  1349. IN HANDLE hRouterInterface,
  1350. IN DWORD dwLevel,
  1351. IN LPBYTE lpbBuffer
  1352. );
  1353. DWORD APIENTRY
  1354. MprConfigInterfaceEnum(
  1355. IN HANDLE hMprConfig,
  1356. IN DWORD dwLevel,
  1357. IN OUT LPBYTE* lplpBuffer,
  1358. IN DWORD dwPrefMaxLen,
  1359. OUT LPDWORD lpdwEntriesRead,
  1360. OUT LPDWORD lpdwTotalEntries,
  1361. IN OUT LPDWORD lpdwResumeHandle OPTIONAL
  1362. );
  1363. DWORD APIENTRY
  1364. MprConfigInterfaceTransportAdd(
  1365. IN HANDLE hMprConfig,
  1366. IN HANDLE hRouterInterface,
  1367. IN DWORD dwTransportId,
  1368. IN LPWSTR lpwsTransportName OPTIONAL,
  1369. IN LPBYTE pInterfaceInfo,
  1370. IN DWORD dwInterfaceInfoSize,
  1371. OUT HANDLE* phRouterIfTransport
  1372. );
  1373. DWORD APIENTRY
  1374. MprConfigInterfaceTransportRemove(
  1375. IN HANDLE hMprConfig,
  1376. IN HANDLE hRouterInterface,
  1377. IN HANDLE hRouterIfTransport
  1378. );
  1379. DWORD APIENTRY
  1380. MprConfigInterfaceTransportGetHandle(
  1381. IN HANDLE hMprConfig,
  1382. IN HANDLE hRouterInterface,
  1383. IN DWORD dwTransportId,
  1384. OUT HANDLE* phRouterIfTransport
  1385. );
  1386. DWORD APIENTRY
  1387. MprConfigInterfaceTransportGetInfo(
  1388. IN HANDLE hMprConfig,
  1389. IN HANDLE hRouterInterface,
  1390. IN HANDLE hRouterIfTransport,
  1391. IN OUT LPBYTE* ppInterfaceInfo OPTIONAL,
  1392. OUT LPDWORD lpdwInterfaceInfoSize OPTIONAL
  1393. );
  1394. DWORD APIENTRY
  1395. MprConfigInterfaceTransportSetInfo(
  1396. IN HANDLE hMprConfig,
  1397. IN HANDLE hRouterInterface,
  1398. IN HANDLE hRouterIfTransport,
  1399. IN LPBYTE pInterfaceInfo OPTIONAL,
  1400. IN DWORD dwInterfaceInfoSize OPTIONAL
  1401. );
  1402. DWORD APIENTRY
  1403. MprConfigInterfaceTransportEnum(
  1404. IN HANDLE hMprConfig,
  1405. IN HANDLE hRouterInterface,
  1406. IN DWORD dwLevel,
  1407. IN OUT LPBYTE* lplpBuffer, // MPR_IFTRANSPORT_0
  1408. IN DWORD dwPrefMaxLen,
  1409. OUT LPDWORD lpdwEntriesRead,
  1410. OUT LPDWORD lpdwTotalEntries,
  1411. IN OUT LPDWORD lpdwResumeHandle OPTIONAL
  1412. );
  1413. DWORD APIENTRY
  1414. MprConfigGetFriendlyName(
  1415. IN HANDLE hMprConfig,
  1416. IN PWCHAR pszGuidName,
  1417. OUT PWCHAR pszBuffer,
  1418. IN DWORD dwBufferSize);
  1419. DWORD APIENTRY
  1420. MprConfigGetGuidName(
  1421. IN HANDLE hMprConfig,
  1422. IN PWCHAR pszFriendlyName,
  1423. OUT PWCHAR pszBuffer,
  1424. IN DWORD dwBufferSize);
  1425. //
  1426. // Information block APIs
  1427. //
  1428. DWORD APIENTRY
  1429. MprInfoCreate(
  1430. IN DWORD dwVersion,
  1431. OUT LPVOID* lplpNewHeader
  1432. );
  1433. DWORD APIENTRY
  1434. MprInfoDelete(
  1435. IN LPVOID lpHeader
  1436. );
  1437. DWORD APIENTRY
  1438. MprInfoRemoveAll(
  1439. IN LPVOID lpHeader,
  1440. OUT LPVOID* lplpNewHeader
  1441. );
  1442. DWORD APIENTRY
  1443. MprInfoDuplicate(
  1444. IN LPVOID lpHeader,
  1445. OUT LPVOID* lplpNewHeader
  1446. );
  1447. DWORD APIENTRY
  1448. MprInfoBlockAdd(
  1449. IN LPVOID lpHeader,
  1450. IN DWORD dwInfoType,
  1451. IN DWORD dwItemSize,
  1452. IN DWORD dwItemCount,
  1453. IN LPBYTE lpItemData,
  1454. OUT LPVOID* lplpNewHeader
  1455. );
  1456. DWORD APIENTRY
  1457. MprInfoBlockRemove(
  1458. IN LPVOID lpHeader,
  1459. IN DWORD dwInfoType,
  1460. OUT LPVOID* lplpNewHeader
  1461. );
  1462. DWORD APIENTRY
  1463. MprInfoBlockSet(
  1464. IN LPVOID lpHeader,
  1465. IN DWORD dwInfoType,
  1466. IN DWORD dwItemSize,
  1467. IN DWORD dwItemCount,
  1468. IN LPBYTE lpItemData,
  1469. OUT LPVOID* lplpNewHeader
  1470. );
  1471. DWORD APIENTRY
  1472. MprInfoBlockFind(
  1473. IN LPVOID lpHeader,
  1474. IN DWORD dwInfoType,
  1475. OUT LPDWORD lpdwItemSize, // OPTIONAL
  1476. OUT LPDWORD lpdwItemCount, // OPTIONAL
  1477. OUT LPBYTE* lplpItemData // OPTIONAL
  1478. );
  1479. DWORD APIENTRY
  1480. MprInfoBlockQuerySize(
  1481. IN LPVOID lpHeader
  1482. );
  1483. //
  1484. // BOOL APIENTRY
  1485. // MprInfoBlockExists(
  1486. // IN LPVOID lpHeader,
  1487. // IN DWORD dwInfoType
  1488. // );
  1489. //
  1490. #define MprInfoBlockExists(h,t) \
  1491. (MprInfoBlockFind((h),(t),NULL,NULL,NULL) == NO_ERROR)
  1492. #ifdef __cplusplus
  1493. }
  1494. #endif
  1495. //#endif /* WINVER >= 0x0403 */
  1496. #endif // __ROUTING_MPRADMIN_H__