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.

153 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. atkdrvr.h
  5. Abstract:
  6. This module contains the driver related information.
  7. Author:
  8. Jameel Hyder (jameelh@microsoft.com)
  9. Nikhil Kamkolkar (nikhilk@microsoft.com)
  10. Revision History:
  11. 19 Jun 1992 Initial Version
  12. Notes: Tab stop: 4
  13. --*/
  14. #ifndef _ATKDRVR_
  15. #define _ATKDRVR_
  16. // The following are the types of devices the Atalk driver will open
  17. //
  18. // WARNING:
  19. // Note that the ordering of the below is very important in
  20. // ATKDRVR.C's DriverEntry routine, where it is assumed that the order
  21. // of the device names in their array corresponds to the order of types here
  22. #define ATALK_NO_DEVICES 6
  23. typedef enum
  24. {
  25. ATALK_DEV_DDP = 0,
  26. ATALK_DEV_ADSP,
  27. ATALK_DEV_ASP,
  28. ATALK_DEV_PAP,
  29. ATALK_DEV_ARAP,
  30. ATALK_DEV_ASPC,
  31. // The following device type is used only for the tdi action dispatch.
  32. // It *should not* be included in the ATALK_NODEVICES count.
  33. ATALK_DEV_ANY
  34. } ATALK_DEV_TYPE;
  35. // Atalk Device Context
  36. typedef struct _ATALK_DEV_CTX
  37. {
  38. ATALK_DEV_TYPE adc_DevType;
  39. // Provider info and provider statistics.
  40. TDI_PROVIDER_INFO adc_ProvInfo;
  41. TDI_PROVIDER_STATISTICS adc_ProvStats;
  42. } ATALK_DEV_CTX, *PATALK_DEV_CTX;
  43. // Atalk device object
  44. typedef struct _ATALK_DEV_OBJ
  45. {
  46. DEVICE_OBJECT DevObj;
  47. ATALK_DEV_CTX Ctx;
  48. } ATALK_DEV_OBJ, *PATALK_DEV_OBJ;
  49. #define ATALK_DEV_EXT_LEN \
  50. (sizeof(ATALK_DEV_OBJ) - sizeof(DEVICE_OBJECT))
  51. // Define the type for the TDI Control Channel object.
  52. #define TDI_CONTROL_CHANNEL_FILE 3
  53. //
  54. // The address of the atalk device objects are kept
  55. // in global storage. These are the device names the driver
  56. // will create
  57. //
  58. // IMPORTANT:
  59. // There is a strong connection between the names listed here and the
  60. // ATALK_DEVICE_TYPE enum. They must correspond exactly.
  61. //
  62. extern PWCHAR AtalkDeviceNames[];
  63. extern PATALK_DEV_OBJ AtalkDeviceObject[ATALK_NO_DEVICES];
  64. #define ATALK_UNLOADING 0x000000001
  65. #define ATALK_BINDING 0x000000002
  66. #define ATALK_PNP_IN_PROGRESS 0x000000004
  67. extern DWORD AtalkBindnUnloadStates;
  68. extern PVOID TdiAddressChangeRegHandle;
  69. #if DBG
  70. extern ATALK_SPIN_LOCK AtalkDebugSpinLock;
  71. extern DWORD AtalkDbgMdlsAlloced;
  72. extern DWORD AtalkDbgIrpsAlloced;
  73. #define ATALK_DBG_INC_COUNT(_Val) AtalkDbgIncCount(&_Val)
  74. #define ATALK_DBG_DEC_COUNT(_Val) AtalkDbgDecCount(&_Val)
  75. #else
  76. #define ATALK_DBG_INC_COUNT(_Val)
  77. #define ATALK_DBG_DEC_COUNT(_Val)
  78. #endif
  79. NTSTATUS
  80. AtalkDispatchInternalDeviceControl(
  81. IN PDEVICE_OBJECT DeviceObject,
  82. IN PIRP Irp);
  83. VOID
  84. AtalkCleanup(
  85. VOID);
  86. // LOCAL Function prototypes
  87. VOID
  88. atalkUnload(
  89. IN PDRIVER_OBJECT DriverObject);
  90. NTSTATUS
  91. AtalkDispatchCreate(
  92. IN PDEVICE_OBJECT DeviceObject,
  93. IN PIRP Irp);
  94. NTSTATUS
  95. AtalkDispatchCleanup(
  96. IN PDEVICE_OBJECT DeviceObject,
  97. IN PIRP Irp);
  98. NTSTATUS
  99. AtalkDispatchClose(
  100. IN PDEVICE_OBJECT DeviceObject,
  101. IN PIRP Irp);
  102. NTSTATUS
  103. AtalkDispatchDeviceControl(
  104. IN PDEVICE_OBJECT DeviceObject,
  105. IN PIRP Irp);
  106. #endif // _ATKDRVR_
  107.