1*c2c66affSColin Finck /*
2*c2c66affSColin Finck  * PROJECT:         ReactOS kernel-mode tests
3*c2c66affSColin Finck  * LICENSE:         GPLv2+ - See COPYING in the top level directory
4*c2c66affSColin Finck  * PURPOSE:         Kernel-Mode Test Suite for tcpip.sys
5*c2c66affSColin Finck  * PROGRAMMER:      Jérôme Gardou <jerome.gardou@reactos.org>
6*c2c66affSColin Finck  */
7*c2c66affSColin Finck 
8*c2c66affSColin Finck #include <kmt_test.h>
9*c2c66affSColin Finck #include "tcpip.h"
10*c2c66affSColin Finck 
11*c2c66affSColin Finck extern KMT_MESSAGE_HANDLER TestTdi;
12*c2c66affSColin Finck extern KMT_MESSAGE_HANDLER TestConnect;
13*c2c66affSColin Finck 
14*c2c66affSColin Finck static struct
15*c2c66affSColin Finck {
16*c2c66affSColin Finck     ULONG ControlCode;
17*c2c66affSColin Finck     PKMT_MESSAGE_HANDLER Handler;
18*c2c66affSColin Finck } MessageHandlers[] =
19*c2c66affSColin Finck {
20*c2c66affSColin Finck     { IOCTL_TEST_TDI,       TestTdi },
21*c2c66affSColin Finck     { IOCTL_TEST_CONNECT,   TestConnect },
22*c2c66affSColin Finck };
23*c2c66affSColin Finck 
24*c2c66affSColin Finck NTSTATUS
TestEntry(_In_ PDRIVER_OBJECT DriverObject,_In_ PCUNICODE_STRING RegistryPath,_Out_ PCWSTR * DeviceName,_Inout_ INT * Flags)25*c2c66affSColin Finck TestEntry(
26*c2c66affSColin Finck     _In_ PDRIVER_OBJECT DriverObject,
27*c2c66affSColin Finck     _In_ PCUNICODE_STRING RegistryPath,
28*c2c66affSColin Finck     _Out_ PCWSTR *DeviceName,
29*c2c66affSColin Finck     _Inout_ INT *Flags)
30*c2c66affSColin Finck {
31*c2c66affSColin Finck     ULONG i;
32*c2c66affSColin Finck 
33*c2c66affSColin Finck     PAGED_CODE();
34*c2c66affSColin Finck 
35*c2c66affSColin Finck     UNREFERENCED_PARAMETER(DriverObject);
36*c2c66affSColin Finck     UNREFERENCED_PARAMETER(RegistryPath);
37*c2c66affSColin Finck     UNREFERENCED_PARAMETER(Flags);
38*c2c66affSColin Finck 
39*c2c66affSColin Finck     *DeviceName = L"TcpIp";
40*c2c66affSColin Finck 
41*c2c66affSColin Finck     for (i = 0; i < (sizeof(MessageHandlers) / sizeof(MessageHandlers[0])); i++)
42*c2c66affSColin Finck         KmtRegisterMessageHandler(MessageHandlers[i].ControlCode, NULL, MessageHandlers[i].Handler);
43*c2c66affSColin Finck 
44*c2c66affSColin Finck     trace("TcpIp test driver loaded.\n");
45*c2c66affSColin Finck 
46*c2c66affSColin Finck     return STATUS_SUCCESS;
47*c2c66affSColin Finck }
48*c2c66affSColin Finck 
49*c2c66affSColin Finck VOID
TestUnload(_In_ PDRIVER_OBJECT DriverObject)50*c2c66affSColin Finck TestUnload(
51*c2c66affSColin Finck     _In_ PDRIVER_OBJECT DriverObject)
52*c2c66affSColin Finck {
53*c2c66affSColin Finck     PAGED_CODE();
54*c2c66affSColin Finck 
55*c2c66affSColin Finck     UNREFERENCED_PARAMETER(DriverObject);
56*c2c66affSColin Finck }
57*c2c66affSColin Finck 
58