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.

194 lines
3.7 KiB

  1. DWORD
  2. OpenDirectoryServerHandle(
  3. LPWSTR pszDomainName,
  4. DWORD dwPortNumber,
  5. HLDAP * phLdapBindHandle
  6. );
  7. DWORD
  8. CloseDirectoryServerHandle(
  9. HLDAP hLdapBindHandle
  10. );
  11. DWORD
  12. ReadPolicyObjectFromDirectory(
  13. HLDAP hLdapBindHandle,
  14. LPWSTR pszPolicyDN,
  15. PIPSEC_POLICY_OBJECT * ppIpsecPolicyObject
  16. );
  17. DWORD
  18. ReadNFAObjectsFromDirectory(
  19. HLDAP hLdapBindHandle,
  20. LPWSTR pszIpsecRootContainer,
  21. LPWSTR pszIpsecOwnerReference,
  22. LPWSTR * ppszNFADNs,
  23. DWORD dwNumNfaObjects,
  24. PIPSEC_NFA_OBJECT ** pppIpsecNFAObjects,
  25. PDWORD pdwNumNfaObjects,
  26. LPWSTR ** pppszFilterReferences,
  27. PDWORD pdwNumFilterReferences,
  28. LPWSTR ** pppszNegPolReferences,
  29. PDWORD pdwNumNegPolReferences
  30. );
  31. DWORD
  32. GenerateNFAQuery(
  33. LPWSTR * ppszNFADNs,
  34. DWORD dwNumNFAObjects,
  35. LPWSTR * ppszQueryBuffer
  36. );
  37. DWORD
  38. AppendCommonNameToQuery(
  39. LPWSTR szQueryBuffer,
  40. LPWSTR szCommonName
  41. );
  42. DWORD
  43. ComputePrelimCN(
  44. LPWSTR szNFADN,
  45. LPWSTR szCommonName
  46. );
  47. DWORD
  48. UnMarshallPolicyObject(
  49. HLDAP hLdapBindHandle,
  50. LPWSTR pszPolicyDN,
  51. PIPSEC_POLICY_OBJECT * ppIpsecPolicyObject,
  52. LDAPMessage *res
  53. );
  54. DWORD
  55. UnMarshallNFAObject(
  56. HLDAP hLdapBindHandle,
  57. LDAPMessage *e,
  58. PIPSEC_NFA_OBJECT * ppIpsecNFAObject,
  59. LPWSTR * ppszFilterReference,
  60. LPWSTR * ppszNegPolReference
  61. );
  62. DWORD
  63. GenerateISAKMPQuery(
  64. LPWSTR * ppszISAKMPDNs,
  65. DWORD dwNumISAKMPObjects,
  66. LPWSTR * ppszQueryBuffer
  67. );
  68. DWORD
  69. UnMarshallISAKMPObject(
  70. HLDAP hLdapBindHandle,
  71. LDAPMessage *e,
  72. PIPSEC_ISAKMP_OBJECT * ppIpsecISAKMPObject
  73. );
  74. DWORD
  75. ReadISAKMPObjectsFromDirectory(
  76. HLDAP hLdapBindHandle,
  77. LPWSTR pszIpsecRootContainer,
  78. LPWSTR * ppszISAKMPDNs,
  79. DWORD dwNumISAKMPObjects,
  80. PIPSEC_ISAKMP_OBJECT ** pppIpsecISAKMPObjects,
  81. PDWORD pdwNumISAKMPObjects
  82. );
  83. typedef struct _ldapobject
  84. {
  85. union {
  86. WCHAR *strVals;
  87. struct berval *bVals;
  88. } val;
  89. } LDAPOBJECT, *PLDAPOBJECT;
  90. #define LDAPOBJECT_STRING(pldapobject) ((pldapobject)->val.strVals)
  91. #define LDAPOBJECT_BERVAL(pldapobject) ((pldapobject)->val.bVals)
  92. #define LDAPOBJECT_BERVAL_VAL(pldapobject) ((pldapobject)->val.bVals->bv_val)
  93. #define LDAPOBJECT_BERVAL_LEN(pldapobject) ((pldapobject)->val.bVals->bv_len)
  94. void
  95. FreeIpsecNFAObject(
  96. PIPSEC_NFA_OBJECT pIpsecNFAObject
  97. );
  98. void
  99. FreeIpsecPolicyObject(
  100. PIPSEC_POLICY_OBJECT pIpsecPolicyObject
  101. );
  102. DWORD
  103. UnMarshallFilterObject(
  104. HLDAP hLdapBindHandle,
  105. LDAPMessage *e,
  106. PIPSEC_FILTER_OBJECT * ppIpsecFilterObject
  107. );
  108. void
  109. FreeIpsecFilterObject(
  110. PIPSEC_FILTER_OBJECT pIpsecFilterObject
  111. );
  112. DWORD
  113. UnMarshallNegPolObject(
  114. HLDAP hLdapBindHandle,
  115. LDAPMessage *e,
  116. PIPSEC_NEGPOL_OBJECT * ppIpsecPolicyObject
  117. );
  118. void
  119. FreeIpsecNegPolObject(
  120. PIPSEC_NEGPOL_OBJECT pIpsecNegPolObject
  121. );
  122. DWORD
  123. ReadFilterObjectsFromDirectory(
  124. HLDAP hLdapBindHandle,
  125. LPWSTR pszIpsecRootContainer,
  126. LPWSTR * ppszFilterDNs,
  127. DWORD dwNumFilterObjects,
  128. PIPSEC_FILTER_OBJECT ** pppIpsecFilterObjects,
  129. PDWORD pdwNumFilterObjects
  130. );
  131. DWORD
  132. GenerateFilterQuery(
  133. LPWSTR * ppszFilterDNs,
  134. DWORD dwNumFilterObjects,
  135. LPWSTR * ppszQueryBuffer
  136. );
  137. DWORD
  138. ReadNegPolObjectsFromDirectory(
  139. HLDAP hLdapBindHandle,
  140. LPWSTR pszIpsecRootContainer,
  141. LPWSTR * ppszNegPolDNs,
  142. DWORD dwNumNegPolObjects,
  143. PIPSEC_NEGPOL_OBJECT ** pppIpsecNegPolObjects,
  144. PDWORD pdwNumNegPolObjects
  145. );
  146. DWORD
  147. GenerateNegPolQuery(
  148. LPWSTR * ppszNegPolDNs,
  149. DWORD dwNumNegPolObjects,
  150. LPWSTR * ppszQueryBuffer
  151. );
  152. DWORD
  153. ComputePolicyContainerDN(
  154. LPWSTR pszPolicyDN,
  155. LPWSTR * ppszPolicyContainerDN
  156. );
  157. DWORD
  158. ComputeDefaultDirectory(
  159. LPWSTR * ppszDefaultDirectory
  160. );