Source code of Windows XP (NT5)
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.

1791 lines
48 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 0xC123
  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. typedef struct _RAS_CONNECTION_0
  623. {
  624. OUT HANDLE hConnection;
  625. OUT HANDLE hInterface;
  626. OUT DWORD dwConnectDuration; // In seconds
  627. OUT ROUTER_INTERFACE_TYPE dwInterfaceType;
  628. OUT DWORD dwConnectionFlags;
  629. OUT WCHAR wszInterfaceName[ MAX_INTERFACE_NAME_LEN + 1 ];
  630. OUT WCHAR wszUserName[ UNLEN + 1 ];
  631. OUT WCHAR wszLogonDomain[ DNLEN + 1 ];
  632. OUT WCHAR wszRemoteComputer[ NETBIOS_NAME_LEN + 1 ];
  633. }
  634. RAS_CONNECTION_0, *PRAS_CONNECTION_0;
  635. typedef struct _RAS_CONNECTION_1
  636. {
  637. OUT HANDLE hConnection;
  638. OUT HANDLE hInterface;
  639. OUT PPP_INFO PppInfo;
  640. OUT DWORD dwBytesXmited;
  641. OUT DWORD dwBytesRcved;
  642. OUT DWORD dwFramesXmited;
  643. OUT DWORD dwFramesRcved;
  644. OUT DWORD dwCrcErr;
  645. OUT DWORD dwTimeoutErr;
  646. OUT DWORD dwAlignmentErr;
  647. OUT DWORD dwHardwareOverrunErr;
  648. OUT DWORD dwFramingErr;
  649. OUT DWORD dwBufferOverrunErr;
  650. OUT DWORD dwCompressionRatioIn;
  651. OUT DWORD dwCompressionRatioOut;
  652. }
  653. RAS_CONNECTION_1, *PRAS_CONNECTION_1;
  654. #if(WINVER >= 0x0500)
  655. typedef struct _RAS_CONNECTION_2
  656. {
  657. OUT HANDLE hConnection;
  658. OUT WCHAR wszUserName[ UNLEN + 1 ];
  659. OUT ROUTER_INTERFACE_TYPE dwInterfaceType;
  660. OUT GUID guid;
  661. OUT PPP_INFO_2 PppInfo2;
  662. }
  663. RAS_CONNECTION_2, *PRAS_CONNECTION_2;
  664. #endif /* WINVER >= 0x0500 */
  665. //
  666. // Structures used by the MPRADMIN USER APIs. Use level 0 to get/set this
  667. // structure.
  668. //
  669. //
  670. // Bits indicating user's Remote Access privileges and mask to isolate
  671. // call back privilege.
  672. //
  673. // Note: Bit 0 MUST represent NoCallback due to a quirk of the "userparms"
  674. // storage method. When a new LAN Manager user is created, bit 0 of the
  675. // userparms field is set to 1 and all other bits are 0. These bits are
  676. // arranged so this "no Dial-In info" state maps to the "default Dial-In
  677. // privilege" state.
  678. #define RASPRIV_NoCallback 0x01
  679. #define RASPRIV_AdminSetCallback 0x02
  680. #define RASPRIV_CallerSetCallback 0x04
  681. #define RASPRIV_DialinPrivilege 0x08
  682. //
  683. // The following are flags for the bfPrivilege2 member of RAS_USER_1
  684. // structure
  685. //
  686. #define RASPRIV2_DialinPolicy 0x1
  687. #define RASPRIV_CallbackType (RASPRIV_AdminSetCallback \
  688. | RASPRIV_CallerSetCallback \
  689. | RASPRIV_NoCallback)
  690. typedef struct _RAS_USER_0
  691. {
  692. OUT BYTE bfPrivilege;
  693. OUT WCHAR wszPhoneNumber[ MAX_PHONE_NUMBER_LEN + 1];
  694. }
  695. RAS_USER_0, *PRAS_USER_0;
  696. typedef struct _RAS_USER_1
  697. {
  698. OUT BYTE bfPrivilege;
  699. OUT WCHAR wszPhoneNumber[ MAX_PHONE_NUMBER_LEN + 1];
  700. OUT BYTE bfPrivilege2;
  701. }
  702. RAS_USER_1, *PRAS_USER_1;
  703. //
  704. // Used as RPC binding handle to server
  705. //
  706. typedef HANDLE RAS_SERVER_HANDLE;
  707. typedef HANDLE MPR_SERVER_HANDLE;
  708. typedef HANDLE MIB_SERVER_HANDLE;
  709. //
  710. // RAS ADMIN APIs
  711. //
  712. DWORD APIENTRY
  713. MprAdminConnectionEnum(
  714. IN RAS_SERVER_HANDLE hRasServer,
  715. IN DWORD dwLevel,
  716. OUT LPBYTE * lplpbBuffer,
  717. IN DWORD dwPrefMaxLen,
  718. OUT LPDWORD lpdwEntriesRead,
  719. OUT LPDWORD lpdwTotalEntries,
  720. IN LPDWORD lpdwResumeHandle OPTIONAL
  721. );
  722. DWORD APIENTRY
  723. MprAdminPortEnum(
  724. IN RAS_SERVER_HANDLE hRasServer,
  725. IN DWORD dwLevel,
  726. IN HANDLE hConnection,
  727. OUT LPBYTE * lplpbBuffer,
  728. IN DWORD dwPrefMaxLen,
  729. OUT LPDWORD lpdwEntriesRead,
  730. OUT LPDWORD lpdwTotalEntries,
  731. IN LPDWORD lpdwResumeHandle OPTIONAL
  732. );
  733. DWORD APIENTRY
  734. MprAdminConnectionGetInfo(
  735. IN RAS_SERVER_HANDLE hRasServer,
  736. IN DWORD dwLevel,
  737. IN HANDLE hConnection,
  738. OUT LPBYTE * lplpbBuffer
  739. );
  740. DWORD APIENTRY
  741. MprAdminPortGetInfo(
  742. IN RAS_SERVER_HANDLE hRasServer,
  743. IN DWORD dwLevel,
  744. IN HANDLE hPort,
  745. OUT LPBYTE * lplpbBuffer
  746. );
  747. DWORD APIENTRY
  748. MprAdminConnectionClearStats(
  749. IN RAS_SERVER_HANDLE hRasServer,
  750. IN HANDLE hConnection
  751. );
  752. DWORD APIENTRY
  753. MprAdminPortClearStats(
  754. IN RAS_SERVER_HANDLE hRasServer,
  755. IN HANDLE hPort
  756. );
  757. DWORD APIENTRY
  758. MprAdminPortReset(
  759. IN RAS_SERVER_HANDLE hRasServer,
  760. IN HANDLE hPort
  761. );
  762. DWORD APIENTRY
  763. MprAdminPortDisconnect(
  764. IN RAS_SERVER_HANDLE hRasServer,
  765. IN HANDLE hPort
  766. );
  767. BOOL APIENTRY
  768. MprAdminAcceptNewConnection(
  769. IN RAS_CONNECTION_0 * pRasConnection0,
  770. IN RAS_CONNECTION_1 * pRasConnection1
  771. );
  772. #if(WINVER >= 0x0500)
  773. BOOL APIENTRY
  774. MprAdminAcceptNewConnection2(
  775. IN RAS_CONNECTION_0 * pRasConnection0,
  776. IN RAS_CONNECTION_1 * pRasConnection1,
  777. IN RAS_CONNECTION_2 * pRasConnection2
  778. );
  779. #endif /* WINVER >= 0x0500 */
  780. BOOL APIENTRY
  781. MprAdminAcceptNewLink (
  782. IN RAS_PORT_0 * pRasPort0,
  783. IN RAS_PORT_1 * pRasPort1
  784. );
  785. VOID APIENTRY
  786. MprAdminConnectionHangupNotification(
  787. IN RAS_CONNECTION_0 * pRasConnection0,
  788. IN RAS_CONNECTION_1 * pRasConnection1
  789. );
  790. #if(WINVER >= 0x0500)
  791. VOID APIENTRY
  792. MprAdminConnectionHangupNotification2(
  793. IN RAS_CONNECTION_0 * pRasConnection0,
  794. IN RAS_CONNECTION_1 * pRasConnection1,
  795. IN RAS_CONNECTION_2 * pRasConnection2
  796. );
  797. #endif /* WINVER >= 0x0500 */
  798. VOID APIENTRY
  799. MprAdminLinkHangupNotification (
  800. IN RAS_PORT_0 * pRasPort0,
  801. IN RAS_PORT_1 * pRasPort1
  802. );
  803. DWORD APIENTRY
  804. MprAdminGetIpAddressForUser (
  805. IN WCHAR * lpwszUserName,
  806. IN WCHAR * lpwszPortName,
  807. IN OUT DWORD * lpdwIpAddress,
  808. OUT BOOL * bNotifyRelease
  809. );
  810. VOID APIENTRY
  811. MprAdminReleaseIpAddress (
  812. IN WCHAR * lpszUserName,
  813. IN WCHAR * lpszPortName,
  814. IN DWORD * lpdwIpAddress
  815. );
  816. #if(WINVER >= 0x0500)
  817. DWORD APIENTRY
  818. MprAdminInitializeDll(
  819. VOID
  820. );
  821. DWORD APIENTRY
  822. MprAdminTerminateDll(
  823. VOID
  824. );
  825. #endif
  826. //
  827. // MprAdminUser APIs
  828. //
  829. DWORD APIENTRY
  830. MprAdminUserGetInfo(
  831. IN const WCHAR * lpszServer,
  832. IN const WCHAR * lpszUser,
  833. IN DWORD dwLevel,
  834. OUT LPBYTE lpbBuffer
  835. );
  836. DWORD APIENTRY
  837. MprAdminUserSetInfo(
  838. IN const WCHAR * lpszServer,
  839. IN const WCHAR * lpszUser,
  840. IN DWORD dwLevel,
  841. IN const LPBYTE lpbBuffer
  842. );
  843. #if(WINVER >= 0x0500)
  844. DWORD APIENTRY
  845. MprAdminSendUserMessage(
  846. IN MPR_SERVER_HANDLE hMprServer,
  847. IN HANDLE hConnection,
  848. IN LPWSTR lpwszMessage
  849. );
  850. #endif /* WINVER >= 0x0500 */
  851. DWORD APIENTRY
  852. MprAdminGetPDCServer(
  853. IN const WCHAR * lpszDomain,
  854. IN const WCHAR * lpszServer,
  855. OUT LPWSTR lpszPDCServer
  856. );
  857. //
  858. // Router APIs
  859. //
  860. BOOL APIENTRY
  861. MprAdminIsServiceRunning(
  862. IN LPWSTR lpwsServerName
  863. );
  864. DWORD APIENTRY
  865. MprAdminServerConnect(
  866. IN LPWSTR lpwsServerName OPTIONAL,
  867. OUT MPR_SERVER_HANDLE * phMprServer
  868. );
  869. VOID APIENTRY
  870. MprAdminServerDisconnect(
  871. IN MPR_SERVER_HANDLE hMprServer
  872. );
  873. #if (WINVER >= 0x501)
  874. DWORD APIENTRY
  875. MprAdminServerGetCredentials(
  876. IN MPR_SERVER_HANDLE hMprServer,
  877. IN DWORD dwLevel,
  878. IN LPBYTE * lplpbBuffer
  879. );
  880. DWORD APIENTRY
  881. MprAdminServerSetCredentials(
  882. IN MPR_SERVER_HANDLE hMprServer,
  883. IN DWORD dwLevel,
  884. IN LPBYTE lpbBuffer
  885. );
  886. #endif
  887. DWORD APIENTRY
  888. MprAdminBufferFree(
  889. IN LPVOID pBuffer
  890. );
  891. DWORD APIENTRY
  892. MprAdminGetErrorString(
  893. IN DWORD dwError,
  894. OUT LPWSTR * lpwsErrorString
  895. );
  896. DWORD APIENTRY
  897. MprAdminServerGetInfo(
  898. IN MPR_SERVER_HANDLE hMprServer,
  899. IN DWORD dwLevel,
  900. OUT LPBYTE * lplpbBuffer
  901. );
  902. #if(WINVER >= 0x0500)
  903. DWORD APIENTRY
  904. MprAdminTransportCreate(
  905. IN MPR_SERVER_HANDLE hMprServer,
  906. IN DWORD dwTransportId,
  907. IN LPWSTR lpwsTransportName OPTIONAL,
  908. IN LPBYTE pGlobalInfo,
  909. IN DWORD dwGlobalInfoSize,
  910. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  911. IN DWORD dwClientInterfaceInfoSize OPTIONAL,
  912. IN LPWSTR lpwsDLLPath
  913. );
  914. #endif /* WINVER >= 0x0500 */
  915. DWORD APIENTRY
  916. MprAdminTransportSetInfo(
  917. IN MPR_SERVER_HANDLE hMprServer,
  918. IN DWORD dwTransportId,
  919. IN LPBYTE pGlobalInfo OPTIONAL,
  920. IN DWORD dwGlobalInfoSize,
  921. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  922. IN DWORD dwClientInterfaceInfoSize
  923. );
  924. DWORD APIENTRY
  925. MprAdminTransportGetInfo(
  926. IN MPR_SERVER_HANDLE hMprServer,
  927. IN DWORD dwTransportId,
  928. OUT LPBYTE * ppGlobalInfo OPTIONAL,
  929. OUT LPDWORD lpdwGlobalInfoSize OPTIONAL,
  930. OUT LPBYTE * ppClientInterfaceInfo OPTIONAL,
  931. OUT LPDWORD lpdwClientInterfaceInfoSize OPTIONAL
  932. );
  933. #if(WINVER >= 0x0500)
  934. DWORD APIENTRY
  935. MprAdminDeviceEnum(
  936. IN MPR_SERVER_HANDLE hMprServer,
  937. IN DWORD dwLevel,
  938. OUT LPBYTE* lplpbBuffer,
  939. OUT LPDWORD lpdwTotalEntries);
  940. #endif /* WINVER >= 0x0500 */
  941. DWORD APIENTRY
  942. MprAdminInterfaceGetHandle(
  943. IN MPR_SERVER_HANDLE hMprServer,
  944. IN LPWSTR lpwsInterfaceName,
  945. OUT HANDLE * phInterface,
  946. IN BOOL fIncludeClientInterfaces
  947. );
  948. DWORD APIENTRY
  949. MprAdminInterfaceCreate(
  950. IN MPR_SERVER_HANDLE hMprServer,
  951. IN DWORD dwLevel,
  952. IN LPBYTE lpbBuffer,
  953. OUT HANDLE * phInterface
  954. );
  955. DWORD APIENTRY
  956. MprAdminInterfaceGetInfo(
  957. IN MPR_SERVER_HANDLE hMprServer,
  958. IN HANDLE hInterface,
  959. IN DWORD dwLevel,
  960. IN LPBYTE * lplpbBuffer
  961. );
  962. DWORD APIENTRY
  963. MprAdminInterfaceSetInfo(
  964. IN MPR_SERVER_HANDLE hMprServer,
  965. IN HANDLE hInterface,
  966. IN DWORD dwLevel,
  967. IN LPBYTE lpbBuffer
  968. );
  969. DWORD APIENTRY
  970. MprAdminInterfaceDelete(
  971. IN MPR_SERVER_HANDLE hMprServer,
  972. IN HANDLE hInterface
  973. );
  974. #if(WINVER >= 0x0500)
  975. DWORD APIENTRY
  976. MprAdminInterfaceDeviceGetInfo(
  977. IN MPR_SERVER_HANDLE hMprServer,
  978. IN HANDLE hInterface,
  979. IN DWORD dwIndex,
  980. IN DWORD dwLevel,
  981. OUT LPBYTE* lplpBuffer
  982. );
  983. DWORD APIENTRY
  984. MprAdminInterfaceDeviceSetInfo(
  985. IN MPR_SERVER_HANDLE hMprServer,
  986. IN HANDLE hInterface,
  987. IN DWORD dwIndex,
  988. IN DWORD dwLevel,
  989. IN LPBYTE lplpBuffer
  990. );
  991. #endif /* WINVER >= 0x0500 */
  992. DWORD APIENTRY
  993. MprAdminInterfaceTransportRemove(
  994. IN MPR_SERVER_HANDLE hMprServer,
  995. IN HANDLE hInterface,
  996. IN DWORD dwTransportId
  997. );
  998. DWORD APIENTRY
  999. MprAdminInterfaceTransportAdd(
  1000. IN MPR_SERVER_HANDLE hMprServer,
  1001. IN HANDLE hInterface,
  1002. IN DWORD dwTransportId,
  1003. IN LPBYTE pInterfaceInfo,
  1004. IN DWORD dwInterfaceInfoSize
  1005. );
  1006. DWORD APIENTRY
  1007. MprAdminInterfaceTransportGetInfo(
  1008. IN MPR_SERVER_HANDLE hMprServer,
  1009. IN HANDLE hInterface,
  1010. IN DWORD dwTransportId,
  1011. OUT LPBYTE * ppInterfaceInfo,
  1012. OUT LPDWORD lpdwpInterfaceInfoSize OPTIONAL
  1013. );
  1014. DWORD APIENTRY
  1015. MprAdminInterfaceTransportSetInfo(
  1016. IN MPR_SERVER_HANDLE hMprServer,
  1017. IN HANDLE hInterface,
  1018. IN DWORD dwTransportId,
  1019. IN LPBYTE pInterfaceInfo,
  1020. IN DWORD dwInterfaceInfoSize
  1021. );
  1022. DWORD APIENTRY
  1023. MprAdminInterfaceEnum(
  1024. IN MPR_SERVER_HANDLE hMprServer,
  1025. IN DWORD dwLevel,
  1026. OUT LPBYTE * lplpbBuffer,
  1027. IN DWORD dwPrefMaxLen,
  1028. OUT LPDWORD lpdwEntriesRead,
  1029. OUT LPDWORD lpdwTotalEntries,
  1030. IN LPDWORD lpdwResumeHandle OPTIONAL
  1031. );
  1032. DWORD APIENTRY
  1033. MprSetupIpInIpInterfaceFriendlyNameEnum(
  1034. IN PWCHAR pwszMachineName,
  1035. OUT LPBYTE* lplpBuffer,
  1036. OUT LPDWORD lpdwEntriesRead
  1037. );
  1038. DWORD APIENTRY
  1039. MprSetupIpInIpInterfaceFriendlyNameFree(
  1040. IN LPVOID lpBuffer
  1041. );
  1042. DWORD APIENTRY
  1043. MprSetupIpInIpInterfaceFriendlyNameCreate(
  1044. PWCHAR pwszMachineName,
  1045. PMPR_IPINIP_INTERFACE_0 pNameInformation
  1046. );
  1047. DWORD APIENTRY
  1048. MprSetupIpInIpInterfaceFriendlyNameDelete(
  1049. IN PWCHAR pwszMachineName,
  1050. IN GUID *pGuid
  1051. );
  1052. DWORD APIENTRY
  1053. MprAdminInterfaceSetCredentials(
  1054. IN LPWSTR lpwsServer OPTIONAL,
  1055. IN LPWSTR lpwsInterfaceName,
  1056. IN LPWSTR lpwsUserName OPTIONAL,
  1057. IN LPWSTR lpwsDomainName OPTIONAL,
  1058. IN LPWSTR lpwsPassword OPTIONAL
  1059. );
  1060. DWORD APIENTRY
  1061. MprAdminInterfaceGetCredentials(
  1062. IN LPWSTR lpwsServer OPTIONAL,
  1063. IN LPWSTR lpwsInterfaceName,
  1064. OUT LPWSTR lpwsUserName OPTIONAL,
  1065. OUT LPWSTR lpwsPassword OPTIONAL,
  1066. OUT LPWSTR lpwsDomainName OPTIONAL
  1067. );
  1068. #if(WINVER >= 0x0500)
  1069. DWORD APIENTRY
  1070. MprAdminInterfaceSetCredentialsEx(
  1071. IN MPR_SERVER_HANDLE hMprServer,
  1072. IN HANDLE hInterface,
  1073. IN DWORD dwLevel,
  1074. IN LPBYTE lpbBuffer
  1075. );
  1076. DWORD APIENTRY
  1077. MprAdminInterfaceGetCredentialsEx(
  1078. IN MPR_SERVER_HANDLE hMprServer,
  1079. IN HANDLE hInterface,
  1080. IN DWORD dwLevel,
  1081. OUT LPBYTE * lplpbBuffer
  1082. );
  1083. #endif /* WINVER >= 0x0500 */
  1084. DWORD APIENTRY
  1085. MprAdminInterfaceConnect(
  1086. IN MPR_SERVER_HANDLE hMprServer,
  1087. IN HANDLE hInterface,
  1088. IN HANDLE hEvent,
  1089. IN BOOL fSynchronous
  1090. );
  1091. DWORD APIENTRY
  1092. MprAdminInterfaceDisconnect(
  1093. IN MPR_SERVER_HANDLE hMprServer,
  1094. IN HANDLE hInterface
  1095. );
  1096. DWORD APIENTRY
  1097. MprAdminInterfaceUpdateRoutes(
  1098. IN MPR_SERVER_HANDLE hMprServer,
  1099. IN HANDLE hInterface,
  1100. IN DWORD dwProtocolId,
  1101. IN HANDLE hEvent
  1102. );
  1103. DWORD APIENTRY
  1104. MprAdminInterfaceQueryUpdateResult(
  1105. IN MPR_SERVER_HANDLE hMprServer,
  1106. IN HANDLE hInterface,
  1107. IN DWORD dwProtocolId,
  1108. OUT LPDWORD lpdwUpdateResult
  1109. );
  1110. DWORD APIENTRY
  1111. MprAdminInterfaceUpdatePhonebookInfo(
  1112. IN MPR_SERVER_HANDLE hMprServer,
  1113. IN HANDLE hInterface
  1114. );
  1115. #if(WINVER >= 0x0500)
  1116. DWORD APIENTRY
  1117. MprAdminRegisterConnectionNotification(
  1118. IN MPR_SERVER_HANDLE hMprServer,
  1119. IN HANDLE hEventNotification
  1120. );
  1121. DWORD APIENTRY
  1122. MprAdminDeregisterConnectionNotification(
  1123. IN MPR_SERVER_HANDLE hMprServer,
  1124. IN HANDLE hEventNotification
  1125. );
  1126. #endif /* WINVER >= 0x0500 */
  1127. //
  1128. // MIB APIs
  1129. //
  1130. DWORD APIENTRY
  1131. MprAdminMIBServerConnect(
  1132. IN LPWSTR lpwsServerName OPTIONAL,
  1133. OUT MIB_SERVER_HANDLE * phMibServer
  1134. );
  1135. VOID APIENTRY
  1136. MprAdminMIBServerDisconnect(
  1137. IN MIB_SERVER_HANDLE hMibServer
  1138. );
  1139. DWORD APIENTRY
  1140. MprAdminMIBEntryCreate(
  1141. IN MIB_SERVER_HANDLE hMibServer,
  1142. IN DWORD dwPid,
  1143. IN DWORD dwRoutingPid,
  1144. IN LPVOID lpEntry,
  1145. IN DWORD dwEntrySize
  1146. );
  1147. DWORD APIENTRY
  1148. MprAdminMIBEntryDelete(
  1149. IN MIB_SERVER_HANDLE hMibServer,
  1150. IN DWORD dwProtocolId,
  1151. IN DWORD dwRoutingPid,
  1152. IN LPVOID lpEntry,
  1153. IN DWORD dwEntrySize
  1154. );
  1155. DWORD APIENTRY
  1156. MprAdminMIBEntrySet(
  1157. IN MIB_SERVER_HANDLE hMibServer,
  1158. IN DWORD dwProtocolId,
  1159. IN DWORD dwRoutingPid,
  1160. IN LPVOID lpEntry,
  1161. IN DWORD dwEntrySize
  1162. );
  1163. DWORD APIENTRY
  1164. MprAdminMIBEntryGet(
  1165. IN MIB_SERVER_HANDLE hMibServer,
  1166. IN DWORD dwProtocolId,
  1167. IN DWORD dwRoutingPid,
  1168. IN LPVOID lpInEntry,
  1169. IN DWORD dwInEntrySize,
  1170. OUT LPVOID* lplpOutEntry,
  1171. OUT LPDWORD lpOutEntrySize
  1172. );
  1173. DWORD APIENTRY
  1174. MprAdminMIBEntryGetFirst(
  1175. IN MIB_SERVER_HANDLE hMibServer,
  1176. IN DWORD dwProtocolId,
  1177. IN DWORD dwRoutingPid,
  1178. IN LPVOID lpInEntry,
  1179. IN DWORD dwInEntrySize,
  1180. OUT LPVOID* lplpOutEntry,
  1181. OUT LPDWORD lpOutEntrySize
  1182. );
  1183. DWORD APIENTRY
  1184. MprAdminMIBEntryGetNext(
  1185. IN MIB_SERVER_HANDLE hMibServer,
  1186. IN DWORD dwProtocolId,
  1187. IN DWORD dwRoutingPid,
  1188. IN LPVOID lpInEntry,
  1189. IN DWORD dwInEntrySize,
  1190. OUT LPVOID* lplpOutEntry,
  1191. OUT LPDWORD lpOutEntrySize
  1192. );
  1193. DWORD APIENTRY
  1194. MprAdminMIBGetTrapInfo(
  1195. IN MIB_SERVER_HANDLE hMibServer,
  1196. IN DWORD dwProtocolId,
  1197. IN DWORD dwRoutingPid,
  1198. IN LPVOID lpInData,
  1199. IN DWORD dwInDataSize,
  1200. OUT LPVOID* lplpOutData,
  1201. IN OUT LPDWORD lpOutDataSize
  1202. );
  1203. DWORD APIENTRY
  1204. MprAdminMIBSetTrapInfo(
  1205. IN DWORD dwProtocolId,
  1206. IN DWORD dwRoutingPid,
  1207. IN HANDLE hEvent,
  1208. IN LPVOID lpInData,
  1209. IN DWORD dwInDataSize,
  1210. OUT LPVOID* lplpOutData,
  1211. IN OUT LPDWORD lpOutDataSize
  1212. );
  1213. DWORD APIENTRY
  1214. MprAdminMIBBufferFree(
  1215. IN LPVOID pBuffer
  1216. );
  1217. //
  1218. // Configuration APIs
  1219. //
  1220. DWORD APIENTRY
  1221. MprConfigServerInstall(
  1222. IN DWORD dwLevel,
  1223. IN PVOID pBuffer
  1224. );
  1225. DWORD APIENTRY
  1226. MprConfigServerConnect(
  1227. IN LPWSTR lpwsServerName,
  1228. OUT HANDLE* phMprConfig
  1229. );
  1230. VOID APIENTRY
  1231. MprConfigServerDisconnect(
  1232. IN HANDLE hMprConfig
  1233. );
  1234. DWORD APIENTRY
  1235. MprConfigServerRefresh(
  1236. IN HANDLE hMprConfig
  1237. );
  1238. DWORD APIENTRY
  1239. MprConfigBufferFree(
  1240. IN LPVOID pBuffer
  1241. );
  1242. DWORD APIENTRY
  1243. MprConfigServerGetInfo(
  1244. IN HANDLE hMprConfig,
  1245. IN DWORD dwLevel,
  1246. OUT LPBYTE * lplpbBuffer
  1247. );
  1248. DWORD APIENTRY
  1249. MprConfigServerBackup(
  1250. IN HANDLE hMprConfig,
  1251. IN LPWSTR lpwsPath
  1252. );
  1253. DWORD APIENTRY
  1254. MprConfigServerRestore(
  1255. IN HANDLE hMprConfig,
  1256. IN LPWSTR lpwsPath
  1257. );
  1258. DWORD APIENTRY
  1259. MprConfigTransportCreate(
  1260. IN HANDLE hMprConfig,
  1261. IN DWORD dwTransportId,
  1262. IN LPWSTR lpwsTransportName OPTIONAL,
  1263. IN LPBYTE pGlobalInfo,
  1264. IN DWORD dwGlobalInfoSize,
  1265. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  1266. IN DWORD dwClientInterfaceInfoSize OPTIONAL,
  1267. IN LPWSTR lpwsDLLPath,
  1268. OUT HANDLE* phRouterTransport
  1269. );
  1270. DWORD APIENTRY
  1271. MprConfigTransportDelete(
  1272. IN HANDLE hMprConfig,
  1273. IN HANDLE hRouterTransport
  1274. );
  1275. DWORD APIENTRY
  1276. MprConfigTransportGetHandle(
  1277. IN HANDLE hMprConfig,
  1278. IN DWORD dwTransportId,
  1279. OUT HANDLE* phRouterTransport
  1280. );
  1281. DWORD APIENTRY
  1282. MprConfigTransportSetInfo(
  1283. IN HANDLE hMprConfig,
  1284. IN HANDLE hRouterTransport,
  1285. IN LPBYTE pGlobalInfo OPTIONAL,
  1286. IN DWORD dwGlobalInfoSize OPTIONAL,
  1287. IN LPBYTE pClientInterfaceInfo OPTIONAL,
  1288. IN DWORD dwClientInterfaceInfoSize OPTIONAL,
  1289. IN LPWSTR lpwsDLLPath OPTIONAL
  1290. );
  1291. DWORD APIENTRY
  1292. MprConfigTransportGetInfo(
  1293. IN HANDLE hMprConfig,
  1294. IN HANDLE hRouterTransport,
  1295. IN OUT LPBYTE* ppGlobalInfo OPTIONAL,
  1296. OUT LPDWORD lpdwGlobalInfoSize OPTIONAL,
  1297. IN OUT LPBYTE* ppClientInterfaceInfo OPTIONAL,
  1298. OUT LPDWORD lpdwClientInterfaceInfoSize OPTIONAL,
  1299. IN OUT LPWSTR* lplpwsDLLPath OPTIONAL
  1300. );
  1301. DWORD APIENTRY
  1302. MprConfigTransportEnum(
  1303. IN HANDLE hMprConfig,
  1304. IN DWORD dwLevel,
  1305. IN OUT LPBYTE* lplpBuffer,
  1306. IN DWORD dwPrefMaxLen,
  1307. OUT LPDWORD lpdwEntriesRead,
  1308. OUT LPDWORD lpdwTotalEntries,
  1309. IN OUT LPDWORD lpdwResumeHandle OPTIONAL
  1310. );
  1311. DWORD APIENTRY
  1312. MprConfigInterfaceCreate(
  1313. IN HANDLE hMprConfig,
  1314. IN DWORD dwLevel,
  1315. IN LPBYTE lpbBuffer,
  1316. OUT HANDLE* phRouterInterface
  1317. );
  1318. DWORD APIENTRY
  1319. MprConfigInterfaceDelete(
  1320. IN HANDLE hMprConfig,
  1321. IN HANDLE hRouterInterface
  1322. );
  1323. DWORD APIENTRY
  1324. MprConfigInterfaceGetHandle(
  1325. IN HANDLE hMprConfig,
  1326. IN LPWSTR lpwsInterfaceName,
  1327. OUT HANDLE* phRouterInterface
  1328. );
  1329. DWORD APIENTRY
  1330. MprConfigInterfaceGetInfo(
  1331. IN HANDLE hMprConfig,
  1332. IN HANDLE hRouterInterface,
  1333. IN DWORD dwLevel,
  1334. IN OUT LPBYTE* lplpBuffer,
  1335. OUT LPDWORD lpdwBufferSize
  1336. );
  1337. DWORD APIENTRY
  1338. MprConfigInterfaceSetInfo(
  1339. IN HANDLE hMprConfig,
  1340. IN HANDLE hRouterInterface,
  1341. IN DWORD dwLevel,
  1342. IN LPBYTE lpbBuffer
  1343. );
  1344. DWORD APIENTRY
  1345. MprConfigInterfaceEnum(
  1346. IN HANDLE hMprConfig,
  1347. IN DWORD dwLevel,
  1348. IN OUT LPBYTE* lplpBuffer,
  1349. IN DWORD dwPrefMaxLen,
  1350. OUT LPDWORD lpdwEntriesRead,
  1351. OUT LPDWORD lpdwTotalEntries,
  1352. IN OUT LPDWORD lpdwResumeHandle OPTIONAL
  1353. );
  1354. DWORD APIENTRY
  1355. MprConfigInterfaceTransportAdd(
  1356. IN HANDLE hMprConfig,
  1357. IN HANDLE hRouterInterface,
  1358. IN DWORD dwTransportId,
  1359. IN LPWSTR lpwsTransportName OPTIONAL,
  1360. IN LPBYTE pInterfaceInfo,
  1361. IN DWORD dwInterfaceInfoSize,
  1362. OUT HANDLE* phRouterIfTransport
  1363. );
  1364. DWORD APIENTRY
  1365. MprConfigInterfaceTransportRemove(
  1366. IN HANDLE hMprConfig,
  1367. IN HANDLE hRouterInterface,
  1368. IN HANDLE hRouterIfTransport
  1369. );
  1370. DWORD APIENTRY
  1371. MprConfigInterfaceTransportGetHandle(
  1372. IN HANDLE hMprConfig,
  1373. IN HANDLE hRouterInterface,
  1374. IN DWORD dwTransportId,
  1375. OUT HANDLE* phRouterIfTransport
  1376. );
  1377. DWORD APIENTRY
  1378. MprConfigInterfaceTransportGetInfo(
  1379. IN HANDLE hMprConfig,
  1380. IN HANDLE hRouterInterface,
  1381. IN HANDLE hRouterIfTransport,
  1382. IN OUT LPBYTE* ppInterfaceInfo OPTIONAL,
  1383. OUT LPDWORD lpdwInterfaceInfoSize OPTIONAL
  1384. );
  1385. DWORD APIENTRY
  1386. MprConfigInterfaceTransportSetInfo(
  1387. IN HANDLE hMprConfig,
  1388. IN HANDLE hRouterInterface,
  1389. IN HANDLE hRouterIfTransport,
  1390. IN LPBYTE pInterfaceInfo OPTIONAL,
  1391. IN DWORD dwInterfaceInfoSize OPTIONAL
  1392. );
  1393. DWORD APIENTRY
  1394. MprConfigInterfaceTransportEnum(
  1395. IN HANDLE hMprConfig,
  1396. IN HANDLE hRouterInterface,
  1397. IN DWORD dwLevel,
  1398. IN OUT LPBYTE* lplpBuffer, // MPR_IFTRANSPORT_0
  1399. IN DWORD dwPrefMaxLen,
  1400. OUT LPDWORD lpdwEntriesRead,
  1401. OUT LPDWORD lpdwTotalEntries,
  1402. IN OUT LPDWORD lpdwResumeHandle OPTIONAL
  1403. );
  1404. DWORD APIENTRY
  1405. MprConfigGetFriendlyName(
  1406. IN HANDLE hMprConfig,
  1407. IN PWCHAR pszGuidName,
  1408. OUT PWCHAR pszBuffer,
  1409. IN DWORD dwBufferSize);
  1410. DWORD APIENTRY
  1411. MprConfigGetGuidName(
  1412. IN HANDLE hMprConfig,
  1413. IN PWCHAR pszFriendlyName,
  1414. OUT PWCHAR pszBuffer,
  1415. IN DWORD dwBufferSize);
  1416. //
  1417. // Information block APIs
  1418. //
  1419. DWORD APIENTRY
  1420. MprInfoCreate(
  1421. IN DWORD dwVersion,
  1422. OUT LPVOID* lplpNewHeader
  1423. );
  1424. DWORD APIENTRY
  1425. MprInfoDelete(
  1426. IN LPVOID lpHeader
  1427. );
  1428. DWORD APIENTRY
  1429. MprInfoRemoveAll(
  1430. IN LPVOID lpHeader,
  1431. OUT LPVOID* lplpNewHeader
  1432. );
  1433. DWORD APIENTRY
  1434. MprInfoDuplicate(
  1435. IN LPVOID lpHeader,
  1436. OUT LPVOID* lplpNewHeader
  1437. );
  1438. DWORD APIENTRY
  1439. MprInfoBlockAdd(
  1440. IN LPVOID lpHeader,
  1441. IN DWORD dwInfoType,
  1442. IN DWORD dwItemSize,
  1443. IN DWORD dwItemCount,
  1444. IN LPBYTE lpItemData,
  1445. OUT LPVOID* lplpNewHeader
  1446. );
  1447. DWORD APIENTRY
  1448. MprInfoBlockRemove(
  1449. IN LPVOID lpHeader,
  1450. IN DWORD dwInfoType,
  1451. OUT LPVOID* lplpNewHeader
  1452. );
  1453. DWORD APIENTRY
  1454. MprInfoBlockSet(
  1455. IN LPVOID lpHeader,
  1456. IN DWORD dwInfoType,
  1457. IN DWORD dwItemSize,
  1458. IN DWORD dwItemCount,
  1459. IN LPBYTE lpItemData,
  1460. OUT LPVOID* lplpNewHeader
  1461. );
  1462. DWORD APIENTRY
  1463. MprInfoBlockFind(
  1464. IN LPVOID lpHeader,
  1465. IN DWORD dwInfoType,
  1466. OUT LPDWORD lpdwItemSize, // OPTIONAL
  1467. OUT LPDWORD lpdwItemCount, // OPTIONAL
  1468. OUT LPBYTE* lplpItemData // OPTIONAL
  1469. );
  1470. DWORD APIENTRY
  1471. MprInfoBlockQuerySize(
  1472. IN LPVOID lpHeader
  1473. );
  1474. //
  1475. // BOOL APIENTRY
  1476. // MprInfoBlockExists(
  1477. // IN LPVOID lpHeader,
  1478. // IN DWORD dwInfoType
  1479. // );
  1480. //
  1481. #define MprInfoBlockExists(h,t) \
  1482. (MprInfoBlockFind((h),(t),NULL,NULL,NULL) == NO_ERROR)
  1483. #ifdef __cplusplus
  1484. }
  1485. #endif
  1486. //#endif /* WINVER >= 0x0403 */
  1487. #endif // __ROUTING_MPRADMIN_H__