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.

101 lines
2.7 KiB

  1. //+---------------------------------------------------------------------------
  2. // SnPolicy - SafeNet Policy Configuration Library
  3. //
  4. // Copyright 2001 SafeNet, Inc.
  5. //
  6. // Description: Functions to get and set SafeNet IPSec policy attributes.
  7. //
  8. // HISTORY:
  9. //
  10. // 11-Oct-2001 KCW Modified to make calling convention, structure packing explicit.
  11. //
  12. //----------------------------------------------------------------------------
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. #if !(defined(SNPOLICY_H_INCLUDED))
  17. #define SNPOLICY_H_INCLUDED
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /************************* Embedded Include Headers. *************************/
  22. #include <windows.h>
  23. /**************************** Constant Definitions ***************************/
  24. //
  25. // Version Info
  26. //
  27. #define POLICY_MAJOR_VERSION 1
  28. #define POLICY_MINOR_VERSION 0
  29. //
  30. // Policy Attribute Types
  31. //
  32. #define SN_USELOGFILE ((LPCTSTR) 1)
  33. #define SN_AUTHMODE ((LPCTSTR) 2)
  34. #define SN_L2TPCERT ((LPCTSTR) 3)
  35. #define SN_L2TPPRESHR ((LPCTSTR) 4)
  36. //
  37. // SN_AUTHMODE authentication modes
  38. //
  39. #define SN_AUTOCERT 0
  40. #define SN_CERT 1
  41. #define SN_PRESHR 2
  42. /***************************** Macro Definitions *****************************/
  43. // Calling Convention
  44. #define SNPOLAPI __cdecl
  45. //
  46. // DLL Import/Export Definitions
  47. //
  48. #ifdef POLICY_DLL
  49. #define POLICY_FUNC _declspec (dllexport)
  50. #else
  51. #define POLICY_FUNC _declspec (dllimport)
  52. #endif
  53. /*************************** Structure Definitions ***************************/
  54. #include <pshpack8.h>
  55. //
  56. // Policy Function Table
  57. //
  58. typedef struct POLICY_FUNCS_V1_0_ {
  59. /* 1.0 functions. */
  60. BOOL (SNPOLAPI *SnPolicySet) (LPCTSTR szAttrId, const void *pvData);
  61. BOOL (SNPOLAPI *SnPolicyGet) (LPCTSTR szAttrId, const void *pvData, DWORD *pcbData);
  62. BOOL (SNPOLAPI *SnPolicyReload) (void);
  63. } POLICY_FUNCS_V1_0, *PPOLICY_FUNCS_V1_0;
  64. #include <poppack.h>
  65. /****************************** Type Definitions *****************************/
  66. typedef POLICY_FUNCS_V1_0 POLICY_FUNCS, *PPOLICY_FUNCS;
  67. typedef BOOL (*PPOLICYAPINEGOTIATOR) (DWORD *pMajorVersion, DWORD *pMinorVersion, POLICY_FUNCS *pApiFuncs);
  68. /************************** API Function Prototypes **************************/
  69. POLICY_FUNC BOOL SNPOLAPI SnPolicySet(LPCTSTR szAttrId, const void *pvData);
  70. POLICY_FUNC BOOL SNPOLAPI SnPolicyGet(LPCTSTR szAttrId, const void *pvData, DWORD *pcbData);
  71. POLICY_FUNC BOOL SNPOLAPI SnPolicyReload(void);
  72. POLICY_FUNC BOOL SNPOLAPI SnPolicyApiNegotiateVersion( DWORD *pMajorVersion, DWORD *pMinorVersion, POLICY_FUNCS *pPolicyFuncs);
  73. #if defined(__cplusplus)
  74. }
  75. #endif
  76. #endif // SNPOLICY_H_INCLUDED