61 static WCHAR DriverName[] =
L"TCP/IP";
64 (DumpDataCount *
sizeof(
ULONG)) +
sizeof(DriverName);
129 EaInfo =
Irp->AssociatedIrp.SystemBuffer;
165 (
Address->TAAddressCount != 1) ||
171 if(
Address->TAAddressCount == 1 )
174 Address->Address[0].AddressLength));
176 Address->Address[0].AddressType));
254 Context->Handle.ConnectionContext =
Request.Handle.ConnectionContext;
313 Request.Handle.ConnectionContext =
Context->Handle.ConnectionContext;
332 return Irp->IoStatus.Status;
396 TI_DbgPrint(
DEBUG_IRP, (
"[TCPIP, TiDispatchInternal] Called. DeviceObject is at (0x%X), IRP is at (0x%X) MN (%d).\n",
400 Irp->IoStatus.Information = 0;
503 Irp->IoStatus.Information = 0;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
_In_ ULONG _In_ BOOLEAN _In_ ULONG UniqueErrorValue
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
NTSTATUS DispTdiQueryIpHwAddress(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS DispTdiQueryInformationEx(PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS DispTdiQueryInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS DispTdiAssociateAddress(PIRP Irp)
NTSTATUS DispTdiConnect(PIRP Irp)
NTSTATUS DispTdiReceive(PIRP Irp)
NTSTATUS DispTdiDeleteIPAddress(PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS DispTdiSend(PIRP Irp)
NTSTATUS DispTdiSetIPAddress(PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS DispTdiDisconnect(PIRP Irp)
NTSTATUS DispTdiSetInformation(PIRP Irp)
NTSTATUS DispTdiReceiveDatagram(PIRP Irp)
NTSTATUS DispTdiSetInformationEx(PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSTATUS DispTdiSetEventHandler(PIRP Irp)
NTSTATUS DispTdiSendDatagram(PIRP Irp)
NTSTATUS DispTdiAccept(PIRP Irp)
NTSTATUS DispTdiDisassociateAddress(PIRP Irp)
NTSTATUS IRPFinish(PIRP Irp, NTSTATUS Status)
NTSTATUS DispTdiListen(PIRP Irp)
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
DRIVER_INITIALIZE DriverEntry
_In_ PIO_STACK_LOCATION IrpSp
VOID EXPORT NdisAllocateBufferPool(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE PoolHandle, IN UINT NumberOfDescriptors)
VOID EXPORT NdisFreeBufferPool(IN NDIS_HANDLE PoolHandle)
VOID EXPORT NdisAllocatePacketPoolEx(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE PoolHandle, IN UINT NumberOfDescriptors, IN UINT NumberOfOverflowDescriptors, IN UINT ProtocolReservedLength)
VOID EXPORT NdisFreePacketPool(IN NDIS_HANDLE PoolHandle)
#define TI_DbgPrint(_t_, _x_)
NTSTATUS IPStartup(PUNICODE_STRING RegistryPath)
KSPIN_LOCK InterfaceListLock
LIST_ENTRY InterfaceListHead
NTSTATUS IPShutdown(VOID)
VOID NTAPI IPTimeoutDpcFn(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2)
VOID TcpipReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL Irql)
VOID TcpipAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL Irql)
NTSTATUS TiGetProtocolNumber(PUNICODE_STRING FileName, PULONG Protocol)
NDIS_HANDLE GlobalBufferPool
NTSTATUS TiCloseFileObject(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS TiCreateFileObject(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS NTAPI TiDispatchInternal(PDEVICE_OBJECT DeviceObject, PIRP Irp)
VOID NTAPI IPDelInterface(ULONG Unknown0)
NTSTATUS NTAPI TiDispatchOpenClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
PDEVICE_OBJECT UDPDeviceObject
VOID NTAPI TiUnload(PDRIVER_OBJECT DriverObject)
static NTSTATUS TiCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR *SecurityDescriptor)
VOID NTAPI IPAddInterface(ULONG Unknown0, ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4)
static NTSTATUS TiSecurityStartup(VOID)
NDIS_HANDLE GlobalPacketPool
PDEVICE_OBJECT TCPDeviceObject
VOID NTAPI LookupRoute(ULONG Unknown0, ULONG Unknown1)
NTSTATUS NTAPI TiDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Dispatch routine for IRP_MJ_DEVICE_CONTROL requests.
VOID TiWriteErrorLog(PDRIVER_OBJECT DriverContext, NTSTATUS ErrorCode, ULONG UniqueErrorValue, NTSTATUS FinalStatus, PWSTR String, ULONG DumpDataCount, PULONG DumpData)
TDIEntityInfo * EntityList
KSPIN_LOCK EntityListLock
static NTSTATUS TiSetupTcpDeviceSD(_In_ PDEVICE_OBJECT DeviceObject)
PDEVICE_OBJECT IPDeviceObject
PDEVICE_OBJECT RawIPDeviceObject
NTSTATUS NTAPI TdiMapUserRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define RtlCompareMemory(s1, s2, l)
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
KSPIN_LOCK AddressFileListLock
NTSTATUS FileCloseConnection(PTDI_REQUEST Request)
LIST_ENTRY ConnectionEndpointListHead
LIST_ENTRY AddressFileListHead
NTSTATUS FileCloseAddress(PTDI_REQUEST Request)
NTSTATUS FileOpenControlChannel(PTDI_REQUEST Request)
KSPIN_LOCK ConnectionEndpointListLock
NTSTATUS FileOpenConnection(PTDI_REQUEST Request, PVOID ClientContext)
NTSTATUS FileOpenAddress(PTDI_REQUEST Request, PTA_IP_ADDRESS AddrList, USHORT Protocol, BOOLEAN Shared, PVOID Options)
NTSTATUS FileCloseControlChannel(PTDI_REQUEST Request)
pRequest Complete(RequestStatus)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSTATUS DispEchoRequest(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL, DWORD, DWORD, PSID)
NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR, PSID, BOOLEAN)
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
NTSTATUS TCPShutdown(VOID)
NTSTATUS TCPStartup(VOID)
NTSTATUS UDPStartup(VOID)
NTSTATUS UDPShutdown(VOID)
VOID LANUnregisterProtocol(VOID)
Unregisters this protocol driver with NDIS.
NTSTATUS LANRegisterProtocol(PNDIS_STRING Name)
Registers this protocol driver with NDIS.
NDIS_STATUS LoopRegisterAdapter(PNDIS_STRING AdapterName, PLAN_ADAPTER *Adapter)
NDIS_STATUS LoopUnregisterAdapter(PLAN_ADAPTER Adapter)
#define ExFreePoolWithTag(_P, _T)
DWORD SECURITY_INFORMATION
struct _ACCESS_ALLOWED_ACE ACCESS_ALLOWED_ACE
#define NDIS_STATUS_SUCCESS
_In_ NDIS_ERROR_CODE ErrorCode
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
NTSYSAPI NTSTATUS NTAPI RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision)
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG DaclSize
#define EVENT_TRANSPORT_REGISTER_FAILED
NTSYSAPI NTSTATUS NTAPI RtlSetGroupSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID Group, IN BOOLEAN GroupDefaulted)
NTSYSAPI NTSTATUS NTAPI RtlAbsoluteToSelfRelativeSD(IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor, IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, IN PULONG BufferLength)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
VOID NTAPI IoWriteErrorLogEntry(IN PVOID ElEntry)
PVOID NTAPI IoAllocateErrorLogEntry(IN PVOID IoObject, IN UCHAR EntrySize)
#define STATUS_NOT_IMPLEMENTED
NTSTATUS NTAPI ObSetSecurityObjectByPointer(IN PVOID Object, IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
#define FILE_DEVICE_NETWORK
NTSTATUS RawIPShutdown(VOID)
NTSTATUS RawIPStartup(VOID)
#define IRP_MJ_DEVICE_CONTROL
#define STATUS_BUFFER_TOO_SMALL
struct _IO_STACK_LOCATION::@3974::@3975 Create
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
#define IOCTL_SET_IP_ADDRESS
#define IOCTL_DELETE_IP_ADDRESS
#define IOCTL_ICMP_ECHO_REQUEST
#define IOCTL_QUERY_IP_HW_ADDRESS
struct _TA_ADDRESS_IP * PTA_IP_ADDRESS
#define TDI_CONNECTION_CONTEXT_LENGTH
#define TDI_TRANSPORT_ADDRESS_LENGTH
#define TDI_ADDRESS_LENGTH_IP
#define TDI_ADDRESS_TYPE_IP
#define TdiConnectionContext
#define TdiTransportAddress
#define TDI_SEND_DATAGRAM
#define TDI_CONTROL_CHANNEL_FILE
#define TDI_RECEIVE_DATAGRAM
#define TDI_QUERY_INFORMATION
#define TDI_SET_INFORMATION
#define TDI_TRANSPORT_ADDRESS_FILE
#define TDI_DISASSOCIATE_ADDRESS
#define TDI_SET_EVENT_HANDLER
#define TDI_CONNECTION_FILE
#define TDI_ASSOCIATE_ADDRESS
#define IOCTL_TCP_QUERY_INFORMATION_EX
#define IOCTL_TCP_SET_INFORMATION_EX
#define TCPIP_PROTOCOL_NAME
#define TI_ERROR_DRIVERENTRY
#define DD_RAWIP_DEVICE_NAME
#define DD_IP_DEVICE_NAME
BOOLEAN NTAPI KeSetTimerEx(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN LONG Period, IN PKDPC Dpc OPTIONAL)
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_PARAMETER
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_In_ PDEVICE_OBJECT DeviceObject
_In_ UCHAR _In_ UCHAR _In_ ULONG _In_ WDFCONTEXT DriverContext
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_In_ WDFTIMER _In_ LONGLONG DueTime
VOID ChewInit(PDEVICE_OBJECT DeviceObject)
#define DD_UDP_DEVICE_NAME
#define DD_TCP_DEVICE_NAME
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
#define ERROR_LOG_MAXIMUM_SIZE
struct _IO_ERROR_LOG_PACKET * PIO_ERROR_LOG_PACKET
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
struct _IO_ERROR_LOG_PACKET IO_ERROR_LOG_PACKET
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define DACL_SECURITY_INFORMATION
#define OWNER_SECURITY_INFORMATION
#define SECURITY_DESCRIPTOR_REVISION
#define GROUP_SECURITY_INFORMATION