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.

119 lines
2.8 KiB

  1. //
  2. // Define this constant so that hal.h won't be included. This is so that
  3. // the project will build, as someone under here has redefined some types
  4. // that are in hal.h
  5. //
  6. #define _HAL_
  7. #include <nt.h>
  8. #include <ntrtl.h>
  9. #include <nturtl.h>
  10. #include <windows.h>
  11. // headers are screwed up
  12. // if you bring in nt.h, then don't bring in winnt.h and
  13. // then you miss these
  14. #ifndef MAXWORD
  15. #define MINCHAR 0x80
  16. #define MAXCHAR 0x7f
  17. #define MINSHORT 0x8000
  18. #define MAXSHORT 0x7fff
  19. #define MINLONG 0x80000000
  20. #define MAXLONG 0x7fffffff
  21. #define MAXBYTE 0xff
  22. #define MAXWORD 0xffff
  23. #define MAXDWORD 0xffffffff
  24. #endif
  25. #ifndef DNS_WINSOCK1
  26. #include <winsock2.h>
  27. #define DNS_WINSOCK2 1
  28. #else
  29. #include <winsock.h>
  30. #endif
  31. #if WINDBG
  32. # include <wdbgexts.h>
  33. #else
  34. # include <ntsdexts.h>
  35. #endif
  36. #include <basetyps.h>
  37. #include <nspapi.h>
  38. #include <svcguid.h>
  39. #include <stdio.h>
  40. #include <stdlib.h>
  41. #include <limits.h>
  42. //#include <tcpsvcs.h> // tcpsvcs globals
  43. #include <dnsapi.h> // DNS library routines
  44. #include <windns.h> // DNS API
  45. #include <dnsrpc.h>
  46. // #include <dnsapip.h>
  47. // #include <record.h> // record defs in library
  48. // #include "dnsrpc_s.h" // DNS RPC definitions
  49. #include "srvcfg.h"
  50. #include "dnsmsg.h"
  51. #include "file.h"
  52. #include "name.h"
  53. #include "tree.h"
  54. #include "record.h"
  55. #include "update.h"
  56. #include "zone.h"
  57. #include "registry.h"
  58. #include "zone.h"
  59. #include "msginfo.h"
  60. #include "tcpcon.h"
  61. #include "packetq.h"
  62. #include "dbase.h"
  63. #include "recurse.h"
  64. #include "nameutil.h"
  65. #include "ntverp.h"
  66. //
  67. // RBUGBUG
  68. // PCLIENT_QELEMENT structure and PBUCKET structure have been
  69. // copied from dhcpclnt.c. Make sure to copy them from wherever necessary
  70. //
  71. //
  72. typedef struct _CLIENT_QELEMENT {
  73. LIST_ENTRY List;
  74. LPSTR lpstrAdapterName;
  75. LPSTR lpstrHostName;
  76. PREGISTER_HOST_STATUS pRegisterStatus;
  77. PREGISTER_HOST_ENTRY pHostAddrs;
  78. DWORD dwHostAddrCount;
  79. LPSTR lpstrDomainName;
  80. PIP_ADDRESS pipDnsServerList;
  81. DWORD dwDnsServerCount;
  82. DWORD dwTTL;
  83. DWORD dwFlags;
  84. BOOL fNewElement;
  85. BOOL fRemove;
  86. } CLIENT_QELEMENT, *PCLIENT_QELEMENT;
  87. typedef struct _BUCKET
  88. {
  89. LIST_ENTRY List;
  90. PCLIENT_QELEMENT* ppQList;
  91. DWORD dwListCount;
  92. DWORD dwRetryTime;
  93. CHAR HostName[50];
  94. CHAR DomainName[50];
  95. BOOL fSucceeded;
  96. struct _BUCKET* pRelatedBucket;
  97. BOOL fRemove; // delete elements in this bucket?
  98. DWORD dwRetryFactor;
  99. } BUCKET, *PBUCKET;