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.

88 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1999, Microsoft Corporation
  3. Module Name:
  4. net\routing\netsh\ip\protocols\vrrphlp.c
  5. Abstract:
  6. This module contains code for dispatching commands
  7. received for the Virtual Router Redundancy Protocol.
  8. The implementation of the commands is elsewhere,
  9. in vrrphlpopt.c and vrrphlpcfg.c.
  10. Author
  11. Peeyush Ranjan (peeyushr) 1-Mar-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_VrrpAddCmdTable[] =
  18. {
  19. CREATE_CMD_ENTRY(VRRP_ADD_INTERFACE, HandleVrrpAddInterface),
  20. CREATE_CMD_ENTRY(VRRP_ADD_VRID, HandleVrrpAddVRID)
  21. };
  22. CMD_ENTRY g_VrrpDeleteCmdTable[] =
  23. {
  24. CREATE_CMD_ENTRY(VRRP_DELETE_INTERFACE, HandleVrrpDeleteInterface),
  25. CREATE_CMD_ENTRY(VRRP_DELETE_VRID, HandleVrrpDeleteVRID)
  26. };
  27. CMD_ENTRY g_VrrpSetCmdTable[] =
  28. {
  29. CREATE_CMD_ENTRY(VRRP_SET_INTERFACE, HandleVrrpSetInterface),
  30. CREATE_CMD_ENTRY(VRRP_SET_GLOBAL, HandleVrrpSetGlobal)
  31. };
  32. CMD_ENTRY g_VrrpShowCmdTable[] =
  33. {
  34. CREATE_CMD_ENTRY(VRRP_SHOW_GLOBAL, HandleVrrpShowGlobal),
  35. CREATE_CMD_ENTRY(VRRP_SHOW_INTERFACE, HandleVrrpShowInterface)
  36. };
  37. CMD_GROUP_ENTRY g_VrrpCmdGroupTable[] =
  38. {
  39. CREATE_CMD_GROUP_ENTRY(GROUP_ADD, g_VrrpAddCmdTable),
  40. CREATE_CMD_GROUP_ENTRY(GROUP_DELETE, g_VrrpDeleteCmdTable),
  41. CREATE_CMD_GROUP_ENTRY(GROUP_SET, g_VrrpSetCmdTable),
  42. CREATE_CMD_GROUP_ENTRY(GROUP_SHOW, g_VrrpShowCmdTable)
  43. };
  44. ULONG g_VrrpCmdGroupCount =
  45. sizeof(g_VrrpCmdGroupTable) / sizeof(g_VrrpCmdGroupTable[0]);
  46. CMD_ENTRY g_VrrpTopCmdTable[] =
  47. {
  48. CREATE_CMD_ENTRY(INSTALL, HandleVrrpInstall),
  49. CREATE_CMD_ENTRY(UNINSTALL, HandleVrrpUninstall),
  50. };
  51. ULONG g_VrrpTopCmdCount =
  52. sizeof(g_VrrpTopCmdTable) / sizeof(g_VrrpTopCmdTable[0]);
  53. DWORD
  54. VrrpDump(
  55. IN LPCWSTR pwszRouter,
  56. IN WCHAR **ppwcArguments,
  57. IN DWORD dwArgCount,
  58. IN PVOID pvData
  59. )
  60. {
  61. g_hMibServer = (MIB_SERVER_HANDLE)pvData;
  62. return DumpVrrpInformation();
  63. } // VRRPDump