2014-12-02 18:06:48 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS kernel-mode tests
|
|
|
|
* LICENSE: GPLv2+ - See COPYING in the top level directory
|
|
|
|
* PURPOSE: Kernel-Mode Test Suite for tcpip.sys
|
|
|
|
* PROGRAMMER: Jérôme Gardou <jerome.gardou@reactos.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <kmt_test.h>
|
|
|
|
#include "tcpip.h"
|
|
|
|
|
|
|
|
extern KMT_MESSAGE_HANDLER TestTdi;
|
2015-02-06 10:49:04 +00:00
|
|
|
extern KMT_MESSAGE_HANDLER TestConnect;
|
2014-12-02 18:06:48 +00:00
|
|
|
|
|
|
|
static struct
|
|
|
|
{
|
|
|
|
ULONG ControlCode;
|
|
|
|
PKMT_MESSAGE_HANDLER Handler;
|
|
|
|
} MessageHandlers[] =
|
|
|
|
{
|
2015-02-06 10:49:04 +00:00
|
|
|
{ IOCTL_TEST_TDI, TestTdi },
|
|
|
|
{ IOCTL_TEST_CONNECT, TestConnect },
|
2014-12-02 18:06:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
TestEntry(
|
|
|
|
_In_ PDRIVER_OBJECT DriverObject,
|
|
|
|
_In_ PCUNICODE_STRING RegistryPath,
|
|
|
|
_Out_ PCWSTR *DeviceName,
|
|
|
|
_Inout_ INT *Flags)
|
|
|
|
{
|
|
|
|
ULONG i;
|
|
|
|
|
|
|
|
PAGED_CODE();
|
|
|
|
|
|
|
|
UNREFERENCED_PARAMETER(DriverObject);
|
|
|
|
UNREFERENCED_PARAMETER(RegistryPath);
|
|
|
|
UNREFERENCED_PARAMETER(Flags);
|
|
|
|
|
|
|
|
*DeviceName = L"TcpIp";
|
|
|
|
|
|
|
|
for (i = 0; i < (sizeof(MessageHandlers) / sizeof(MessageHandlers[0])); i++)
|
|
|
|
KmtRegisterMessageHandler(MessageHandlers[i].ControlCode, NULL, MessageHandlers[i].Handler);
|
|
|
|
|
|
|
|
trace("TcpIp test driver loaded.\n");
|
|
|
|
|
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
TestUnload(
|
|
|
|
_In_ PDRIVER_OBJECT DriverObject)
|
|
|
|
{
|
|
|
|
PAGED_CODE();
|
|
|
|
|
|
|
|
UNREFERENCED_PARAMETER(DriverObject);
|
|
|
|
}
|
|
|
|
|