From e7830d5ae9aa24b7f5b62cf0920b2dd980d7d189 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 29 Nov 2015 19:53:48 +0000 Subject: [PATCH] [TCPIP] Stub implementation of IOCTL_QUERY_IP_HW_ADDRESS. This fixes 5 tests in iphlpapi_apitest! svn path=/trunk/; revision=70213 --- reactos/drivers/network/tcpip/include/dispatch.h | 4 ++++ reactos/drivers/network/tcpip/tcpip/dispatch.c | 14 ++++++++++++++ reactos/drivers/network/tcpip/tcpip/main.c | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/reactos/drivers/network/tcpip/include/dispatch.h b/reactos/drivers/network/tcpip/include/dispatch.h index 9effe5f975d..b1fc7e0b644 100644 --- a/reactos/drivers/network/tcpip/include/dispatch.h +++ b/reactos/drivers/network/tcpip/include/dispatch.h @@ -69,6 +69,10 @@ NTSTATUS DispTdiDeleteIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp); +NTSTATUS DispTdiQueryIpHwAddress( + PIRP Irp, + PIO_STACK_LOCATION IrpSp); + VOID DispDoDisconnect( PVOID Data); diff --git a/reactos/drivers/network/tcpip/tcpip/dispatch.c b/reactos/drivers/network/tcpip/tcpip/dispatch.c index 69ed6bf2bf6..e8e65b8d30a 100644 --- a/reactos/drivers/network/tcpip/tcpip/dispatch.c +++ b/reactos/drivers/network/tcpip/tcpip/dispatch.c @@ -1609,4 +1609,18 @@ NTSTATUS DispTdiDeleteIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { return Status; } +NTSTATUS DispTdiQueryIpHwAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { + NTSTATUS Status; + + Status = STATUS_NOT_IMPLEMENTED; + if (IrpSp->Parameters.DeviceIoControl.InputBufferLength < 2 * sizeof(ULONG)) { + Status = STATUS_INVALID_BUFFER_SIZE; + goto Exit; + } + +Exit: + Irp->IoStatus.Status = Status; + return Status; +} + /* EOF */ diff --git a/reactos/drivers/network/tcpip/tcpip/main.c b/reactos/drivers/network/tcpip/tcpip/main.c index 2999d94b940..315d5857377 100644 --- a/reactos/drivers/network/tcpip/tcpip/main.c +++ b/reactos/drivers/network/tcpip/tcpip/main.c @@ -525,6 +525,11 @@ TiDispatch( Status = DispTdiDeleteIPAddress(Irp, IrpSp); break; + case IOCTL_QUERY_IP_HW_ADDRESS: + TI_DbgPrint(MIN_TRACE, ("QUERY_IP_HW_ADDRESS\n")); + Status = DispTdiQueryIpHwAddress(Irp, IrpSp); + break; + default: TI_DbgPrint(MIN_TRACE, ("Unknown IOCTL 0x%X\n", IrpSp->Parameters.DeviceIoControl.IoControlCode));