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.

192 lines
4.8 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. aaqos.h
  5. Abstract:
  6. QOS structures and definitions for the ATMARP module.
  7. Revision History:
  8. Who When What
  9. -------- -------- ----------------------------------------------
  10. arvindm 08-07-96 Created
  11. Notes:
  12. --*/
  13. #ifndef _AAQOS__H
  14. #define _AAQOS__H
  15. //
  16. // Encapsulation method used on a VC.
  17. //
  18. typedef enum
  19. {
  20. ENCAPSULATION_TYPE_LLCSNAP, // LLC/SNAP encapsulation
  21. ENCAPSULATION_TYPE_NULL // NULL encapsulation
  22. } ATMARP_VC_ENCAPSULATION_TYPE, *PATMARP_VC_ENCAPSULATION_TYPE;
  23. //
  24. // Flow specifications for an ATMARP connection.
  25. //
  26. typedef struct _ATMARP_FLOW_SPEC
  27. {
  28. ULONG SendAvgBandwidth; // Bytes/sec
  29. ULONG SendPeakBandwidth; // Bytes/sec
  30. ULONG SendMaxSize; // Bytes
  31. SERVICETYPE SendServiceType;
  32. ULONG ReceiveAvgBandwidth; // Bytes/sec
  33. ULONG ReceivePeakBandwidth; // Bytes/sec
  34. ULONG ReceiveMaxSize; // Bytes
  35. SERVICETYPE ReceiveServiceType;
  36. ATMARP_VC_ENCAPSULATION_TYPE Encapsulation;
  37. ULONG AgingTime;
  38. } ATMARP_FLOW_SPEC, *PATMARP_FLOW_SPEC;
  39. //
  40. // Filter specifications for an ATMARP connection.
  41. //
  42. typedef struct _ATMARP_FILTER_SPEC
  43. {
  44. ULONG DestinationPort;// IP port number
  45. } ATMARP_FILTER_SPEC, *PATMARP_FILTER_SPEC;
  46. //
  47. // The wild-card IP port number matches all destination ports
  48. //
  49. #define AA_IP_PORT_WILD_CARD ((ULONG)-1)
  50. //
  51. // The instance name of a flow is a FIXED size array, of the form below,
  52. // and is embedded in the ATMARP_FLOW_INFO struct.
  53. // The 8-character all-zeros field is filled in with the "flow number", which
  54. // is guaranteed to be unique across all existing flows within atmarpc (
  55. // the number may be recycled as flows come and go).
  56. // The "A993E347" constant is a random number that represents a signature
  57. // that with high probability is unique to atmarpc.
  58. //
  59. // We should re-visit this naming scheme once QOS mandates a more structured
  60. // mechanism for naming flows.
  61. //
  62. #define AA_FLOW_INSTANCE_NAME_TEMPLATE L"00000000:A993E347"
  63. #define AA_FLOW_INSTANCE_NAME_LEN \
  64. ((sizeof(AA_FLOW_INSTANCE_NAME_TEMPLATE)/sizeof(WCHAR))-1)
  65. //
  66. // The FLOW INFO structure represents a flow instantiated by, for
  67. // example, RSVP.
  68. //
  69. // One of these structures is created when the Generic Packet Classifier
  70. // (GPC) notifies us about a flow creation.
  71. //
  72. typedef struct _ATMARP_FLOW_INFO
  73. {
  74. struct _ATMARP_FLOW_INFO * pNextFlow;
  75. struct _ATMARP_FLOW_INFO * pPrevFlow;
  76. #ifdef GPC
  77. PVOID VcContext;
  78. GPC_HANDLE CfInfoHandle;
  79. WCHAR FlowInstanceName[AA_FLOW_INSTANCE_NAME_LEN];
  80. #endif // GPC
  81. ULONG PacketSizeLimit;
  82. ATMARP_FILTER_SPEC FilterSpec;
  83. ATMARP_FLOW_SPEC FlowSpec;
  84. } ATMARP_FLOW_INFO, *PATMARP_FLOW_INFO;
  85. #ifdef QOS_HEURISTICS
  86. typedef enum _ATMARP_FLOW_TYPES
  87. {
  88. AA_FLOW_TYPE_LOW_BW,
  89. AA_FLOW_TYPE_HIGH_BW,
  90. AA_FLOW_TYPE_MAX
  91. } ATMARP_FLOW_TYPES;
  92. //
  93. // Default QOS parameters for a Low Bandwidth VC
  94. //
  95. #define AAF_DEF_LOWBW_SEND_BANDWIDTH 6000 // Bytes/Sec
  96. #define AAF_DEF_LOWBW_RECV_BANDWIDTH 6000 // Bytes/Sec
  97. #define AAF_DEF_LOWBW_SERVICETYPE SERVICETYPE_BESTEFFORT
  98. #define AAF_DEF_LOWBW_ENCAPSULATION ENCAPSULATION_TYPE_LLCSNAP
  99. #define AAF_DEF_LOWBW_AGING_TIME 30 // Seconds
  100. #define AAF_DEF_LOWBW_SEND_THRESHOLD 1024 // Bytes
  101. #define AAF_DEF_HIGHBW_SEND_BANDWIDTH 250000 // Bytes/Sec
  102. #define AAF_DEF_HIGHBW_RECV_BANDWIDTH 6000 // Bytes/Sec
  103. #define AAF_DEF_HIGHBW_SERVICETYPE SERVICETYPE_GUARANTEED
  104. #define AAF_DEF_HIGHBW_ENCAPSULATION ENCAPSULATION_TYPE_LLCSNAP
  105. #define AAF_DEF_HIGHBW_AGING_TIME 10 // Seconds
  106. #endif // QOS_HEURISTICS
  107. //
  108. // Filter and Flow spec extractor function template:
  109. // Given a packet, it extracts flow and filter info out of it.
  110. //
  111. typedef
  112. VOID
  113. (*PAA_GET_PACKET_SPEC_FUNC)(
  114. IN PVOID Context,
  115. IN PNDIS_PACKET pNdisPacket,
  116. OUT PATMARP_FLOW_INFO *ppFlowInfo,
  117. OUT PATMARP_FLOW_SPEC * ppFlowSpec,
  118. OUT PATMARP_FILTER_SPEC * ppFilterSpec
  119. );
  120. #define NULL_PAA_GET_PACKET_SPEC_FUNC ((PAA_GET_PACKET_SPEC_FUNC)NULL)
  121. //
  122. // Flow-spec matcher function template
  123. //
  124. typedef
  125. BOOLEAN
  126. (*PAA_FLOW_SPEC_MATCH_FUNC)(
  127. IN PVOID Context,
  128. IN PATMARP_FLOW_SPEC pSourceFlowSpec,
  129. IN PATMARP_FLOW_SPEC pTargetFlowSpec
  130. );
  131. #define NULL_PAA_FLOW_SPEC_MATCH_FUNC ((PAA_FLOW_SPEC_MATCH_FUNC)NULL)
  132. //
  133. // Filter-spec matcher function template
  134. //
  135. typedef
  136. BOOLEAN
  137. (*PAA_FILTER_SPEC_MATCH_FUNC)(
  138. IN PVOID Context,
  139. IN PATMARP_FILTER_SPEC pSourceFilterSpec,
  140. IN PATMARP_FILTER_SPEC pTargetFilterSpec
  141. );
  142. #define NULL_PAA_FILTER_SPEC_MATCH_FUNC ((PAA_FILTER_SPEC_MATCH_FUNC)NULL)
  143. #ifdef GPC
  144. #define GpcRegisterClient (pAtmArpGlobalInfo->GpcCalls.GpcRegisterClientHandler)
  145. #define GpcClassifyPacket (AtmArpGpcClassifyPacketHandler)
  146. #define GpcDeregisterClient (pAtmArpGlobalInfo->GpcCalls.GpcDeregisterClientHandler)
  147. #define GpcGetCfInfoClientContext (AtmArpGpcGetCfInfoClientContextHandler)
  148. #endif // GPC
  149. #endif // _AAQOS__H