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.

279 lines
7.7 KiB

  1. //-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: P V C D A T A. H
  7. //
  8. // Contents: PVC parameters
  9. //
  10. // Notes:
  11. //
  12. // Author: tongl 20 Feb, 1998
  13. //
  14. //-----------------------------------------------------------------------
  15. #pragma once
  16. #define FIELD_ANY ((ULONG)0xffffffff)
  17. #define FIELD_ABSENT ((ULONG)0xfffffffe)
  18. #define FIELD_UNSET ((ULONG)0xfffffffd)
  19. const int c_iCellSize = 48;
  20. const int c_iKbSize = 1000;
  21. const DWORD c_dwDefTransmitByteBurstLength = 9188;
  22. const DWORD c_dwDefTransmitMaxSduSize = 9188;
  23. static const WCHAR c_szDefaultCallingAtmAddr[] =
  24. L"0000000000000000000000000000000000000001";
  25. static const WCHAR c_szDefaultCalledAtmAddr[] =
  26. L"0000000000000000000000000000000000000000";
  27. const int MAX_VPI = 255;
  28. const int MIN_VCI = 32;
  29. const int MAX_VCI = 1023;
  30. const int c_nSnapIdMaxBytes = 5;
  31. const int c_nHighLayerInfoMaxBytes = 8;
  32. enum PVCType
  33. {
  34. PVC_ATMARP =1,
  35. PVC_PPP_ATM_CLIENT =2,
  36. PVC_PPP_ATM_SERVER =3,
  37. PVC_CUSTOM =4
  38. };
  39. enum AALType
  40. {
  41. // AAL_TYPE_AAL0= 1,
  42. // AAL_TYPE_AAL1= 2,
  43. // AAL_TYPE_AAL34= 4,
  44. AAL_TYPE_AAL5= 8
  45. };
  46. // ATM Service Category
  47. enum ATM_SERVICE_CATEGORY
  48. {
  49. ATM_SERVICE_CATEGORY_CBR = 1, // Constant Bit Rate
  50. ATM_SERVICE_CATEGORY_VBR = 2, // Variable Bit Rate
  51. ATM_SERVICE_CATEGORY_UBR = 4, // Unspecified Bit Rate
  52. ATM_SERVICE_CATEGORY_ABR = 8 // Available Bit Rate
  53. };
  54. void SetPvcDwordParam(HKEY hkeyAdapterPVCId,
  55. PCWSTR pszParamName,
  56. DWORD dwParam);
  57. class CPvcInfo
  58. {
  59. public:
  60. CPvcInfo(PCWSTR pszPvcId);
  61. ~CPvcInfo();
  62. CPvcInfo & operator=(const CPvcInfo & PvcInfo); // copy operator
  63. void SetDefaults(PVCType type);
  64. void SetTypeDefaults(PVCType type);
  65. void SetDefaultsForAtmArp();
  66. void SetDefaultsForPPPOut();
  67. void SetDefaultsForPPPIn();
  68. void SetDefaultsForCustom();
  69. void ResetOldValues();
  70. // the registry key where this PVC is stored
  71. tstring m_strPvcId;
  72. // this PVC has been deleted
  73. BOOL m_fDeleted;
  74. // PVC_TYPE
  75. PVCType m_dwPVCType;
  76. PVCType m_dwOldPVCType;
  77. // Required Attributes
  78. tstring m_strName; // PVC display name
  79. tstring m_strOldName;
  80. DWORD m_dwVpi;
  81. DWORD m_dwOldVpi;
  82. DWORD m_dwVci;
  83. DWORD m_dwOldVci;
  84. AALType m_dwAAL;
  85. AALType m_dwOldAAL;
  86. // Matching creteria
  87. tstring m_strCallingAddr;
  88. tstring m_strOldCallingAddr;
  89. tstring m_strCalledAddr;
  90. tstring m_strOldCalledAddr;
  91. // Flags
  92. DWORD m_dwFlags;
  93. // Quality Info
  94. DWORD m_dwTransmitPeakCellRate;
  95. DWORD m_dwOldTransmitPeakCellRate;
  96. DWORD m_dwTransmitAvgCellRate;
  97. DWORD m_dwOldTransmitAvgCellRate;
  98. DWORD m_dwTransmitByteBurstLength;
  99. DWORD m_dwOldTransmitByteBurstLength;
  100. DWORD m_dwTransmitMaxSduSize;
  101. DWORD m_dwOldTransmitMaxSduSize;
  102. ATM_SERVICE_CATEGORY m_dwTransmitServiceCategory;
  103. ATM_SERVICE_CATEGORY m_dwOldTransmitServiceCategory;
  104. DWORD m_dwReceivePeakCellRate;
  105. DWORD m_dwOldReceivePeakCellRate;
  106. DWORD m_dwReceiveAvgCellRate;
  107. DWORD m_dwOldReceiveAvgCellRate;
  108. DWORD m_dwReceiveByteBurstLength;
  109. DWORD m_dwOldReceiveByteBurstLength;
  110. DWORD m_dwReceiveMaxSduSize;
  111. DWORD m_dwOldReceiveMaxSduSize;
  112. ATM_SERVICE_CATEGORY m_dwReceiveServiceCategory;
  113. ATM_SERVICE_CATEGORY m_dwOldReceiveServiceCategory;
  114. // Local BLLI and BHLI info
  115. DWORD m_dwLocalLayer2Protocol;
  116. DWORD m_dwOldLocalLayer2Protocol;
  117. DWORD m_dwLocalUserSpecLayer2;
  118. DWORD m_dwOldLocalUserSpecLayer2;
  119. DWORD m_dwLocalLayer3Protocol;
  120. DWORD m_dwOldLocalLayer3Protocol;
  121. DWORD m_dwLocalUserSpecLayer3;
  122. DWORD m_dwOldLocalUserSpecLayer3;
  123. DWORD m_dwLocalLayer3IPI;
  124. DWORD m_dwOldLocalLayer3IPI;
  125. tstring m_strLocalSnapId;
  126. tstring m_strOldLocalSnapId;
  127. DWORD m_dwLocalHighLayerInfoType;
  128. DWORD m_dwOldLocalHighLayerInfoType;
  129. tstring m_strLocalHighLayerInfo;
  130. tstring m_strOldLocalHighLayerInfo;
  131. // Destination BLLI and BHLI info
  132. DWORD m_dwDestnLayer2Protocol;
  133. DWORD m_dwOldDestnLayer2Protocol;
  134. DWORD m_dwDestnUserSpecLayer2;
  135. DWORD m_dwOldDestnUserSpecLayer2;
  136. DWORD m_dwDestnLayer3Protocol;
  137. DWORD m_dwOldDestnLayer3Protocol;
  138. DWORD m_dwDestnUserSpecLayer3;
  139. DWORD m_dwOldDestnUserSpecLayer3;
  140. DWORD m_dwDestnLayer3IPI;
  141. DWORD m_dwOldDestnLayer3IPI;
  142. tstring m_strDestnSnapId;
  143. tstring m_strOldDestnSnapId;
  144. DWORD m_dwDestnHighLayerInfoType;
  145. DWORD m_dwOldDestnHighLayerInfoType;
  146. tstring m_strDestnHighLayerInfo;
  147. tstring m_strOldDestnHighLayerInfo;
  148. };
  149. typedef list<CPvcInfo*> PVC_INFO_LIST;
  150. //
  151. // ATMUNI Call Manager Property structure
  152. // holds adapter specific PVC parameters (configurable ) and state
  153. //
  154. class CUniAdapterInfo
  155. {
  156. public:
  157. CUniAdapterInfo(){};
  158. ~CUniAdapterInfo(){};
  159. CUniAdapterInfo & operator=(const CUniAdapterInfo & AdapterInfo); // copy operator
  160. void SetDefaults(PCWSTR pszBindName);
  161. // the adapter's binding state
  162. AdapterBindingState m_BindingState;
  163. // Instance Guid of net card
  164. tstring m_strBindName;
  165. PVC_INFO_LIST m_listPVCs;
  166. // flags
  167. BOOL m_fDeleted;
  168. };
  169. typedef list<CUniAdapterInfo*> UNI_ADAPTER_LIST;
  170. // Constants
  171. // Registry key names
  172. static const WCHAR c_szPVCType[] = L"PVCType";
  173. static const WCHAR c_szPVCName[] = L"PVCName";
  174. // main page
  175. static const WCHAR c_szVpi[] = L"Vpi";
  176. static const WCHAR c_szVci[] = L"Vci";
  177. static const WCHAR c_szAALType[] = L"AALType";
  178. static const WCHAR c_szCallingParty[] = L"CallingParty";
  179. static const WCHAR c_szCalledParty[] = L"CalledParty";
  180. // flags
  181. static const WCHAR c_szFlags[] = L"Flags";
  182. // qos
  183. static const WCHAR c_szTransmitPeakCellRate[] = L"TransmitPeakCellRate";
  184. static const WCHAR c_szTransmitAvgCellRate[] = L"TransmitAvgCellRate";
  185. static const WCHAR c_szTransmitByteBurstLength[] = L"TransmitByteBurstLength";
  186. static const WCHAR c_szTransmitMaxSduSize[] = L"TransmitMaxSduSize";
  187. static const WCHAR c_szTransmitServiceCategory[] = L"TransmitServiceCategory";
  188. static const WCHAR c_szReceivePeakCellRate[] = L"ReceivePeakCellRate";
  189. static const WCHAR c_szReceiveAvgCellRate[] = L"ReceiveAvgCellRate";
  190. static const WCHAR c_szReceiveByteBurstLength[] = L"ReceiveByteBurstLength";
  191. static const WCHAR c_szReceiveMaxSduSize[] = L"ReceiveMaxSduSize";
  192. static const WCHAR c_szReceiveServiceCategory[] = L"ReceiveServiceCategory";
  193. // BLLI & BHLI
  194. static const WCHAR c_szLocalLayer2Protocol[] = L"LocalLayer2Protocol";
  195. static const WCHAR c_szLocalUserSpecLayer2[] = L"LocalUserSpecLayer2";
  196. static const WCHAR c_szLocalLayer3Protocol[] = L"LocalLayer3Protocol";
  197. static const WCHAR c_szLocalUserSpecLayer3[] = L"LocalUserSpecLayer3";
  198. static const WCHAR c_szLocalLayer3IPI[] = L"LocalLayer3IPI";
  199. static const WCHAR c_szLocalSnapId[] = L"LocalSnapId";
  200. static const WCHAR c_szLocalHighLayerInfoType[] = L"LocalHighLayerInfoType";
  201. static const WCHAR c_szLocalHighLayerInfo[] = L"LocalHighLayerInfo";
  202. static const WCHAR c_szDestnLayer2Protocol[] = L"DestnLayer2Protocol";
  203. static const WCHAR c_szDestnUserSpecLayer2[] = L"DestnUserSpecLayer2";
  204. static const WCHAR c_szDestnLayer3Protocol[] = L"DestnLayer3Protocol";
  205. static const WCHAR c_szDestnUserSpecLayer3[] = L"DestnUserSpecLayer3";
  206. static const WCHAR c_szDestnLayer3IPI[] = L"DestnLayer3IPI";
  207. static const WCHAR c_szDestnSnapId[] = L"DestnSnapId";
  208. static const WCHAR c_szDestnHighLayerInfoType[] = L"DestnHighLayerInfoType";
  209. static const WCHAR c_szDestnHighLayerInfo[] = L"DestnHighLayerInfo";