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.

191 lines
5.0 KiB

  1. /*++
  2. Copyright (C) 1998 Microsoft Corporation
  3. --*/
  4. FN_HANDLE_CMD HandleSrvrList;
  5. FN_HANDLE_CMD HandleSrvrHelp;
  6. FN_HANDLE_CMD HandleSrvrContexts;
  7. FN_HANDLE_CMD HandleSrvrDump;
  8. FN_HANDLE_CMD HandleSrvrAddClass;
  9. FN_HANDLE_CMD HandleSrvrAddMscope;
  10. FN_HANDLE_CMD HandleSrvrAddOptiondef;
  11. FN_HANDLE_CMD HandleSrvrAddScope;
  12. FN_HANDLE_CMD HandleSrvrDeleteClass;
  13. FN_HANDLE_CMD HandleSrvrDeleteMscope;
  14. FN_HANDLE_CMD HandleSrvrDeleteOptiondef;
  15. FN_HANDLE_CMD HandleSrvrDeleteOptionvalue;
  16. FN_HANDLE_CMD HandleSrvrDeleteScope;
  17. FN_HANDLE_CMD HandleSrvrDeleteSuperscope;
  18. FN_HANDLE_CMD HandleSrvrDeleteDnsCredentials;
  19. FN_HANDLE_CMD HandleSrvrRedoAuth;
  20. FN_HANDLE_CMD HandleSrvrInitiateReconcile;
  21. FN_HANDLE_CMD HandleSrvrExport;
  22. FN_HANDLE_CMD HandleSrvrImport;
  23. FN_HANDLE_CMD HandleSrvrSetBackupinterval;
  24. FN_HANDLE_CMD HandleSrvrSetBackuppath;
  25. FN_HANDLE_CMD HandleSrvrSetDatabasecleanupinterval;
  26. FN_HANDLE_CMD HandleSrvrSetDatabaseloggingflag;
  27. FN_HANDLE_CMD HandleSrvrSetDatabasename;
  28. FN_HANDLE_CMD HandleSrvrSetDatabasepath;
  29. FN_HANDLE_CMD HandleSrvrSetDatabaserestoreflag;
  30. FN_HANDLE_CMD HandleSrvrSetOptionvalue;
  31. FN_HANDLE_CMD HandleSrvrSetServer;
  32. FN_HANDLE_CMD HandleSrvrSetUserclass;
  33. FN_HANDLE_CMD HandleSrvrSetVendorclass;
  34. FN_HANDLE_CMD HandleSrvrSetDnsCredentials;
  35. FN_HANDLE_CMD HandleSrvrSetAuditlog;
  36. FN_HANDLE_CMD HandleSrvrSetDnsconfig;
  37. FN_HANDLE_CMD HandleSrvrSetDetectconflictretry;
  38. FN_HANDLE_CMD HandleSrvrShowAll;
  39. FN_HANDLE_CMD HandleSrvrShowBindings;
  40. FN_HANDLE_CMD HandleSrvrShowClass;
  41. FN_HANDLE_CMD HandleSrvrShowHelper;
  42. FN_HANDLE_CMD HandleSrvrShowMibinfo;
  43. FN_HANDLE_CMD HandleSrvrShowMscope;
  44. FN_HANDLE_CMD HandleSrvrShowOptiondef;
  45. FN_HANDLE_CMD HandleSrvrShowOptionvalue;
  46. FN_HANDLE_CMD HandleSrvrShowScope;
  47. FN_HANDLE_CMD HandleSrvrShowSuperScope;
  48. FN_HANDLE_CMD HandleSrvrShowServer;
  49. FN_HANDLE_CMD HandleSrvrShowServerconfig;
  50. FN_HANDLE_CMD HandleSrvrShowServerstatus;
  51. FN_HANDLE_CMD HandleSrvrShowUserclass;
  52. FN_HANDLE_CMD HandleSrvrShowVendorclass;
  53. FN_HANDLE_CMD HandleSrvrShowDnsCredentials;
  54. FN_HANDLE_CMD HandleSrvrShowVersion;
  55. FN_HANDLE_CMD HandleSrvrShowAuditlog;
  56. FN_HANDLE_CMD HandleSrvrShowDnsconfig;
  57. FN_HANDLE_CMD HandleSrvrShowDetectconflictretry;
  58. DWORD
  59. CreateDumpFile(
  60. IN PWCHAR pwszName,
  61. OUT PHANDLE phFile
  62. );
  63. VOID
  64. CloseDumpFile(
  65. HANDLE hFile
  66. );
  67. DWORD
  68. SrvrDottedStringToIpAddressW(
  69. LPWSTR pwszString
  70. );
  71. LPWSTR
  72. SrvrIpAddressToDottedStringW(
  73. DWORD IpAddress
  74. );
  75. VOID
  76. PrintClassInfo( // print info on a single class
  77. LPDHCP_CLASS_INFO Class
  78. );
  79. VOID
  80. PrintClassInfoArray( // print array of classes
  81. LPDHCP_CLASS_INFO_ARRAY Classes
  82. );
  83. DWORD
  84. SetOptionDataType(
  85. DHCP_OPTION_DATA_TYPE OptionType,
  86. LPTSTR OptionValueString,
  87. LPDHCP_OPTION_DATA_ELEMENT OptionData,
  88. LPWSTR *UnicodeOptionValueString
  89. );
  90. DWORD
  91. SetOptionDataTypeArray(
  92. DHCP_OPTION_DATA_TYPE OptionType,
  93. LPTSTR *OptionValues,
  94. DWORD dwStartCount, //first optionvalue = dwStartCount
  95. DWORD dwEndCount, //last optionvalue = dwEndCount - 1
  96. LPDHCP_OPTION_DATA pOptionData
  97. );
  98. DWORD
  99. _EnumOptions(
  100. IN LPWSTR ServerAddress,
  101. IN DWORD Flags,
  102. IN LPWSTR ClassName,
  103. IN LPWSTR VendorName,
  104. IN OUT DHCP_RESUME_HANDLE *ResumeHandle,
  105. IN DWORD PreferredMaximum,
  106. OUT LPDHCP_OPTION_ARRAY *Options,
  107. OUT DWORD *OptionsRead,
  108. OUT DWORD *OptionsTotal
  109. );
  110. VOID
  111. PrintOptionInfo(
  112. IN LPDHCP_OPTION OptionInfo
  113. );
  114. VOID
  115. PrintOptionValue(
  116. IN LPDHCP_OPTION_DATA OptionValue
  117. );
  118. DWORD
  119. PrintAllOptionValues(
  120. IN LPDHCP_ALL_OPTION_VALUES OptValues
  121. );
  122. DWORD
  123. PrintUserOptionValues(
  124. IN LPDHCP_ALL_OPTION_VALUES OptValues,
  125. IN LPWSTR pwcUser,
  126. IN LPWSTR pwcVendor
  127. );
  128. VOID
  129. PrintOptionValuesArray(
  130. IN LPDHCP_OPTION_VALUE_ARRAY OptValArray
  131. );
  132. VOID
  133. PrintOptionArray(
  134. IN LPDHCP_OPTION_ARRAY OptArray
  135. );
  136. VOID
  137. PrintOptionValue1(
  138. IN LPDHCP_OPTION_VALUE OptVal
  139. );
  140. VOID
  141. PrintAllOptions(
  142. IN LPDHCP_ALL_OPTIONS Options
  143. );
  144. DWORD
  145. SetOptionValue(
  146. IN LPWSTR ServerAddress,
  147. IN DWORD Flags,
  148. IN DHCP_OPTION_ID OptionId,
  149. IN LPWSTR ClassName,
  150. IN LPWSTR VendorName,
  151. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  152. IN LPDHCP_OPTION_DATA OptionValue
  153. );
  154. DWORD
  155. ShowOptionValues4(
  156. IN LPWSTR pwszServer,
  157. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  158. IN LPDWORD pdwCount
  159. );
  160. VOID
  161. PrintDhcpAttrib( // print a server attrib
  162. LPDHCP_ATTRIB ServerAttrib
  163. );