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.

157 lines
3.0 KiB

  1. #ifndef HEADER_POLPRN
  2. #define HEADER_POLPRN
  3. #include "spdcheck.h"
  4. #define MAX_STR_LEN 1024
  5. typedef struct _DNSIPADDR {
  6. LPTSTR pszDomainName;
  7. DWORD dwNumIpAddresses;
  8. PULONG puIpAddr;
  9. }DNSIPADDR, *PDNSIPADDR;
  10. typedef struct _FilterDNS {
  11. DWORD FilterSrcNameID;
  12. DWORD FilterDestNameID;
  13. } FILTERDNS, *PFILTERDNS;
  14. #define PROT_ID_ANY 0 // Protocol IDs
  15. #define PROT_ID_ICMP 1
  16. #define PROT_ID_TCP 6
  17. #define PROT_ID_EGP 8
  18. #define PROT_ID_UDP 17
  19. #define PROT_ID_HMP 20
  20. #define PROT_ID_XNS_IDP 22
  21. #define PROT_ID_RDP 27
  22. #define PROT_ID_RVD 66
  23. #define PROT_ID_RAW 255
  24. //Filter DNS IDs
  25. #define FILTER_MYADDRESS 111
  26. #define FILTER_ANYADDRESS 112
  27. #define FILTER_DNSADDRESS 113
  28. #define FILTER_IPADDRESS 114
  29. #define FILTER_IPSUBNET 115
  30. #define BUFFER_SIZE 2048
  31. //macros
  32. #define FreeP(_pzstr)\
  33. if(_pzstr){\
  34. free(_pzstr);\
  35. _pzstr = NULL;\
  36. }\
  37. //function prototypes
  38. /*
  39. VOID PrintPolicyList(
  40. IN PIPSEC_POLICY_DATA pPolicy,
  41. IN BOOL bVerb,
  42. IN BOOL bAssigned,
  43. IN BOOL bWide);
  44. VOID PrintRuleList(
  45. IN PIPSEC_NFA_DATA pIpsecNFAData,
  46. IN BOOL bVerb,
  47. IN BOOL bWide);
  48. */
  49. DWORD ConverWideToMultibyte(LPWSTR pwch, char **ppmbbuf);
  50. BOOL PrintAuthMethodsList(
  51. CHECKLIST *pcheckList,
  52. IN PIPSEC_AUTH_METHOD pIpsecAuthData);
  53. BOOL PrintNegPolDataList(
  54. IN PCHECKLIST pCheckList,
  55. IN PIPSEC_NEGPOL_DATA pIpsecNegPolData);
  56. BOOL CheckSoft(
  57. IN IPSEC_SECURITY_METHOD IpsecSecurityMethods);
  58. HRESULT FormatTime(
  59. IN time_t t,
  60. OUT LPTSTR pszTimeStr);
  61. VOID PrintSecurityMethodsTable(
  62. CHECKLIST* pcheckList,
  63. IN IPSEC_SECURITY_METHOD IpsecSecurityMethods);
  64. VOID PrintStorageInfoList(
  65. CHECKLIST* pcheckList,
  66. IN BOOL bDeleteAll);
  67. VOID PrintAlgoInfoTable(
  68. CHECKLIST* pcheckList,
  69. IN PIPSEC_ALGO_INFO Algos,
  70. IN DWORD dwNumAlgos);
  71. VOID PrintLifeTimeTable(
  72. CHECKLIST* pcheckList,
  73. IN LIFETIME LifeTime);
  74. /*VOID
  75. PrintSecurityMethodsList(
  76. IN IPSEC_SECURITY_METHOD IpsecSecurityMethods
  77. );
  78. VOID PrintAlgoInfoList(
  79. IN PIPSEC_ALGO_INFO Algos,
  80. IN DWORD dwNumAlgos);
  81. VOID PrintLifeTimeList(
  82. IN LIFETIME LifeTime);
  83. VOID PrintFilterDataList(
  84. IN PIPSEC_FILTER_DATA pIpsecFilterData,
  85. IN BOOL bVerb,
  86. IN BOOL bResolveDNS,
  87. IN BOOL bWide);
  88. */
  89. BOOL PrintFilterSpecList(
  90. CHECKLIST *pcheckList,
  91. IN PIPSEC_FILTER_SPEC pIpsecFilterSpec,
  92. IN PIPSEC_NFA_DATA pIpsecNFAData);
  93. VOID PrintResolveDNS(
  94. CHECKLIST * pcheckList,
  95. LPWSTR pszDNSName );
  96. VOID PrintProtocolNameList(
  97. CHECKLIST* pcheckList,
  98. DWORD dwProtocol);
  99. BOOL PrintISAKMPDataList(
  100. CHECKLIST* pcheckList,
  101. IN PIPSEC_ISAKMP_DATA pIpsecISAKMPData);
  102. VOID PrintISAKAMPSecurityMethodsList(
  103. CHECKLIST* pcheckList,
  104. IN CRYPTO_BUNDLE SecurityMethods);
  105. /*
  106. VOID PrintGPOList(
  107. CHECKLIST* pcheckList,
  108. IN PGPO pGPO);
  109. */
  110. VOID PrintIPAddrList(CHECKLIST* pcheckList, IN DWORD dwAddr);
  111. VOID PrintIPAddrDNS(
  112. CHECKLIST* pcheckList,
  113. IN DWORD dwAddr);
  114. VOID GetFilterDNSDetails(
  115. IN PIPSEC_FILTER_SPEC pFilterData,
  116. IN OUT PFILTERDNS pFilterDNS);
  117. #endif