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

#include <tdiobj.h>
typedef PVOID LINK_HANDLE;
typedef PVOID CONNECTION_HANDLE;
typedef enum {
BUFFER_TYPE_SEND,
BUFFER_TYPE_CONTROL,
BUFFER_TYPE_RECEIVE
} BUFFER_TYPE;
typedef NTSTATUS (*PLINK_RECEIVE)(
PVOID Context,
ULONG ReceiveFlags,
ULONG BytesIndicated,
ULONG BytesAvailible,
ULONG *BytesTaken,
PVOID Tsdu,
PIRP *Irp
);
typedef VOID (*PLINK_STATE)(
PVOID Context,
BOOLEAN LinkUp,
ULONG MaxSendPdu
);
NTSTATUS
CreateTdiLink(
TDI_OBJECT_HANDLE TdiObjectHandle,
ULONG DeviceAddress,
CHAR *ServiceName,
BOOLEAN OutGoingConnection,
LINK_HANDLE *LinkHandle,
PVOID Context,
PLINK_RECEIVE LinkReceiveHandler,
PLINK_STATE LinkStateHandler,
ULONG SendBuffers,
ULONG ControlBuffers,
ULONG ReceiveBuffers
);
VOID
CloseTdiLink(
LINK_HANDLE LinkHandle
);
CONNECTION_HANDLE
GetCurrentConnection(
LINK_HANDLE LinkHandle
);
VOID
ReleaseConnection(
CONNECTION_HANDLE ContectionHandle
);
PIRCOMM_BUFFER
ConnectionGetBuffer(
CONNECTION_HANDLE ConnectionHandle,
BUFFER_TYPE BufferType
);
PFILE_OBJECT
ConnectionGetFileObject(
CONNECTION_HANDLE ConnectionHandle
);
VOID
ConnectionReleaseFileObject(
CONNECTION_HANDLE ConnectionHandle,
PFILE_OBJECT FileObject
);
NTSTATUS
SendSynchronousControlInfo(
CONNECTION_HANDLE ConnectionHandle,
UCHAR PI,
UCHAR PL,
UCHAR *PV
);