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.

101 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1999, Microsoft Corporation
  3. Module Name:
  4. net\routing\netsh\ip\protocols\msdp.c
  5. Abstract:
  6. This module contains code for dispatching commands
  7. received for the Multicast Source Discovery Protocol.
  8. The implementation of the commands is elsewhere,
  9. in msdpopt.c.
  10. Author
  11. Dave Thaler (dthaler) 21-May-1999
  12. Revision History:
  13. Based loosely on net\routing\netsh\ip\protocols\nathlp.c by AboladeG
  14. --*/
  15. #include "precomp.h"
  16. #pragma hdrstop
  17. CMD_ENTRY g_MsdpAddCmdTable[] =
  18. {
  19. CREATE_CMD_ENTRY(MSDP_ADD_PEER, HandleMsdpAddPeer),
  20. };
  21. CMD_ENTRY g_MsdpDeleteCmdTable[] =
  22. {
  23. CREATE_CMD_ENTRY(MSDP_DELETE_PEER, HandleMsdpDeletePeer),
  24. };
  25. CMD_ENTRY g_MsdpSetCmdTable[] =
  26. {
  27. CREATE_CMD_ENTRY(MSDP_SET_GLOBAL, HandleMsdpSetGlobal),
  28. CREATE_CMD_ENTRY(MSDP_SET_PEER, HandleMsdpSetPeer)
  29. };
  30. CMD_ENTRY g_MsdpShowCmdTable[] =
  31. {
  32. CREATE_CMD_ENTRY(MSDP_SHOW_SA, HandleMsdpMibShowObject),
  33. CREATE_CMD_ENTRY(MSDP_SHOW_GLOBAL, HandleMsdpShowGlobal),
  34. CREATE_CMD_ENTRY(MSDP_SHOW_GLOBALSTATS, HandleMsdpMibShowObject),
  35. CREATE_CMD_ENTRY(MSDP_SHOW_PEER, HandleMsdpShowPeer),
  36. CREATE_CMD_ENTRY(MSDP_SHOW_PEERSTATS, HandleMsdpMibShowObject)
  37. };
  38. CMD_GROUP_ENTRY g_MsdpCmdGroupTable[] =
  39. {
  40. CREATE_CMD_GROUP_ENTRY(GROUP_ADD, g_MsdpAddCmdTable),
  41. CREATE_CMD_GROUP_ENTRY(GROUP_DELETE, g_MsdpDeleteCmdTable),
  42. CREATE_CMD_GROUP_ENTRY(GROUP_SET, g_MsdpSetCmdTable),
  43. CREATE_CMD_GROUP_ENTRY(GROUP_SHOW, g_MsdpShowCmdTable)
  44. };
  45. ULONG g_MsdpCmdGroupCount =
  46. sizeof(g_MsdpCmdGroupTable) / sizeof(g_MsdpCmdGroupTable[0]);
  47. CMD_ENTRY g_MsdpTopCmdTable[] =
  48. {
  49. CREATE_CMD_ENTRY(INSTALL, HandleMsdpInstall),
  50. CREATE_CMD_ENTRY(UNINSTALL, HandleMsdpUninstall),
  51. };
  52. ULONG g_MsdpTopCmdCount =
  53. sizeof(g_MsdpTopCmdTable) / sizeof(g_MsdpTopCmdTable[0]);
  54. DWORD
  55. MsdpDump(
  56. PWCHAR pwszMachine,
  57. WCHAR **ppwcArguments,
  58. DWORD dwArgCount,
  59. PVOID pvData
  60. )
  61. {
  62. g_hMibServer = (MIB_SERVER_HANDLE)pvData;
  63. DisplayMessage(g_hModule,DMP_MSDP_HEADER);
  64. DisplayMessageT(DMP_MSDP_PUSHD);
  65. DisplayMessageT(DMP_UNINSTALL);
  66. //
  67. // Show the global info commands
  68. //
  69. ShowMsdpGlobalInfo(FORMAT_DUMP);
  70. ShowMsdpPeerInfo(FORMAT_DUMP, NULL, NULL);
  71. DisplayMessageT(DMP_POPD);
  72. DisplayMessage(g_hModule, DMP_MSDP_FOOTER);
  73. return NO_ERROR;
  74. } // MSDPDump