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.

362 lines
6.2 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #include <dnsapi.h>
  4. #define PDNS_DEBUG_INFO PVOID
  5. //
  6. // Old entry point macro'd away in dnsapi.h
  7. //
  8. #undef DnsRecordListFree
  9. //
  10. // SDK public
  11. //
  12. static
  13. BOOL
  14. WINAPI
  15. DnsFlushResolverCache(
  16. VOID
  17. )
  18. {
  19. return FALSE;
  20. }
  21. static
  22. VOID
  23. WINAPI
  24. DnsFree(
  25. IN OUT PVOID pData,
  26. IN DNS_FREE_TYPE FreeType
  27. )
  28. {
  29. return;
  30. }
  31. static
  32. DNS_NAME_COMPARE_STATUS
  33. DnsNameCompareEx_W(
  34. IN LPCWSTR pszLeftName,
  35. IN LPCWSTR pszRightName,
  36. IN DWORD dwReserved
  37. )
  38. {
  39. return DnsNameCompareInvalid;
  40. }
  41. static
  42. BOOL
  43. WINAPI
  44. DnsNameCompare_A(
  45. IN LPSTR pName1,
  46. IN LPSTR pName2
  47. )
  48. {
  49. return FALSE;
  50. }
  51. static
  52. BOOL
  53. WINAPI
  54. DnsNameCompare_UTF8(
  55. IN LPSTR pName1,
  56. IN LPSTR pName2
  57. )
  58. {
  59. return FALSE;
  60. }
  61. static
  62. BOOL
  63. WINAPI
  64. DnsNameCompare_W(
  65. IN LPWSTR pName1,
  66. IN LPWSTR pName2
  67. )
  68. {
  69. return FALSE;
  70. }
  71. static
  72. DNS_STATUS
  73. WINAPI
  74. DnsQuery_A(
  75. IN LPCSTR pszName,
  76. IN WORD wType,
  77. IN DWORD Options,
  78. IN PIP4_ARRAY aipServers OPTIONAL,
  79. IN OUT PDNS_RECORD * ppQueryResults OPTIONAL,
  80. IN OUT PVOID * pReserved OPTIONAL
  81. )
  82. {
  83. return ERROR_PROC_NOT_FOUND;
  84. }
  85. static
  86. DNS_STATUS
  87. WINAPI
  88. DnsQuery_UTF8(
  89. IN LPCSTR pszName,
  90. IN WORD wType,
  91. IN DWORD Options,
  92. IN PIP4_ARRAY aipServers OPTIONAL,
  93. IN OUT PDNS_RECORD * ppQueryResults OPTIONAL,
  94. IN OUT PVOID * pReserved OPTIONAL
  95. )
  96. {
  97. return ERROR_PROC_NOT_FOUND;
  98. }
  99. static
  100. DNS_STATUS
  101. WINAPI
  102. DnsQuery_W(
  103. IN LPCWSTR pszName,
  104. IN WORD wType,
  105. IN DWORD Options,
  106. IN PIP4_ARRAY aipServers OPTIONAL,
  107. IN OUT PDNS_RECORD * ppQueryResults OPTIONAL,
  108. IN OUT PVOID * pReserved OPTIONAL
  109. )
  110. {
  111. return ERROR_PROC_NOT_FOUND;
  112. }
  113. BOOL
  114. WINAPI
  115. DnsRecordCompare(
  116. IN PDNS_RECORD pRecord1,
  117. IN PDNS_RECORD pRecord2
  118. )
  119. {
  120. return FALSE;
  121. }
  122. BOOL
  123. WINAPI
  124. DnsRecordSetCompare(
  125. IN OUT PDNS_RECORD pRR1,
  126. IN OUT PDNS_RECORD pRR2,
  127. OUT PDNS_RECORD * ppDiff1,
  128. OUT PDNS_RECORD * ppDiff2
  129. )
  130. {
  131. return FALSE;
  132. }
  133. PDNS_RECORD
  134. WINAPI
  135. DnsRecordCopyEx(
  136. IN PDNS_RECORD pRecord,
  137. IN DNS_CHARSET CharSetIn,
  138. IN DNS_CHARSET CharSetOut
  139. )
  140. {
  141. return NULL;
  142. }
  143. PDNS_RECORD
  144. WINAPI
  145. DnsRecordSetCopyEx(
  146. IN PDNS_RECORD pRecordSet,
  147. IN DNS_CHARSET CharSetIn,
  148. IN DNS_CHARSET CharSetOut
  149. )
  150. {
  151. return NULL;
  152. }
  153. static
  154. VOID
  155. WINAPI
  156. DnsRecordListFree(
  157. IN OUT PDNS_RECORD pRecordList,
  158. IN DNS_FREE_TYPE FreeType
  159. )
  160. {
  161. return;
  162. }
  163. PDNS_RECORD
  164. DnsRecordSetDetach(
  165. IN OUT PDNS_RECORD pRecordList
  166. )
  167. {
  168. return NULL;
  169. }
  170. static
  171. DNS_STATUS
  172. DnsValidateName_A(
  173. IN LPCSTR pszName,
  174. IN DNS_NAME_FORMAT Format
  175. )
  176. {
  177. return ERROR_PROC_NOT_FOUND;
  178. }
  179. static
  180. DNS_STATUS
  181. DnsValidateName_UTF8(
  182. IN LPCSTR pszName,
  183. IN DNS_NAME_FORMAT Format
  184. )
  185. {
  186. return ERROR_PROC_NOT_FOUND;
  187. }
  188. static
  189. DNS_STATUS
  190. DnsValidateName_W(
  191. IN LPCWSTR pwszName,
  192. IN DNS_NAME_FORMAT Format
  193. )
  194. {
  195. return ERROR_PROC_NOT_FOUND;
  196. }
  197. DNS_STATUS
  198. WINAPI
  199. DnsQueryConfig(
  200. IN DNS_CONFIG_TYPE Config,
  201. IN DWORD Flag,
  202. IN PWSTR pwsAdapterName,
  203. IN PVOID pReserved,
  204. OUT PVOID pBuffer,
  205. IN OUT PDWORD pBufferLength
  206. )
  207. {
  208. return ERROR_PROC_NOT_FOUND;
  209. }
  210. //
  211. // Private config
  212. //
  213. PVOID
  214. WINAPI
  215. DnsQueryConfigAllocEx(
  216. IN DNS_CONFIG_TYPE Config,
  217. IN PWSTR pwsAdapterName,
  218. IN BOOL fLocalAlloc
  219. )
  220. {
  221. return NULL;
  222. }
  223. VOID
  224. WINAPI
  225. DnsFreeConfigStructure(
  226. IN OUT PVOID pData,
  227. IN DNS_CONFIG_TYPE ConfigId
  228. )
  229. {
  230. return;
  231. }
  232. DWORD
  233. WINAPI
  234. DnsQueryConfigDword(
  235. IN DNS_CONFIG_TYPE Config,
  236. IN PWSTR pwsAdapterName
  237. )
  238. {
  239. return 0;
  240. }
  241. DNS_STATUS
  242. WINAPI
  243. DnsSetConfigDword(
  244. IN DNS_CONFIG_TYPE Config,
  245. IN PWSTR pwsAdapterName,
  246. IN DWORD NewValue
  247. )
  248. {
  249. return ERROR_PROC_NOT_FOUND;
  250. }
  251. //
  252. // Private stuff
  253. //
  254. PVOID
  255. DnsApiAlloc(
  256. IN INT iSize
  257. )
  258. {
  259. return NULL;
  260. }
  261. PVOID
  262. DnsApiRealloc(
  263. IN OUT PVOID pMem,
  264. IN INT iSize
  265. )
  266. {
  267. return NULL;
  268. }
  269. VOID
  270. DnsApiFree(
  271. IN OUT PVOID pMem
  272. )
  273. {
  274. return;
  275. }
  276. PDNS_DEBUG_INFO
  277. DnsApiSetDebugGlobals(
  278. IN OUT PDNS_DEBUG_INFO pInfo
  279. )
  280. {
  281. return NULL;
  282. }
  283. //
  284. // !! WARNING !! The entries below must be in alphabetical order, and are
  285. // CASE SENSITIVE (eg lower case comes last!)
  286. //
  287. DEFINE_PROCNAME_ENTRIES(dnsapi)
  288. {
  289. DLPENTRY(DnsApiAlloc)
  290. DLPENTRY(DnsApiFree)
  291. DLPENTRY(DnsApiRealloc)
  292. DLPENTRY(DnsApiSetDebugGlobals)
  293. DLPENTRY(DnsFlushResolverCache)
  294. DLPENTRY(DnsFree)
  295. DLPENTRY(DnsFreeConfigStructure)
  296. DLPENTRY(DnsNameCompareEx_W)
  297. DLPENTRY(DnsNameCompare_A)
  298. DLPENTRY(DnsNameCompare_UTF8)
  299. DLPENTRY(DnsNameCompare_W)
  300. DLPENTRY(DnsQueryConfig)
  301. DLPENTRY(DnsQueryConfigAllocEx)
  302. DLPENTRY(DnsQueryConfigDword)
  303. DLPENTRY(DnsQuery_A)
  304. DLPENTRY(DnsQuery_UTF8)
  305. DLPENTRY(DnsQuery_W)
  306. DLPENTRY(DnsRecordCompare)
  307. DLPENTRY(DnsRecordCopyEx)
  308. DLPENTRY(DnsRecordListFree)
  309. DLPENTRY(DnsRecordSetCompare)
  310. DLPENTRY(DnsRecordSetCopyEx)
  311. DLPENTRY(DnsRecordSetDetach)
  312. DLPENTRY(DnsSetConfigDword)
  313. DLPENTRY(DnsValidateName_A)
  314. DLPENTRY(DnsValidateName_UTF8)
  315. DLPENTRY(DnsValidateName_W)
  316. };
  317. DEFINE_PROCNAME_MAP(dnsapi)