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.

144 lines
2.0 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. spdutil.h
  7. FILE HISTORY:
  8. */
  9. #ifndef _HEADER_SPDUTILS_H
  10. #define _HEADER_SPDUTILS_H
  11. enum FILTER_TYPE
  12. {
  13. FILTER_TYPE_TRANSPORT,
  14. FILTER_TYPE_TUNNEL,
  15. FILTER_TYPE_ANY
  16. };
  17. typedef enum {
  18. QM_ALGO_AUTH = 0,
  19. QM_ALGO_ESP_CONF,
  20. QM_ALGO_ESP_INTEG
  21. } QM_ALGO_TYPE;
  22. struct ProtocolStringMap
  23. {
  24. DWORD dwProtocol;
  25. UINT nStringID;
  26. };
  27. extern const DWORD IPSM_PROTOCOL_TCP;
  28. extern const DWORD IPSM_PROTOCOL_UDP;
  29. extern const ProtocolStringMap c_ProtocolStringMap[];
  30. extern const int c_nProtocols;
  31. extern const TCHAR c_szSingleAddressMask[];
  32. void
  33. AddressToString(
  34. ADDR addr,
  35. CString * pst,
  36. BOOL * pfIsDnsName = NULL
  37. );
  38. void IpToString(
  39. ULONG ulIp,
  40. CString *pst
  41. );
  42. void BoolToString(
  43. BOOL bl,
  44. CString * pst
  45. );
  46. void InterfaceTypeToString(
  47. IF_TYPE ifType,
  48. CString * pst
  49. );
  50. void ProtocolToString(
  51. PROTOCOL protocol,
  52. CString * pst
  53. );
  54. void FilterFlagToString(
  55. FILTER_FLAG FltrFlag,
  56. CString * pst
  57. );
  58. void PortToString(
  59. PORT port,
  60. CString * pst
  61. );
  62. void DirectionToString
  63. (
  64. DWORD dwDir,
  65. CString * pst
  66. );
  67. void DoiEspAlgorithmToString
  68. (
  69. IPSEC_MM_ALGO algo,
  70. CString * pst
  71. );
  72. void DoiAuthAlgorithmToString
  73. (
  74. IPSEC_MM_ALGO algo,
  75. CString * pst
  76. );
  77. void MmAuthToString
  78. (
  79. MM_AUTH_ENUM auth,
  80. CString * pst
  81. );
  82. void KeyLifetimeToString
  83. (
  84. KEY_LIFETIME lifetime,
  85. CString * pst
  86. );
  87. void DhGroupToString
  88. (
  89. DWORD dwGp,
  90. CString * pst
  91. );
  92. void IpsecByteBlobToString
  93. (
  94. const IPSEC_BYTE_BLOB& blob,
  95. CString * pst
  96. );
  97. class CQmOffer;
  98. void QmAlgorithmToString
  99. (
  100. QM_ALGO_TYPE type,
  101. CQmOffer * pOffer,
  102. CString * pst
  103. );
  104. void TnlEpToString
  105. (
  106. QM_FILTER_TYPE FltrType,
  107. ADDR TnlEp,
  108. CString * pst
  109. );
  110. void TnlEpToString
  111. (
  112. FILTER_TYPE FltrType,
  113. ADDR TnlEp,
  114. CString * pst
  115. );
  116. #endif