home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / rasauth.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  8KB  |  191 lines

  1. /********************************************************************/
  2. /**               Copyright(c) 1997 Microsoft Corporation.           **/
  3. /********************************************************************/
  4.  
  5. //***
  6. //
  7. // Filename:    RASAUTH.H
  8. //
  9. // Description: Contains definitions to allow for third parties to plug in 
  10. //              back-end authenticaion modules into Remote Access Service.
  11. //
  12. #ifndef _RASAUTH_
  13. #define _RASAUTH_
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. typedef enum _RAS_AUTH_ATTRIBUTE_TYPE_
  20. {
  21.     raatMinimum = 0,                // Undefined
  22.     raatUserName,                   // Value field is a Pointer       
  23.     raatUserPassword,               // Value field is a Pointer       
  24.     raatMD5CHAPPassword,            // Value field is a Pointer       
  25.     raatNASIPAddress,               // Value field is a 32 bit integral value
  26.     raatNASPort,                    // Value field is a 32 bit integral value
  27.     raatServiceType,                // Value field is a 32 bit integral value
  28.     raatFramedProtocol,             // Value field is a 32 bit integral value
  29.     raatFramedIPAddress,            // Value field is a 32 bit integral value
  30.     raatFramedIPNetmask,            // Value field is a 32 bit integral value
  31.     raatFramedRouting,              // Value field is a 32 bit integral value
  32.     raatFilterId,                   // Value field is a Pointer       
  33.     raatFramedMTU,                  // Value field is a 32 bit integral value
  34.     raatFramedCompression,          // Value field is a 32 bit integral value
  35.     raatLoginIPHost,                // Value field is a 32 bit integral value
  36.     raatLoginService,               // Value field is a 32 bit integral value
  37.     raatLoginTCPPort,               // Value field is a 32 bit integral value
  38.     raatUnassigned1,                // Undefined
  39.     raatReplyMessage,               // Value field is a Pointer       
  40.     raatCallbackNumber,             // Value field is a Pointer       
  41.     raatCallbackId,                 // Value field is a Pointer       
  42.     raatUnassigned2,                // Undefined
  43.     raatFramedRoute,                // Value field is a Pointer       
  44.     raatFramedIPXNetwork,           // Value field is a 32 bit integral value
  45.     raatState,                      // Value field is a Pointer       
  46.     raatClass,                      // Value field is a Pointer       
  47.     raatVendorSpecific,             // Value field is a Pointer       
  48.     raatSessionTimeout,             // Value field is a 32 bit integral value
  49.     raatIdleTimeout,                // Value field is a 32 bit integral value
  50.     raatTerminationAction,          // Value field is a 32 bit integral value
  51.     raatCalledStationId,            // Value field is a Pointer       
  52.     raatCallingStationId,           // Value field is a Pointer       
  53.     raatNASIdentifier,              // Value field is a Pointer       
  54.     raatProxyState,                 // Value field is a Pointer       
  55.     raatLoginLATService,            // Value field is a Pointer       
  56.     raatLoginLATNode,               // Value field is a Pointer       
  57.     raatLoginLATGroup,              // Value field is a Pointer       
  58.     raatFramedAppleTalkLink,        // Value field is a 32 bit integral value
  59.     raatFramedAppleTalkNetwork,     // Value field is a 32 bit integral value
  60.     raatFramedAppleTalkZone,        // Value field is a Pointer       
  61.     raatAcctStatusType,             // Value field is a 32 bit integral value
  62.     raatAcctDelayType,              // Value field is a 32 bit integral value
  63.     raatAcctInputOctets,            // Value field is a 32 bit integral value
  64.     raatAcctOutputOctets,           // Value field is a 32 bit integral value
  65.     raatAcctSessionId,              // Value field is a Pointer       
  66.     raatAcctAuthentic,              // Value field is a 32 bit integral value
  67.     raatAcctSessionTime,            // Value field is a 32 bit integral value
  68.     raatAcctInputPackets,           // Value field is a 32 bit integral value
  69.     raatAcctOutputPackets,          // Value field is a 32 bit integral value
  70.     raatAcctTerminateCause,         // Value field is a 32 bit integral value
  71.     raatAcctMultiSessionId,         // Value field is a Pointer       
  72.     raatAcctLinkCount,              // Value field is a 32 bit integral value
  73.     raatMD5CHAPChallenge = 60,      // Value field is a Pointer       
  74.     raatNASPortType,                // Value field is a 32 bit integral value
  75.     raatPortLimit,                  // Value field is a 32 bit integral value
  76.     raatLoginLATPort,               // Value field is a Pointer       
  77.     raatPrompt,                     // Value field is a 32 bit integral value
  78.     raatConnectInfo,                // Value field is a Pointer       
  79.     raatSignature,                  // Value field is a Pointer       
  80.     raatEAPMessage,                 // Value field is a Pointer       
  81.     raatConfigurationToken,         // Value field is a Pointer       
  82.     raatPasswordRetry,              // Value field is a 32 bit integral value
  83.     raatARAPPassword,               // Value field is a Pointer       
  84.     raatARAPFeatures,               // Value field is a Pointer       
  85.     raatARAPZoneAccess,             // Value field is a 32 bit integral value
  86.     raatARAPSecurity,               // Value field is a 32 bit integral value
  87.     raatARAPSecurityData,           // Value field is a Pointer       
  88.     raatReserved        = (0xFFFFFFFF)      // Undefined
  89.  
  90. }RAS_AUTH_ATTRIBUTE_TYPE;
  91.  
  92. //
  93. // Value is set to the 32 bit integral value or a pointer to data.
  94. // 32 bit integral values should be in host format, not network format.
  95. // Length for a 32 bit integral value can be 1, 2 or 4. The array of 
  96. // attributes must be terminated with an attribute of type raatMinimum.
  97. //
  98.  
  99. typedef struct _RAS_AUTH_ATTRIBUTE 
  100. {
  101.     RAS_AUTH_ATTRIBUTE_TYPE raaType; 
  102.     DWORD                   dwLength;   
  103.     PVOID                   Value;    
  104.  
  105. }RAS_AUTH_ATTRIBUTE, *PRAS_AUTH_ATTRIBUTE;
  106.  
  107. //
  108. // The following APIs (except for RasStartAccounting and RasStopAccounting)
  109. // must be exported by the back-end authentication DLL
  110. //
  111.  
  112. //
  113. // Called from setup application to allow backend package to bring up UI to
  114. // configure itself.
  115. //
  116.  
  117. VOID APIENTRY
  118. RasAuthSetup(
  119.     VOID
  120. );
  121.  
  122. DWORD APIENTRY 
  123. RasAuthConfigChangeNotification(
  124.     VOID
  125. );
  126.  
  127. //
  128. // Called once before any other calls are made.
  129. //
  130.  
  131. DWORD APIENTRY
  132. RasAuthInitialize(
  133.     VOID
  134. );
  135.  
  136. //
  137. // Called once to deallocate resources etc. No more calls will be made before
  138. // calling RasAuthInitialize again
  139. //
  140.  
  141. DWORD APIENTRY
  142. RasAuthTerminate(
  143.     VOID
  144. );
  145.  
  146. //
  147. // Called once per multilink connection, not per link.
  148. //
  149.  
  150. DWORD APIENTRY
  151. RasStartAccounting(
  152.     IN  RAS_AUTH_ATTRIBUTE *    pInAttributes,
  153.     OUT PRAS_AUTH_ATTRIBUTE *   ppOutAttributes
  154. );
  155.  
  156. //
  157. // Called once per multilink connection, not per link.
  158. //
  159.  
  160. DWORD APIENTRY
  161. RasStopAccounting(
  162.     IN  RAS_AUTH_ATTRIBUTE *    pInAttributes,
  163.     OUT PRAS_AUTH_ATTRIBUTE *   ppOutAttributes
  164. );
  165.  
  166. //
  167. // Called to authenticate a dialed in user. 
  168. //
  169.  
  170. DWORD APIENTRY
  171. RasAuthenticateUser(
  172.     IN  RAS_AUTH_ATTRIBUTE *    pInAttributes,
  173.     OUT PRAS_AUTH_ATTRIBUTE *   ppOutAttributes,
  174.     OUT DWORD *                 lpdwResultCode
  175. );
  176.  
  177. //
  178. // Called to free attributes allocated by the back-end module
  179. //
  180.  
  181. DWORD APIENTRY
  182. RasFreeAttributes(
  183.     IN  RAS_AUTH_ATTRIBUTE *    pAttributes
  184. );
  185.  
  186. #ifdef __cplusplus
  187. }
  188. #endif
  189.  
  190. #endif
  191.