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.

105 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. qos.c
  5. Abstract:
  6. IP QOS Command dispatcher.
  7. Revision History:
  8. --*/
  9. #include "precomp.h"
  10. #pragma hdrstop
  11. //
  12. // Declare and Init Global Variables for QOS Extension
  13. //
  14. #ifdef ALLOW_CHILD_HELPERS
  15. PIP_CONTEXT_TABLE_ENTRY g_QosContextTable = NULL;
  16. DWORD g_dwNumQosContexts = 0;
  17. #endif
  18. //
  19. // The table of Add, Delete, Set, Show Commands for QOS
  20. //
  21. //
  22. // The commands are prefix-matched with the command-line, in sequential
  23. // order. So a command like 'ADD INTERFACE FLOW' must come before
  24. // the command 'ADD INTERFACE' in the table.
  25. //
  26. CMD_ENTRY g_QosAddCmdTable[] = {
  27. /* CREATE_CMD_ENTRY(QOS_ADD_FILTER_TO_FLOW, HandleQosAttachFilterToFlow),*/
  28. CREATE_CMD_ENTRY(QOS_ADD_QOSOBJECT_ON_FLOW, HandleQosAddQosObjectOnIfFlow),
  29. CREATE_CMD_ENTRY(QOS_ADD_FLOWSPEC_ON_FLOW, HandleQosAddFlowspecOnIfFlow),
  30. CREATE_CMD_ENTRY(QOS_ADD_FLOW_ON_IF, HandleQosAddFlowOnIf),
  31. CREATE_CMD_ENTRY(QOS_ADD_IF, HandleQosAddIf),
  32. CREATE_CMD_ENTRY(QOS_ADD_DSRULE, HandleQosAddDsRule),
  33. CREATE_CMD_ENTRY(QOS_ADD_SDMODE, HandleQosAddSdMode),
  34. CREATE_CMD_ENTRY(QOS_ADD_FLOWSPEC, HandleQosAddFlowspec),
  35. #ifdef ALLOW_CHILD_HELPERS
  36. CREATE_CMD_ENTRY(ADD_HELPER, HandleQosAddHelper),
  37. #endif
  38. };
  39. CMD_ENTRY g_QosDelCmdTable[] = {
  40. /* CREATE_CMD_ENTRY(QOS_DEL_FILTER_FROM_FLOW, HandleQosDetachFilterFromFlow),*/
  41. CREATE_CMD_ENTRY(QOS_DEL_QOSOBJECT_ON_FLOW, HandleQosDelQosObjectOnIfFlow),
  42. CREATE_CMD_ENTRY(QOS_DEL_FLOWSPEC_ON_FLOW, HandleQosDelFlowspecOnIfFlow),
  43. CREATE_CMD_ENTRY(QOS_DEL_FLOW_ON_IF, HandleQosDelFlowOnIf),
  44. CREATE_CMD_ENTRY(QOS_DEL_IF, HandleQosDelIf),
  45. CREATE_CMD_ENTRY(QOS_DEL_DSRULE, HandleQosDelDsRule),
  46. CREATE_CMD_ENTRY(QOS_DEL_SDMODE, HandleQosDelQosObject),
  47. CREATE_CMD_ENTRY(QOS_DEL_QOSOBJECT, HandleQosDelQosObject),
  48. CREATE_CMD_ENTRY(QOS_DEL_FLOWSPEC, HandleQosDelFlowspec),
  49. #ifdef ALLOW_CHILD_HELPERS
  50. CREATE_CMD_ENTRY(DEL_HELPER, HandleQosDelHelper),
  51. #endif
  52. };
  53. CMD_ENTRY g_QosSetCmdTable[] = {
  54. /* CREATE_CMD_ENTRY(QOS_SET_FILTER_ON_FLOW, HandleQosModifyFilterOnFlow),*/
  55. /* CREATE_CMD_ENTRY(QOS_SET_IF, HandleQosSetIf), */
  56. CREATE_CMD_ENTRY(QOS_SET_GLOBAL, HandleQosSetGlobal)
  57. };
  58. CMD_ENTRY g_QosShowCmdTable[] = {
  59. /* CREATE_CMD_ENTRY(QOS_SHOW_FILTER_ON_FLOW, HandleQosShowFilterOnFlow),*/
  60. CREATE_CMD_ENTRY(QOS_SHOW_FLOW_ON_IF, HandleQosShowFlowOnIf),
  61. CREATE_CMD_ENTRY(QOS_SHOW_IF, HandleQosShowIf),
  62. CREATE_CMD_ENTRY(QOS_SHOW_DSMAP, HandleQosShowDsMap),
  63. CREATE_CMD_ENTRY(QOS_SHOW_SDMODE, HandleQosShowSdMode),
  64. CREATE_CMD_ENTRY(QOS_SHOW_QOSOBJECT, HandleQosShowQosObject),
  65. CREATE_CMD_ENTRY(QOS_SHOW_FLOWSPEC, HandleQosShowFlowspec),
  66. CREATE_CMD_ENTRY(QOS_SHOW_GLOBAL, HandleQosShowGlobal),
  67. #ifdef ALLOW_CHILD_HELPERS
  68. CREATE_CMD_ENTRY(SHOW_HELPER, HandleQosShowHelper),
  69. #endif
  70. };
  71. CMD_GROUP_ENTRY g_QosCmdGroups[] =
  72. {
  73. CREATE_CMD_GROUP_ENTRY(GROUP_ADD, g_QosAddCmdTable),
  74. CREATE_CMD_GROUP_ENTRY(GROUP_DELETE, g_QosDelCmdTable),
  75. CREATE_CMD_GROUP_ENTRY(GROUP_SET, g_QosSetCmdTable),
  76. CREATE_CMD_GROUP_ENTRY(GROUP_SHOW, g_QosShowCmdTable),
  77. };
  78. ULONG g_ulQosNumGroups = sizeof(g_QosCmdGroups)/sizeof(CMD_GROUP_ENTRY);
  79. CMD_ENTRY g_QosCmds[] =
  80. {
  81. CREATE_CMD_ENTRY(INSTALL, HandleQosInstall),
  82. CREATE_CMD_ENTRY(UNINSTALL, HandleQosUninstall),
  83. };
  84. ULONG g_ulQosNumTopCmds = sizeof(g_QosCmds)/sizeof(CMD_ENTRY);