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.

239 lines
7.9 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. union {
  69. struct QosCfTransportInfo {
  70. ULONG ToSValue :8;
  71. ULONG AllowedOffloads :24;
  72. };
  73. ULONG TransportInformation;
  74. };
  75. ULONG Flags;
  76. TC_GEN_FLOW GenFlow;
  77. } CF_INFO_QOS, *PCF_INFO_QOS;
  78. //
  79. // This is the buffer that the data provider sends up
  80. // on Interface Up notification
  81. //
  82. typedef struct _TC_INDICATION_BUFFER {
  83. ULONG SubCode; // reason for notification
  84. TC_SUPPORTED_INFO_BUFFER InfoBuffer;
  85. } TC_INDICATION_BUFFER, *PTC_INDICATION_BUFFER;
  86. //
  87. // Definitions for the Class Map (including CBQ)
  88. //
  89. typedef struct _TC_CLASS_MAP_FLOW {
  90. ULONG DefaultClass; // Default Class Id
  91. ULONG ObjectsLength; // Length of Objects
  92. QOS_OBJECT_HDR Objects; // Offset to Objects
  93. } TC_CLASS_MAP_FLOW, *PTC_CLASS_MAP_FLOW;
  94. typedef struct _CF_INFO_CLASS_MAP {
  95. USHORT InstanceNameLength; // name length
  96. WCHAR InstanceName[MAX_INSTANCE_NAME_LENGTH]; // instance name
  97. ULONG Flags;
  98. TC_CLASS_MAP_FLOW ClassMapInfo;
  99. } CF_INFO_CLASS_MAP, *PCF_INFO_CLASS_MAP;
  100. //
  101. // Internal QoS Objects start at this offset from the base
  102. //
  103. #define QOS_PRIVATE_GENERAL_ID_BASE 3000
  104. #define QOS_OBJECT_WAN_MEDIA (0x00000001 + QOS_PRIVATE_GENERAL_ID_BASE)
  105. /* QOS_WAN_MEDIA structure passed */
  106. #define QOS_OBJECT_SHAPER_QUEUE_DROP_MODE (0x00000002 + QOS_PRIVATE_GENERAL_ID_BASE)
  107. /* QOS_ShaperQueueDropMode structure */
  108. #define QOS_OBJECT_SHAPER_QUEUE_LIMIT (0x00000003 + QOS_PRIVATE_GENERAL_ID_BASE)
  109. /* QOS_ShaperQueueLimit structure */
  110. #define QOS_OBJECT_PRIORITY (0x00000004 + QOS_PRIVATE_GENERAL_ID_BASE)
  111. /* QOS_PRIORITY structure passed */
  112. //
  113. // This structure defines the media specific information needed by ndiswan to
  114. // create a flow.
  115. //
  116. typedef struct _QOS_WAN_MEDIA {
  117. QOS_OBJECT_HDR ObjectHdr;
  118. UCHAR LinkId[6];
  119. ULONG ISSLOW;
  120. } QOS_WAN_MEDIA, *LPQOS_WAN_MEDIA;
  121. //
  122. // This structure allows overriding of the default schema used to drop
  123. // packets when a flow's shaper queue limit is reached.
  124. //
  125. // DropMethod -
  126. // QOS_SHAPER_DROP_FROM_HEAD - Drop packets from
  127. // the head of the queue until the new packet can be
  128. // accepted into the shaper under the current limit. This
  129. // behavior is the default.
  130. // QOS_SHAPER_DROP_INCOMING - Drop the incoming,
  131. // limit-offending packet.
  132. //
  133. //
  134. typedef struct _QOS_SHAPER_QUEUE_LIMIT_DROP_MODE {
  135. QOS_OBJECT_HDR ObjectHdr;
  136. ULONG DropMode;
  137. } QOS_SHAPER_QUEUE_LIMIT_DROP_MODE, *LPQOS_SHAPER_QUEUE_LIMIT_DROP_MODE;
  138. #define QOS_SHAPER_DROP_INCOMING 0
  139. #define QOS_SHAPER_DROP_FROM_HEAD 1
  140. //
  141. // This structure allows the default per-flow limit on the shaper queue
  142. // size to be overridden.
  143. //
  144. // QueueSizeLimit - Limit, in bytes, of the size of the shaper queue
  145. //
  146. //
  147. typedef struct _QOS_SHAPER_QUEUE_LIMIT {
  148. QOS_OBJECT_HDR ObjectHdr;
  149. ULONG QueueSizeLimit;
  150. } QOS_SHAPER_QUEUE_LIMIT, *LPQOS_SHAPER_QUEUE_LIMIT;
  151. //
  152. // This structure defines the absolute priorty of the flow. Priorities in the
  153. // range of 0-7 are currently defined. Receive Priority is not currently used,
  154. // but may at some point in the future.
  155. //
  156. typedef struct _QOS_PRIORITY {
  157. QOS_OBJECT_HDR ObjectHdr;
  158. UCHAR SendPriority; /* this gets mapped to layer 2 priority.*/
  159. UCHAR SendFlags; /* there are none currently defined.*/
  160. UCHAR ReceivePriority; /* this could be used to decide who
  161. * gets forwarded up the stack first
  162. * - not used now */
  163. UCHAR Unused;
  164. } QOS_PRIORITY, *LPQOS_PRIORITY;
  165. #define PARAM_TYPE_GQOS_INFO 0xABC0DEF0
  166. #endif