https://bugs.winehq.org/show_bug.cgi?id=46149
Bug ID: 46149 Summary: Multiple applications need ntdll.dll.RtlIpv4StringToAddress{A,W,ExA,ExW} implementation (Processhacker 2.x) Product: Wine Version: 3.20 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
needed for some tools like 'processhacker' (via plugins-extra) and/or Win Vista+ native wininet (attempt to prove bug 45847).
--- snip --- ... 0059:fixme:ntdll:RtlIpv4StringToAddressExW (L"origin.*", 1, 0x7d4fd50, 0x7d4fd4e): stub 0059:fixme:ntdll:RtlIpv6StringToAddressExW (L"origin.*", 0x7d4fd54, 0x7d4fd64, 0x7d4fd4e): stub ... 0059:fixme:ntdll:RtlIpv4StringToAddressExW (L"origin.warframe.com", 1, 0x7d4fd24, 0x7d4fd22): stub 0059:fixme:ntdll:RtlIpv6StringToAddressExW (L"origin.warframe.com", 0x7d4fd28, 0x7d4fd38, 0x7d4fd22): stub ... 0059:trace:seh:raise_exception code=80000100 flags=1 addr=0x7bc53371 ip=7bc53371 tid=0059 0059:trace:seh:raise_exception info[0]=63184658 0059:trace:seh:raise_exception info[1]=63186020 wine: Call from 0x7bc53371 to unimplemented function ntdll.dll.RtlIpv4StringToAddressExA, aborting 0059:trace:seh:call_stack_handlers calling handler at 0x48b6cc code=80000100 flags=1 0059:trace:seh:call_stack_handlers handler at 0x48b6cc returned 1 0059:trace:seh:call_stack_handlers calling handler at 0x4620a0 code=80000100 flags=1 0059:trace:seh:call_stack_handlers handler at 0x4620a0 returned 1 0059:trace:seh:call_stack_handlers calling handler at 0x7bca6fa0 code=80000100 flags=1 wine: Unimplemented function ntdll.dll.RtlIpv4StringToAddressExA called at address 0x7bc53371 (thread 0059), starting debugger... ... --- snip ---
Process hacker plugins-extra:
https://github.com/processhacker/plugins-extra/blob/master/FirewallMonitorPl...
https://github.com/processhacker/plugins-extra/blob/master/FirewallMonitorPl...
Wine source:
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/ntdll.spec
--- snip --- 732 @ stdcall RtlIpv4AddressToStringA(ptr ptr) 733 @ stdcall RtlIpv4AddressToStringExA(ptr long ptr ptr) 734 @ stdcall RtlIpv4AddressToStringExW(ptr long ptr ptr) 735 @ stdcall RtlIpv4AddressToStringW(ptr ptr) 736 # @ stub RtlIpv4StringToAddressA 737 # @ stub RtlIpv4StringToAddressExA 738 @ stdcall RtlIpv4StringToAddressExW(wstr long ptr ptr) 739 @ stdcall RtlIpv4StringToAddressW(wstr long ptr ptr) 740 # @ stub RtlIpv6AddressToStringA 741 # @ stub RtlIpv6AddressToStringExA 742 # @ stub RtlIpv6AddressToStringExW 743 # @ stub RtlIpv6AddressToStringW 744 # @ stub RtlIpv6StringToAddressA 745 # @ stub RtlIpv6StringToAddressExA 746 @ stdcall RtlIpv6StringToAddressExW(wstr ptr ptr ptr) 747 # @ stub RtlIpv6StringToAddressW --- snip ---
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/rtl.c#l897
https://source.winehq.org/git/wine.git/commitdiff/71e04aaa38b35ab1607962ad30...
Looks pretty inconsistent. There is no pattern between Ipv4, Ipv6 and/or A/W ExA/ExW pairs of the API recognizable here. Some are auto-generated stubs, some are stubs, some are simply not present (commented out).
The Ipv4 string <-> address functions are not very hard to implement. Wine tests for this family of functions were added some time ago via Wine-Staging:
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/tests/rtl.c#l12...
* https://docs.microsoft.com/en-us/windows/desktop/api/ip2string/nf-ip2string-... * https://docs.microsoft.com/en-us/windows/desktop/api/ip2string/nf-ip2string-...
Regards