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.

109 lines
2.0 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Module : parser_util.h
  4. //
  5. // Purpose : Header file for all utility functions used by the parser
  6. //
  7. // Developers Name : N.Surendra Sai / Vunnam Kondal Rao
  8. //
  9. // History :
  10. //
  11. // Date Author Comments
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #ifndef _PARSER_UTIL_H_
  15. #define _PARSER_UTIL_H_
  16. #include "nshipsec.h"
  17. #include "staticset.h"
  18. #define IKE_SSPI_NULL 0xFFFFFFFF
  19. //
  20. // String to Structure Converter Functions
  21. //
  22. DWORD
  23. ListToSecMethod(
  24. IN LPTSTR szText,
  25. IN OUT IPSEC_MM_OFFER &SecMethod
  26. );
  27. DWORD
  28. ListToCertAuths(
  29. IN LPTSTR szText,
  30. OUT INT_IPSEC_MM_AUTH_INFO &AuthInfo,
  31. IN PDWORD pdwAuthType
  32. );
  33. DWORD
  34. ListToOffer(
  35. IN LPTSTR szText,
  36. IN OUT IPSEC_QM_OFFER &Offer
  37. );
  38. DWORD
  39. TextToAlgoInfo(
  40. IN LPTSTR szText,
  41. OUT IPSEC_QM_ALGO &algoInfo
  42. );
  43. DWORD
  44. EncodeCertificateName (
  45. IN LPTSTR pszSubjectName,
  46. OUT LPBYTE *EncodedName,
  47. OUT PDWORD pEncodedNameLength
  48. );
  49. VOID
  50. LoadSecMethodDefaults(
  51. IN OUT IPSEC_MM_OFFER &SecMethod
  52. );
  53. VOID
  54. LoadQMOfferDefaults(
  55. IPSEC_QM_OFFER &offer
  56. );
  57. DWORD
  58. CheckForCertParamsAndRemove(
  59. IN OUT LPTSTR szText,
  60. OUT PBOOL pbCertMapSpecified,
  61. OUT PBOOL pbCertMap,
  62. OUT PBOOL pbCRPExclude
  63. );
  64. DWORD
  65. GenerateKerbAuthInfo(
  66. OUT STA_MM_AUTH_METHODS** ppInfo
  67. );
  68. DWORD
  69. GeneratePskAuthInfo(
  70. OUT STA_MM_AUTH_METHODS** ppInfo,
  71. IN LPTSTR lpKey
  72. );
  73. DWORD
  74. GenerateRootcaAuthInfo(
  75. OUT STA_MM_AUTH_METHODS** ppInfo,
  76. IN LPTSTR lpKey
  77. );
  78. DWORD
  79. FillAuthMethodInfo(
  80. IN PARSER_PKT* pParser,
  81. OUT PRULEDATA pRuleData);
  82. DWORD
  83. ProcessEscapedCharacters(wchar_t* lptString);
  84. DWORD
  85. AddAllAuthMethods(
  86. PRULEDATA pRuleData,
  87. PSTA_AUTH_METHODS pKerbAuth,
  88. PSTA_AUTH_METHODS pPskAuth,
  89. PSTA_MM_AUTH_METHODS *ppRootcaMMAuth,
  90. BOOL bAddDefaults
  91. );
  92. #endif //_PARSER_UTIL_H_