Added patch to fix prototype of RtlIpv4StringToAddressExW and add stub for RtlIpv6StringToAddressExW.

This commit is contained in:
Sebastian Lackner 2016-01-21 01:33:19 +01:00
parent 295e6d21eb
commit ea31b08725
9 changed files with 170 additions and 14 deletions

View File

@ -0,0 +1,57 @@
From 7f439e90221b6ef02371935f2f49528a0537af8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 21 Jan 2016 00:33:12 +0100
Subject: ntdll: Fix parameters for RtlIpv4StringToAddressExW stub.
---
dlls/ntdll/ntdll.spec | 2 +-
dlls/ntdll/rtl.c | 5 ++---
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 4e49709..9712b3a 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -714,7 +714,7 @@
@ stdcall RtlIpv4AddressToStringW(ptr ptr)
# @ stub RtlIpv4StringToAddressA
# @ stub RtlIpv4StringToAddressExA
-@ stdcall RtlIpv4StringToAddressExW(ptr ptr wstr ptr)
+@ stdcall RtlIpv4StringToAddressExW(wstr long ptr ptr)
# @ stub RtlIpv4StringToAddressW
# @ stub RtlIpv6AddressToStringA
# @ stub RtlIpv6AddressToStringExA
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index f699cff..ec5c999b 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -882,10 +882,9 @@ void WINAPI RtlCopyLuidAndAttributesArray(
for (i = 0; i < Count; i++) Dest[i] = Src[i];
}
-NTSTATUS WINAPI RtlIpv4StringToAddressExW(PULONG IP, PULONG Port,
- LPCWSTR Buffer, PULONG MaxSize)
+NTSTATUS WINAPI RtlIpv4StringToAddressExW(LPCWSTR str, BOOLEAN strict, IN_ADDR *address, PUSHORT port)
{
- FIXME("(%p,%p,%p,%p): stub\n", IP, Port, Buffer, MaxSize);
+ FIXME("(%s, %u, %p, %p): stub\n", debugstr_w(str), strict, address, port);
return STATUS_SUCCESS;
}
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 1319ada..7ec49f1 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -1075,7 +1075,7 @@
@ stdcall RtlIpv4AddressToStringW(ptr ptr) ntdll.RtlIpv4AddressToStringW
@ stub RtlIpv4StringToAddressA
@ stub RtlIpv4StringToAddressExA
-@ stdcall RtlIpv4StringToAddressExW(ptr ptr wstr ptr) ntdll.RtlIpv4StringToAddressExW
+@ stdcall RtlIpv4StringToAddressExW(wstr long ptr ptr) ntdll.RtlIpv4StringToAddressExW
@ stub RtlIpv4StringToAddressW
@ stub RtlIpv6AddressToStringA
@ stub RtlIpv6AddressToStringExA
--
2.6.4

View File

@ -0,0 +1,79 @@
From 6f149e702d91a7aeb1e541bb13bdde9993ce69d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 21 Jan 2016 00:34:27 +0100
Subject: ntdll: Add stub for RtlIpv6StringToAddressExW.
---
dlls/ntdll/ntdll.spec | 2 +-
dlls/ntdll/rtl.c | 14 ++++++++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 9712b3a..24057ad 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -722,7 +722,7 @@
# @ stub RtlIpv6AddressToStringW
# @ stub RtlIpv6StringToAddressA
# @ stub RtlIpv6StringToAddressExA
-# @ stub RtlIpv6StringToAddressExW
+@ stdcall RtlIpv6StringToAddressExW(wstr ptr ptr ptr)
# @ stub RtlIpv6StringToAddressW
@ stdcall RtlIsActivationContextActive(ptr)
@ stdcall RtlIsCriticalSectionLocked(ptr)
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index ec5c999b..262cc86 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -45,6 +45,7 @@
#include "wine/unicode.h"
#include "ntdll_misc.h"
#include "inaddr.h"
+#include "in6addr.h"
#include "ddk/ntddk.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
@@ -882,6 +883,9 @@ void WINAPI RtlCopyLuidAndAttributesArray(
for (i = 0; i < Count; i++) Dest[i] = Src[i];
}
+/***********************************************************************
+ * RtlIpv4StringToAddressExW [NTDLL.@]
+ */
NTSTATUS WINAPI RtlIpv4StringToAddressExW(LPCWSTR str, BOOLEAN strict, IN_ADDR *address, PUSHORT port)
{
FIXME("(%s, %u, %p, %p): stub\n", debugstr_w(str), strict, address, port);
@@ -890,6 +894,16 @@ NTSTATUS WINAPI RtlIpv4StringToAddressExW(LPCWSTR str, BOOLEAN strict, IN_ADDR *
}
/***********************************************************************
+ * RtlIpv6StringToAddressExW [NTDLL.@]
+ */
+NTSTATUS NTAPI RtlIpv6StringToAddressExW(LPCWSTR str, IN6_ADDR *address, PULONG scope, PUSHORT port)
+{
+ FIXME("(%s, %p, %p, %p): stub\n", debugstr_w(str), address, scope, port);
+
+ return STATUS_INVALID_PARAMETER;
+}
+
+/***********************************************************************
* RtlIpv4AddressToStringExW [NTDLL.@]
*
* Convert the given ipv4 address and optional the port to a string
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 7ec49f1..526c707 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -1083,7 +1083,7 @@
@ stub RtlIpv6AddressToStringW
@ stub RtlIpv6StringToAddressA
@ stub RtlIpv6StringToAddressExA
-@ stub RtlIpv6StringToAddressExW
+@ stdcall RtlIpv6StringToAddressExW(wstr ptr ptr ptr) ntdll.RtlIpv6StringToAddressExW
@ stub RtlIpv6StringToAddressW
@ stub RtlIsGenericTableEmpty
@ stub RtlIsGenericTableEmptyAvl
--
2.6.4

View File

@ -0,0 +1,2 @@
Fixes: Fix prototype of RtlIpv4StringToAddressExW
Fixes: Add stub for RtlIpv6StringToAddressExW

View File

@ -213,7 +213,8 @@ patch_enable_all ()
enable_ntdll_Pipe_SpecialCharacters="$1"
enable_ntdll_ProcessQuotaLimits="$1"
enable_ntdll_Purist_Mode="$1"
enable_ntdll_RtlIpStringToAddress="$1"
enable_ntdll_RtlIpStringToAddress_Stubs="$1"
enable_ntdll_RtlIpStringToAddress_Tests="$1"
enable_ntdll_RtlQueryPackageIdentity="$1"
enable_ntdll_Serial_Port_Detection="$1"
enable_ntdll_Status_Mapping="$1"
@ -774,8 +775,11 @@ patch_enable ()
ntdll-Purist_Mode)
enable_ntdll_Purist_Mode="$2"
;;
ntdll-RtlIpStringToAddress)
enable_ntdll_RtlIpStringToAddress="$2"
ntdll-RtlIpStringToAddress_Stubs)
enable_ntdll_RtlIpStringToAddress_Stubs="$2"
;;
ntdll-RtlIpStringToAddress_Tests)
enable_ntdll_RtlIpStringToAddress_Tests="$2"
;;
ntdll-RtlQueryPackageIdentity)
enable_ntdll_RtlQueryPackageIdentity="$2"
@ -1679,8 +1683,8 @@ if test "$enable_category_stable" -eq 1; then
if test "$enable_ntdll_Pipe_SpecialCharacters" -gt 1; then
abort "Patchset ntdll-Pipe_SpecialCharacters disabled, but category-stable depends on that."
fi
if test "$enable_ntdll_RtlIpStringToAddress" -gt 1; then
abort "Patchset ntdll-RtlIpStringToAddress disabled, but category-stable depends on that."
if test "$enable_ntdll_RtlIpStringToAddress_Tests" -gt 1; then
abort "Patchset ntdll-RtlIpStringToAddress_Tests disabled, but category-stable depends on that."
fi
if test "$enable_ntdll_Threading" -gt 1; then
abort "Patchset ntdll-Threading disabled, but category-stable depends on that."
@ -1802,7 +1806,7 @@ if test "$enable_category_stable" -eq 1; then
enable_ntdll_Heap_FreeLists=1
enable_ntdll_NtSetLdtEntries=1
enable_ntdll_Pipe_SpecialCharacters=1
enable_ntdll_RtlIpStringToAddress=1
enable_ntdll_RtlIpStringToAddress_Tests=1
enable_ntdll_Threading=1
enable_ntdll_User_Shared_Data=1
enable_ntdll_WriteWatches=1
@ -2007,9 +2011,9 @@ if test "$enable_ntdll_SystemRoot_Symlink" -eq 1; then
enable_ntdll_Syscall_Wrappers=1
fi
if test "$enable_ntdll_RtlIpStringToAddress" -eq 1; then
if test "$enable_ntdll_RtlIpStringToAddress_Tests" -eq 1; then
if test "$enable_ntdll_RtlQueryPackageIdentity" -gt 1; then
abort "Patchset ntdll-RtlQueryPackageIdentity disabled, but ntdll-RtlIpStringToAddress depends on that."
abort "Patchset ntdll-RtlQueryPackageIdentity disabled, but ntdll-RtlIpStringToAddress_Tests depends on that."
fi
enable_ntdll_RtlQueryPackageIdentity=1
fi
@ -4688,6 +4692,20 @@ if test "$enable_ntdll_Purist_Mode" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-RtlIpStringToAddress_Stubs
# |
# | Modified files:
# | * dlls/ntdll/ntdll.spec, dlls/ntdll/rtl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec
# |
if test "$enable_ntdll_RtlIpStringToAddress_Stubs" -eq 1; then
patch_apply ntdll-RtlIpStringToAddress_Stubs/0001-ntdll-Fix-parameters-for-RtlIpv4StringToAddressExW-s.patch
patch_apply ntdll-RtlIpStringToAddress_Stubs/0002-ntdll-Add-stub-for-RtlIpv6StringToAddressExW.patch
(
echo '+ { "Michael Müller", "ntdll: Fix parameters for RtlIpv4StringToAddressExW stub.", 1 },';
echo '+ { "Michael Müller", "ntdll: Add stub for RtlIpv6StringToAddressExW.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-RtlQueryPackageIdentity
# |
# | Modified files:
@ -4704,7 +4722,7 @@ if test "$enable_ntdll_RtlQueryPackageIdentity" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-RtlIpStringToAddress
# Patchset ntdll-RtlIpStringToAddress_Tests
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-RtlQueryPackageIdentity
@ -4712,11 +4730,11 @@ fi
# | Modified files:
# | * dlls/ntdll/tests/rtl.c
# |
if test "$enable_ntdll_RtlIpStringToAddress" -eq 1; then
patch_apply ntdll-RtlIpStringToAddress/0001-ntdll-tests-Tests-for-RtlIpv6StringToAddress-try-6.patch
patch_apply ntdll-RtlIpStringToAddress/0002-ntdll-tests-Tests-for-RtlIpv6StringToAddressEx-try-6.patch
patch_apply ntdll-RtlIpStringToAddress/0003-ntdll-tests-Tests-for-RtlIpv4StringToAddressEx-try-5.patch
patch_apply ntdll-RtlIpStringToAddress/0004-ntdll-tests-Add-tests-for-RtlIpv6AddressToString-and.patch
if test "$enable_ntdll_RtlIpStringToAddress_Tests" -eq 1; then
patch_apply ntdll-RtlIpStringToAddress_Tests/0001-ntdll-tests-Tests-for-RtlIpv6StringToAddress-try-6.patch
patch_apply ntdll-RtlIpStringToAddress_Tests/0002-ntdll-tests-Tests-for-RtlIpv6StringToAddressEx-try-6.patch
patch_apply ntdll-RtlIpStringToAddress_Tests/0003-ntdll-tests-Tests-for-RtlIpv4StringToAddressEx-try-5.patch
patch_apply ntdll-RtlIpStringToAddress_Tests/0004-ntdll-tests-Add-tests-for-RtlIpv6AddressToString-and.patch
(
echo '+ { "Mark Jansen", "ntdll/tests: Tests for RtlIpv6StringToAddress.", 6 },';
echo '+ { "Mark Jansen", "ntdll/tests: Tests for RtlIpv6StringToAddressEx.", 6 },';