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.

154 lines
3.3 KiB

  1. #pragma once
  2. #include "diagctx.h"
  3. #include "ncstring.h"
  4. #include "netcon.h"
  5. // The enum constants CMD_SHOW_LANA_DIAG, CMD_SHOW_LANA_PATHS,
  6. // CMD_SET_LANA_NUMBER, and CMD_REWRITE_LANA_INFO are used by lanacfg.exe
  7. // which is published outside Microsoft.
  8. // To keep lanacfg.exe working with new versions of netcfgx.dll, we need
  9. // to make sure these constants do not change. These are sent to a different
  10. // entry point than the previous COMMANDs so overlap is not a problem.
  11. //
  12. enum COMMAND
  13. {
  14. CMD_SHOW_LANA_DIAG = 17,
  15. CMD_SHOW_LANA_PATHS = 19,
  16. CMD_SET_LANA_NUMBER = 20,
  17. CMD_REWRITE_LANA_INFO = 21,
  18. CMD_INVALID = 0,
  19. CMD_SHOW_BINDINGS,
  20. CMD_SHOW_COMPONENTS,
  21. CMD_SHOW_STACK_TABLE,
  22. CMD_SHOW_LAN_ADAPTER_PNPIDS,
  23. CMD_ADD_COMPONENT,
  24. CMD_REMOVE_COMPONENT,
  25. CMD_UPDATE_COMPONENT,
  26. CMD_REMOVE_REFS,
  27. CMD_ENABLE_BINDING,
  28. CMD_DISABLE_BINDING,
  29. CMD_MOVE_BINDING,
  30. CMD_WRITE_BINDINGS,
  31. CMD_SET_WANORDER,
  32. CMD_FULL_DIAGNOSTIC,
  33. CMD_CLEANUP,
  34. CMD_ADD_REMOVE_STRESS,
  35. CMD_SHOW_LAN_CONNECTIONS,
  36. CMD_SHOW_LAN_DETAILS,
  37. CMD_LAN_CHANGE_STATE,
  38. CMD_SHOW_ALL_DEVICES,
  39. };
  40. //+---------------------------------------------------------------------------
  41. // Parameters for SZ_CMD_SHOW_BINDINGS
  42. //
  43. enum SHOW_BINDINGS_PARAM
  44. {
  45. SHOW_INVALID = 0,
  46. SHOW_BELOW,
  47. SHOW_INVOLVING,
  48. SHOW_UPPER,
  49. SHOW_DISABLED,
  50. };
  51. enum COMPONENT_SPECIFIER_TYPE
  52. {
  53. CST_INVALID = 0,
  54. CST_ALL,
  55. CST_BY_NAME,
  56. };
  57. struct COMPONENT_SPECIFIER
  58. {
  59. COMPONENT_SPECIFIER_TYPE Type;
  60. PCWSTR pszInfOrPnpId;
  61. };
  62. struct DIAG_OPTIONS
  63. {
  64. CDiagContext* pDiagCtx;
  65. COMMAND Command;
  66. // Valid for CMD_ADD_COMPONENT
  67. GUID ClassGuid;
  68. PCWSTR pszInfId;
  69. // Valid for SZ_CMD_SHOW_BINDINGS
  70. //
  71. SHOW_BINDINGS_PARAM ShowBindParam;
  72. COMPONENT_SPECIFIER CompSpecifier;
  73. // Valid for SZ_CMD_ENABLE_BINDING and SZ_CMD_DISABLE_BINDING
  74. //
  75. PCWSTR pszBindPath;
  76. // Valid for SZ_CMD_MOVE_BINDING
  77. //
  78. PCWSTR pszOtherBindPath;
  79. BOOL fMoveBefore;
  80. // Valid for SZ_CMD_SET_WANORDER
  81. //
  82. BOOL fWanAdaptersFirst;
  83. // Valid for SZ_CMD_FULL_DIAGNOSTIC
  84. //
  85. BOOL fLeakCheck;
  86. // Need this reserved in order to keep the lanacfg.exe tool working.
  87. // Otherwise the offsets for OldLanaNumber and NewLanaNumber will
  88. // be wrong since we published an earlier version of the tool compiled
  89. // with this BOOL in the structure definition.
  90. //
  91. BOOL fReserved;
  92. // Valid for SZ_SET_LANA_NUMBER
  93. //
  94. BYTE OldLanaNumber;
  95. BYTE NewLanaNumber;
  96. // Used by CMD_SHOW_LAN_DETAILS
  97. PCWSTR szLanConnection;
  98. // Used by CMD_LAN_CHANGE_STATE & CMD_SHOW_LAN_DETAILS
  99. BOOL fConnect;
  100. };
  101. VOID
  102. SzFromCharacteristics (
  103. DWORD dwChars,
  104. tstring *pstrChars);
  105. PCWSTR
  106. SzFromNetconStatus (
  107. NETCON_STATUS Status);
  108. PCWSTR
  109. SzFromCmProb (
  110. ULONG ulProb);
  111. VOID
  112. SzFromCmStatus (
  113. ULONG ulStatus, tstring *pstrStatus);
  114. EXTERN_C
  115. VOID
  116. WINAPI
  117. NetCfgDiagFromCommandArgs (
  118. IN DIAG_OPTIONS *pOptions);
  119. EXTERN_C
  120. VOID
  121. WINAPI
  122. LanaCfgFromCommandArgs (
  123. IN DIAG_OPTIONS *pOptions);
  124. EXTERN_C
  125. VOID
  126. WINAPI
  127. NetManDiagFromCommandArgs (
  128. IN DIAG_OPTIONS *pOptions);