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.

132 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. internal.h
  5. Abstract:
  6. This module contains the code that is very specific to initialization
  7. and unload operations in the irenum driver
  8. Author:
  9. Brian Lieuallen, 7-13-2000
  10. Environment:
  11. Kernel mode
  12. Revision History :
  13. --*/
  14. #define UNICODE 1
  15. #include <ntosp.h>
  16. #include <zwapi.h>
  17. #include <tdikrnl.h>
  18. #define UINT ULONG //tmp
  19. #include <irioctl.h>
  20. #include <ircommtdi.h>
  21. #include <ircomm.h>
  22. #include <ircommdbg.h>
  23. #include "buffer.h"
  24. #include <ntddser.h>
  25. #include "link.h"
  26. typedef struct _SEND_TRACKER {
  27. LONG ReferenceCount;
  28. PIRP CurrentWriteIrp;
  29. LONG IrpReferenceCount;
  30. PVOID CompletionContext;
  31. CONNECTION_CALLBACK CompletionRoutine;
  32. LONG BuffersOutstanding;
  33. LONG BytesRemainingInIrp;
  34. KTIMER Timer;
  35. KDPC TimerDpc;
  36. BOOLEAN TimerSet;
  37. NTSTATUS LastStatus;
  38. #if DBG
  39. BOOLEAN TimerExpired;
  40. BOOLEAN IrpCanceled;
  41. #endif
  42. struct _TDI_CONNECTION *Connection;
  43. } SEND_TRACKER, *PSEND_TRACKER;
  44. typedef struct _SEND_CONTROL {
  45. PSEND_TRACKER CurrentSendTracker;
  46. LONG ProcessSendEntryCount;
  47. KSPIN_LOCK ControlLock;
  48. WORK_QUEUE_ITEM WorkItem;
  49. LONG WorkItemCount;
  50. BOOLEAN OutOfBuffers;
  51. } SEND_CONTROL, *PSEND_CONTROL;
  52. typedef struct _UART_CONTROL {
  53. PIRP CurrentIrp;
  54. PVOID CompletionContext;
  55. CONNECTION_CALLBACK CompletionRoutine;
  56. LONG DtrState;
  57. LONG RtsState;
  58. ULONG BaudRate;
  59. SERIAL_LINE_CONTROL LineControl;
  60. } UART_CONTROL, *PUART_CONTROL;
  61. typedef struct _TDI_CONNECTION {
  62. LINK_HANDLE LinkHandle;
  63. RECEIVE_CALLBACK ReceiveCallBack;
  64. PVOID ReceiveContext;
  65. EVENT_CALLBACK EventCallBack;
  66. PVOID EventContext;
  67. ULONG MaxSendPdu;
  68. BOOLEAN LinkUp;
  69. SEND_CONTROL Send;
  70. UART_CONTROL Uart;
  71. } TDI_CONNECTION, *PTDI_CONNECTION;
  72. VOID
  73. SendWorkItemRountine(
  74. PVOID Context
  75. );
  76. VOID
  77. ProcessSendAtPassive(
  78. PTDI_CONNECTION Connection
  79. );