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.

231 lines
7.5 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ntddtc.h
  5. Abstract:
  6. This module contains type definitions for the interface between the
  7. traffic dll and kernel mode components.
  8. Definitions here should not be exposed to the external user.
  9. 'traffic.h' and 'qos.h' should be used as public include files instead.
  10. Author:
  11. Ofer Bar ( oferbar ) Oct 8, 1997
  12. Revision History:
  13. Ofer Bar ( oferbar ) Dec 1, 1997
  14. Add error codes
  15. --*/
  16. //---------------------------------------------------------------------------
  17. //
  18. // QoS supported guid
  19. //
  20. //---------------------------------------------------------------------------
  21. DEFINE_GUID( GUID_QOS_TC_SUPPORTED, 0xe40056dcL,
  22. 0x40c8, 0x11d1, 0x2c, 0x91, 0x00, 0xaa, 0x00, 0x57, 0x59, 0x15);
  23. DEFINE_GUID( GUID_QOS_TC_INTERFACE_UP_INDICATION,
  24. 0x0ca13af0L, 0x46c4, 0x11d1, 0x78, 0xac, 0x00, 0x80, 0x5f, 0x68, 0x35, 0x1e);
  25. DEFINE_GUID( GUID_QOS_TC_INTERFACE_DOWN_INDICATION,
  26. 0xaf5315e4L, 0xce61, 0x11d1, 0x7c, 0x8a, 0x00, 0xc0, 0x4f, 0xc9, 0xb5, 0x7c);
  27. DEFINE_GUID( GUID_QOS_TC_INTERFACE_CHANGE_INDICATION,
  28. 0xda76a254L, 0xce61, 0x11d1, 0x7c, 0x8a, 0x00, 0xc0, 0x4f, 0xc9, 0xb5, 0x7c);
  29. DEFINE_GUID( GUID_QOS_SCHEDULING_PROFILES_SUPPORTED, 0x1ff890f0L, 0x40ed, 0x11d1, 0x2c, 0x91, 0x00, 0xaa, 0x00, 0x57, 0x49, 0x15);
  30. DEFINE_GUID( GUID_QOS_CURRENT_SCHEDULING_PROFILE, 0x2966ed30L, 0x40ed, 0x11d1, 0x2c, 0x91, 0x00, 0xaa, 0x00, 0x57, 0x49, 0x15);
  31. DEFINE_GUID( GUID_QOS_DISABLE_DRR, 0x1fa6dc7aL, 0x6120, 0x11d1, 0x2c, 0x91, 0x00, 0xaa, 0x00, 0x57, 0x49, 0x15);
  32. DEFINE_GUID( GUID_QOS_LOG_THRESHOLD_REACHED, 0x357b74d2L,0x6134,0x11d1,0xab,0x5b,0x00,0xa0,0xc9,0x24,0x88,0x37);
  33. DEFINE_GUID( GUID_QOS_LOG_BUFFER_SIZE, 0x357b74d3L,0x6134,0x11d1,0xab,0x5b,0x00,0xa0,0xc9,0x24,0x88,0x37);
  34. DEFINE_GUID( GUID_QOS_LOG_THRESHOLD, 0x357b74d0L,0x6134,0x11d1,0xab,0x5b,0x00,0xa0,0xc9,0x24,0x88,0x37);
  35. DEFINE_GUID( GUID_QOS_LOG_DATA, 0x357b74d1L,0x6134,0x11d1,0xab,0x5b,0x00,0xa0,0xc9,0x24,0x88,0x37);
  36. DEFINE_GUID( GUID_QOS_LOG_LEVEL,0x9dd7f3ae,0xf2a8,0x11d2,0xbe,0x1b,0x00,0xa0,0xc9,0x9e,0xe6,0x3b);
  37. DEFINE_GUID( GUID_QOS_LOG_MASK,0x9e696320,0xf2a8,0x11d2,0xbe,0x1b,0x00,0xa0,0xc9,0x9e,0xe6,0x3b);
  38. #ifndef __NTDDTC_H
  39. #define __NTDDTC_H
  40. //
  41. // Kernel NT private error codes
  42. // these should be only returned to the GPC but not
  43. // to NDIS, since WMI will not map them to winerror
  44. //
  45. #define QOS_STATUS_INVALID_SERVICE_TYPE 0xC0020080L
  46. #define QOS_STATUS_INVALID_TOKEN_RATE 0xC0020081L
  47. #define QOS_STATUS_INVALID_PEAK_RATE 0xC0020082L
  48. #define QOS_STATUS_INVALID_SD_MODE 0xC0020083L
  49. #define QOS_STATUS_INVALID_QOS_PRIORITY 0xC0020084L
  50. #define QOS_STATUS_INVALID_TRAFFIC_CLASS 0xC0020085L
  51. #define QOS_STATUS_TC_OBJECT_LENGTH_INVALID 0xC0020086L
  52. #define QOS_STATUS_INVALID_FLOW_MODE 0xC0020087L
  53. #define QOS_STATUS_INVALID_DIFFSERV_FLOW 0xC0020088L
  54. #define QOS_STATUS_DS_MAPPING_EXISTS 0xC0020089L
  55. #define QOS_STATUS_INVALID_SHAPE_RATE 0xC0020090L
  56. #define QOS_STATUS_INVALID_DS_CLASS 0xC0020091L
  57. //
  58. // These are the public QOS error codes
  59. //
  60. #define QOS_STATUS_INCOMPATABLE_QOS NDIS_STATUS_INCOMPATABLE_QOS
  61. // The CF_INFO structure for the QoS classification family.
  62. // Note that this is not interpreted by the GPC, but it is shared by
  63. // all clients of the GPC which are of the QoS classification family.
  64. #define MAX_INSTANCE_NAME_LENGTH 256
  65. typedef struct _CF_INFO_QOS {
  66. USHORT InstanceNameLength; // name length
  67. WCHAR InstanceName[MAX_INSTANCE_NAME_LENGTH]; // instance name
  68. ULONG ToSValue;
  69. ULONG Flags;
  70. TC_GEN_FLOW GenFlow;
  71. } CF_INFO_QOS, *PCF_INFO_QOS;
  72. //
  73. // This is the buffer that the data provider sends up
  74. // on Interface Up notification
  75. //
  76. typedef struct _TC_INDICATION_BUFFER {
  77. ULONG SubCode; // reason for notification
  78. TC_SUPPORTED_INFO_BUFFER InfoBuffer;
  79. } TC_INDICATION_BUFFER, *PTC_INDICATION_BUFFER;
  80. //
  81. // Definitions for the Class Map (including CBQ)
  82. //
  83. typedef struct _TC_CLASS_MAP_FLOW {
  84. ULONG DefaultClass; // Default Class Id
  85. ULONG ObjectsLength; // Length of Objects
  86. QOS_OBJECT_HDR Objects; // Offset to Objects
  87. } TC_CLASS_MAP_FLOW, *PTC_CLASS_MAP_FLOW;
  88. typedef struct _CF_INFO_CLASS_MAP {
  89. USHORT InstanceNameLength; // name length
  90. WCHAR InstanceName[MAX_INSTANCE_NAME_LENGTH]; // instance name
  91. ULONG Flags;
  92. TC_CLASS_MAP_FLOW ClassMapInfo;
  93. } CF_INFO_CLASS_MAP, *PCF_INFO_CLASS_MAP;
  94. //
  95. // Internal QoS Objects start at this offset from the base
  96. //
  97. #define QOS_PRIVATE_GENERAL_ID_BASE 3000
  98. #define QOS_OBJECT_WAN_MEDIA (0x00000001 + QOS_PRIVATE_GENERAL_ID_BASE)
  99. /* QOS_WAN_MEDIA structure passed */
  100. #define QOS_OBJECT_SHAPER_QUEUE_DROP_MODE (0x00000002 + QOS_PRIVATE_GENERAL_ID_BASE)
  101. /* QOS_ShaperQueueDropMode structure */
  102. #define QOS_OBJECT_SHAPER_QUEUE_LIMIT (0x00000003 + QOS_PRIVATE_GENERAL_ID_BASE)
  103. /* QOS_ShaperQueueLimit structure */
  104. #define QOS_OBJECT_PRIORITY (0x00000004 + QOS_PRIVATE_GENERAL_ID_BASE)
  105. /* QOS_PRIORITY structure passed */
  106. //
  107. // This structure defines the media specific information needed by ndiswan to
  108. // create a flow.
  109. //
  110. typedef struct _QOS_WAN_MEDIA {
  111. QOS_OBJECT_HDR ObjectHdr;
  112. UCHAR LinkId[6];
  113. ULONG ISSLOW;
  114. } QOS_WAN_MEDIA, *LPQOS_WAN_MEDIA;
  115. //
  116. // This structure allows overriding of the default schema used to drop
  117. // packets when a flow's shaper queue limit is reached.
  118. //
  119. // DropMethod -
  120. // QOS_SHAPER_DROP_FROM_HEAD - Drop packets from
  121. // the head of the queue until the new packet can be
  122. // accepted into the shaper under the current limit. This
  123. // behavior is the default.
  124. // QOS_SHAPER_DROP_INCOMING - Drop the incoming,
  125. // limit-offending packet.
  126. //
  127. //
  128. typedef struct _QOS_SHAPER_QUEUE_LIMIT_DROP_MODE {
  129. QOS_OBJECT_HDR ObjectHdr;
  130. ULONG DropMode;
  131. } QOS_SHAPER_QUEUE_LIMIT_DROP_MODE, *LPQOS_SHAPER_QUEUE_LIMIT_DROP_MODE;
  132. #define QOS_SHAPER_DROP_INCOMING 0
  133. #define QOS_SHAPER_DROP_FROM_HEAD 1
  134. //
  135. // This structure allows the default per-flow limit on the shaper queue
  136. // size to be overridden.
  137. //
  138. // QueueSizeLimit - Limit, in bytes, of the size of the shaper queue
  139. //
  140. //
  141. typedef struct _QOS_SHAPER_QUEUE_LIMIT {
  142. QOS_OBJECT_HDR ObjectHdr;
  143. ULONG QueueSizeLimit;
  144. } QOS_SHAPER_QUEUE_LIMIT, *LPQOS_SHAPER_QUEUE_LIMIT;
  145. //
  146. // This structure defines the absolute priorty of the flow. Priorities in the
  147. // range of 0-7 are currently defined. Receive Priority is not currently used,
  148. // but may at some point in the future.
  149. //
  150. typedef struct _QOS_PRIORITY {
  151. QOS_OBJECT_HDR ObjectHdr;
  152. UCHAR SendPriority; /* this gets mapped to layer 2 priority.*/
  153. UCHAR SendFlags; /* there are none currently defined.*/
  154. UCHAR ReceivePriority; /* this could be used to decide who
  155. * gets forwarded up the stack first
  156. * - not used now */
  157. UCHAR Unused;
  158. } QOS_PRIORITY, *LPQOS_PRIORITY;
  159. #define PARAM_TYPE_GQOS_INFO 0xABC0DEF0
  160. #endif