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.

94 lines
2.5 KiB

  1. /***************************************************************************
  2. *
  3. * tdtdi.h
  4. *
  5. * This module contains internal defines and structures for TDI based TDs.
  6. *
  7. * Copyright 1998 Microsoft
  8. *
  9. *
  10. ****************************************************************************/
  11. typedef enum _ENDPOINT_TYPE {
  12. TdiAddressObject,
  13. TdiConnectionStream,
  14. TdiConnectionDatagram
  15. } ENDPOINT_TYPE;
  16. /*
  17. * TD stack endpoint structure.
  18. *
  19. * This is registered with ICADD.SYS to create a "handle" that can be returned
  20. * to ICASRV to represent a connection in a secure manner.
  21. */
  22. typedef struct _TD_STACK_ENDPOINT {
  23. ULONG AddressType; // Address type (family) for this endpoint
  24. struct _TD_ENDPOINT *pEndpoint; // Pointer to real endpoint structure
  25. } TD_STACK_ENDPOINT, *PTD_STACK_ENDPOINT;
  26. /*
  27. * TD endpoint structure
  28. *
  29. * This structure contains all information about an endpoint.
  30. * An endpoint may be either an address endpoint or a connection endpoint.
  31. */
  32. typedef struct _TD_ENDPOINT {
  33. NTSTATUS Status;
  34. HANDLE TransportHandle;
  35. PEPROCESS TransportHandleProcess;
  36. PFILE_OBJECT pFileObject;
  37. PDEVICE_OBJECT pDeviceObject;
  38. UNICODE_STRING TransportName;
  39. PTRANSPORT_ADDRESS pTransportAddress;
  40. ULONG TransportAddressLength;
  41. PTRANSPORT_ADDRESS pRemoteAddress;
  42. ULONG RemoteAddressLength;
  43. ENDPOINT_TYPE EndpointType;
  44. // This protects the following fields
  45. KSPIN_LOCK Spinlock;
  46. // These fields are only used on Address endpoints
  47. LIST_ENTRY ConnectedQueue;
  48. LIST_ENTRY AcceptQueue;
  49. LIST_ENTRY ConnectionQueue;
  50. ULONG ConnectionQueueSize;
  51. BOOLEAN ConnectIndicationRegistered;
  52. BOOLEAN DisconnectIndicationRegistered;
  53. BOOLEAN RecvIndicationRegistered;
  54. KEVENT AcceptEvent;
  55. BOOLEAN Waiter;
  56. // This is used on Connection endpoints
  57. HANDLE hIcaHandle; // Handle for TD_STACK_ENDPOINT
  58. BOOLEAN Connected;
  59. BOOLEAN Disconnected;
  60. PIRP AcceptIrp;
  61. LIST_ENTRY ReceiveQueue;
  62. LIST_ENTRY ConnectionLink;
  63. TDI_CONNECTION_INFORMATION SendInfo;
  64. ULONG RecvBytesReady;
  65. HANDLE hConnectionEndPointIcaHandle; // handle for TD_ENDPOINT (this structure)
  66. HANDLE hTransportAddressIcaHandle; // handle for TRANSPORT_ADDRESS
  67. } TD_ENDPOINT, *PTD_ENDPOINT;
  68. /*
  69. * TDI TD structure
  70. */
  71. typedef struct _TDTDI {
  72. PTD_ENDPOINT pAddressEndpoint;
  73. PTD_ENDPOINT pConnectionEndpoint;
  74. ULONG OutBufDelay; // Outbuf delay for connection
  75. } TDTDI, * PTDTDI;