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.

151 lines
3.7 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. dlcreg.h
  5. Abstract:
  6. Defines, Structures, Typedefs, Macros, Externs and Prototypes for dlcreg.c
  7. Author:
  8. Richard L Firth (rfirth) 31-Mar-1993
  9. Revision History:
  10. 30-Mar-1993 rfirth
  11. created
  12. 04-May-1994 rfirth
  13. Exposed GetAdapterParameters
  14. --*/
  15. #ifndef _DLCREG_
  16. #define _DLCREG_
  17. //
  18. // manifests
  19. //
  20. #define PARAMETER_AS_SPECIFIED ((ULONG)-1)
  21. #define PARAMETER_IS_BOOLEAN 1
  22. #define PARAMETER_IS_UCHAR 2
  23. //
  24. // types
  25. //
  26. //
  27. // REGISTRY_PARAMETER_DESCRIPTOR - structure used to get values from registry
  28. // entries. Maintains information about a registry entry and supplies a default
  29. // value should the registry entry not be available
  30. //
  31. typedef struct {
  32. ULONG Type; // expected type
  33. ULONG RealType; // eg. PARAMETER_BOOLEAN
  34. PVOID Value; // default value if REG_DWORD, or pointer to default value
  35. ULONG Length; // IN: expected length of variable; OUT: actual length
  36. PVOID Variable; // pointer to variable to update from registry
  37. ULONG LowerLimit; // lower limit for REG_DWORD values
  38. ULONG UpperLimit; // upper limit for REG_DWORD values
  39. } REGISTRY_PARAMETER_DESCRIPTOR, *PREGISTRY_PARAMETER_DESCRIPTOR;
  40. //
  41. // DLC_REGISTRY_PARAMETER - describes an entry in the DLC\Parameters\<adapter>
  42. // section. Supplies the name of the parameter and its default value
  43. //
  44. typedef struct {
  45. PWSTR ParameterName;
  46. PVOID DefaultValue;
  47. REGISTRY_PARAMETER_DESCRIPTOR Descriptor;
  48. } DLC_REGISTRY_PARAMETER, *PDLC_REGISTRY_PARAMETER;
  49. //
  50. // ADAPTER_CONFIGURATION_INFO - for each adapter that DLC can talk to, there is
  51. // potentially the following configuration information which can be stored in
  52. // the DLC\Parameters\<adapter_name> key. The values are not necessarily stored
  53. // in the format in which they are used internally
  54. //
  55. typedef struct {
  56. //
  57. // SwapAddressBits - when talking over Ethernet, defines whether to swap the
  58. // outgoing destination address bits and incoming source address bits
  59. //
  60. BOOLEAN SwapAddressBits;
  61. //
  62. // UseDix - if the Ethernet type in the DIR.OPEN.ADAPTER is set to default,
  63. // then we consult this flag to determine whether to send DIX or 802.3
  64. // format Ethernet frames. The default is 802.3 (ie UseDix = 0)
  65. //
  66. BOOLEAN UseDix;
  67. //
  68. // T1TickOne, T2TickOne, TiTickOne, T1TickTwo, T2TickTwo, TiTickTwo - timer
  69. // tick values in 40mSec increments. Contained in LLC_TICKS structure
  70. //
  71. LLC_TICKS TimerTicks;
  72. //
  73. // UseEthernetFrameSize - if set for a non-TR card then we use the value
  74. // reported by ethernet cards for the maximum frame size, else we query
  75. // the MAC for the maximum supported frame size.
  76. // Bridging is the mother of this invention: we need some way to influence
  77. // DLC's maximum frame size when talking over non-Token Ring nets - FDDI
  78. // and Ethernet in this case.
  79. //
  80. BOOLEAN UseEthernetFrameSize;
  81. } ADAPTER_CONFIGURATION_INFO, *PADAPTER_CONFIGURATION_INFO;
  82. //
  83. // prototypes
  84. //
  85. VOID
  86. DlcRegistryInitialization(
  87. IN PUNICODE_STRING RegistryPath
  88. );
  89. VOID
  90. DlcRegistryTermination(
  91. VOID
  92. );
  93. VOID
  94. LoadDlcConfiguration(
  95. VOID
  96. );
  97. VOID
  98. LoadAdapterConfiguration(
  99. IN PUNICODE_STRING AdapterName,
  100. OUT PADAPTER_CONFIGURATION_INFO ConfigInfo
  101. );
  102. NTSTATUS
  103. GetAdapterParameters(
  104. IN PUNICODE_STRING AdapterName,
  105. IN PDLC_REGISTRY_PARAMETER Parameters,
  106. IN ULONG NumberOfParameters,
  107. IN BOOLEAN SetOnFail
  108. );
  109. #ifdef NDIS40
  110. NTSTATUS
  111. GetAdapterWaitTimeout(PULONG pulWait);
  112. #endif // NDIS40
  113. #endif // _DLCREG_