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.

89 lines
1.8 KiB

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