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.

84 lines
1.6 KiB

  1. typedef PVOID LINK_HANDLE;
  2. typedef PVOID CONNECTION_HANDLE;
  3. typedef enum {
  4. BUFFER_TYPE_SEND,
  5. BUFFER_TYPE_CONTROL,
  6. BUFFER_TYPE_RECEIVE
  7. } BUFFER_TYPE;
  8. typedef NTSTATUS (*PLINK_RECEIVE)(
  9. PVOID Context,
  10. ULONG ReceiveFlags,
  11. ULONG BytesIndicated,
  12. ULONG BytesAvailible,
  13. ULONG *BytesTaken,
  14. PVOID Tsdu,
  15. PIRP *Irp
  16. );
  17. typedef VOID (*PLINK_STATE)(
  18. PVOID Context,
  19. BOOLEAN LinkUp,
  20. ULONG MaxSendPdu
  21. );
  22. NTSTATUS
  23. CreateTdiLink(
  24. ULONG DeviceAddress,
  25. CHAR *ServiceName,
  26. BOOLEAN OutGoingConnection,
  27. LINK_HANDLE *LinkHandle,
  28. PVOID Context,
  29. PLINK_RECEIVE LinkReceiveHandler,
  30. PLINK_STATE LinkStateHandler,
  31. ULONG SendBuffers,
  32. ULONG ControlBuffers,
  33. ULONG ReceiveBuffer
  34. );
  35. VOID
  36. CloseTdiLink(
  37. LINK_HANDLE LinkHandle
  38. );
  39. CONNECTION_HANDLE
  40. GetCurrentConnection(
  41. LINK_HANDLE LinkHandle
  42. );
  43. VOID
  44. ReleaseConnection(
  45. CONNECTION_HANDLE ContectionHandle
  46. );
  47. PIRCOMM_BUFFER
  48. ConnectionGetBuffer(
  49. CONNECTION_HANDLE ConnectionHandle,
  50. BUFFER_TYPE BufferType
  51. );
  52. PFILE_OBJECT
  53. ConnectionGetFileObject(
  54. CONNECTION_HANDLE ConnectionHandle
  55. );
  56. VOID
  57. ConnectionReleaseFileObject(
  58. CONNECTION_HANDLE ConnectionHandle,
  59. PFILE_OBJECT FileObject
  60. );
  61. NTSTATUS
  62. SendSynchronousControlInfo(
  63. CONNECTION_HANDLE ConnectionHandle,
  64. UCHAR PI,
  65. UCHAR PL,
  66. UCHAR *PV
  67. );