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