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.

140 lines
2.6 KiB

  1. #pragma once
  2. #include "diagctx.h"
  3. #include "ncstring.h"
  4. #include "netcon.h"
  5. enum COMMAND
  6. {
  7. CMD_INVALID = 0,
  8. CMD_SHOW_BINDINGS,
  9. CMD_SHOW_COMPONENTS,
  10. CMD_SHOW_STACK_TABLE,
  11. CMD_SHOW_LAN_ADAPTER_PNPIDS,
  12. CMD_ADD_COMPONENT,
  13. CMD_REMOVE_COMPONENT,
  14. CMD_UPDATE_COMPONENT,
  15. CMD_REMOVE_REFS,
  16. CMD_ENABLE_BINDING,
  17. CMD_DISABLE_BINDING,
  18. CMD_MOVE_BINDING,
  19. CMD_WRITE_BINDINGS,
  20. CMD_SET_WANORDER,
  21. CMD_FULL_DIAGNOSTIC,
  22. CMD_CLEANUP,
  23. CMD_ADD_REMOVE_STRESS,
  24. CMD_SHOW_LANA_DIAG,
  25. CMD_SHOW_LANA_PATHS,
  26. CMD_SET_LANA_NUMBER,
  27. CMD_REWRITE_LANA_INFO,
  28. CMD_SHOW_LAN_CONNECTIONS,
  29. CMD_SHOW_LAN_DETAILS,
  30. CMD_LAN_CHANGE_STATE,
  31. CMD_SHOW_ALL_DEVICES,
  32. };
  33. //+---------------------------------------------------------------------------
  34. // Parameters for SZ_CMD_SHOW_BINDINGS
  35. //
  36. enum SHOW_BINDINGS_PARAM
  37. {
  38. SHOW_INVALID = 0,
  39. SHOW_BELOW,
  40. SHOW_INVOLVING,
  41. SHOW_UPPER,
  42. SHOW_DISABLED,
  43. };
  44. enum COMPONENT_SPECIFIER_TYPE
  45. {
  46. CST_INVALID = 0,
  47. CST_ALL,
  48. CST_BY_NAME,
  49. };
  50. struct COMPONENT_SPECIFIER
  51. {
  52. COMPONENT_SPECIFIER_TYPE Type;
  53. PCWSTR pszInfOrPnpId;
  54. };
  55. struct DIAG_OPTIONS
  56. {
  57. CDiagContext* pDiagCtx;
  58. COMMAND Command;
  59. // Valid for CMD_ADD_COMPONENT
  60. GUID ClassGuid;
  61. PCWSTR pszInfId;
  62. // Valid for SZ_CMD_SHOW_BINDINGS
  63. //
  64. SHOW_BINDINGS_PARAM ShowBindParam;
  65. COMPONENT_SPECIFIER CompSpecifier;
  66. // Valid for SZ_CMD_ENABLE_BINDING and SZ_CMD_DISABLE_BINDING
  67. //
  68. PCWSTR pszBindPath;
  69. // Valid for SZ_CMD_MOVE_BINDING
  70. //
  71. PCWSTR pszOtherBindPath;
  72. BOOL fMoveBefore;
  73. // Valid for SZ_CMD_SET_WANORDER
  74. //
  75. BOOL fWanAdaptersFirst;
  76. // Valid for SZ_CMD_FULL_DIAGNOSTIC
  77. //
  78. BOOL fLeakCheck;
  79. // Valid for SZ_SET_LANA_NUMBER
  80. //
  81. BYTE OldLanaNumber;
  82. BYTE NewLanaNumber;
  83. // Used by CMD_SHOW_LAN_DETAILS
  84. PCWSTR szLanConnection;
  85. // Used by CMD_LAN_CHANGE_STATE & CMD_SHOW_LAN_DETAILS
  86. BOOL fConnect;
  87. };
  88. VOID
  89. SzFromCharacteristics (
  90. DWORD dwChars,
  91. tstring *pstrChars);
  92. PCWSTR
  93. SzFromNetconStatus (
  94. NETCON_STATUS Status);
  95. PCWSTR
  96. SzFromCmProb (
  97. ULONG ulProb);
  98. VOID
  99. SzFromCmStatus (
  100. ULONG ulStatus, tstring *pstrStatus);
  101. EXTERN_C
  102. VOID
  103. WINAPI
  104. NetCfgDiagFromCommandArgs (
  105. IN DIAG_OPTIONS *pOptions);
  106. EXTERN_C
  107. VOID
  108. WINAPI
  109. LanaCfgFromCommandArgs (
  110. IN DIAG_OPTIONS *pOptions);
  111. EXTERN_C
  112. VOID
  113. WINAPI
  114. NetManDiagFromCommandArgs (
  115. IN DIAG_OPTIONS *pOptions);