https://bugs.winehq.org/show_bug.cgi?id=37167
Bug ID: 37167 Summary: IEC 61850 v2.02 example client expects 'wine_pcap_findalldevs_ex' to return adapter names in '<protocol>://\Device\NPF_<adaptername>' format Product: Wine Version: 1.7.25 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net
Hello folks,
continuation of bug 37061
--- snip --- $ wine ./IEC61850_Example_Client.exe fixme:heap:HeapSetInformation (nil) 1 (nil) 0 fixme:wpcap:wine_pcap_findalldevs_ex ("rpcap://" (nil) 0x33fa64 0x33fb78): partial stub Can't start server: GOOSE Service failed to perform the requested action (-73) Stopping IEC61850 Client Freeing IEC61850 Client
IEC61850 Client Example has ended, press enter to exit --- snip ---
The client expects the returned adapter/interface names in following format:
<protocol>://\Device\NPF_<adaptername>
Where '<adaptername>' has usually '{GUID}' format on Windows.
It uses the adapter names returned from 'GetAdaptersInfo' to construct the string and does 'stricmp' on 'name' member of each 'pcap_if' list entry (returned by 'wine_pcap_findalldevs_ex') to match the entry.
Output of adapter names from Linux native:
--- snip --- $ dumpcap -D 1. virbr0 2. tun0 3. nflog 4. nfqueue 5. em1 6. wlp4s0 7. any 8. lo (Loopback) --- snip ---
$ sha1sum SET\ IEC61850DLLV2\ Demo.exe 72ebe36f11e4a3fb5c117db7bd6b367b4e0eb058 SET IEC61850DLLV2 Demo.exe
$ du -sh SET\ IEC61850DLLV2\ Demo.exe 1.1M SET IEC61850DLLV2 Demo.exe
$ wine --version wine-1.7.25
Regards
https://bugs.winehq.org/show_bug.cgi?id=37167
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://api.systemcorp.com.a | |u/Files/SET%20IEC61850DLLV2 | |%20Demo.exe
https://bugs.winehq.org/show_bug.cgi?id=37167
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=37167
--- Comment #1 from André H. nerv@dawncrow.de --- Years later... When I change the value in the struct list returned by native pcap_findalldevs_ex from e.g. "enp9s0" to "rpcap://\Device\NPF_enp9s0" I get the same error, I tried some more combinations like removing the protocoll and such, but none worked... Any ideas?
Anyway, changing the struct contents leads to a problem regarding memory managment, we then need to cleanup the mess we made, so we would need to track it. I'm not sure if we should effort it
https://bugs.winehq.org/show_bug.cgi?id=37167
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |wpcap
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
--- snip --- $ WINEDEBUG=+seh,+relay,+snoop,+wpcap wine ./IEC61850_Example_Client.exe
log.txt 2>&1
... 002a:CALL PIS10V2.IEC61850_GetLibraryVersion(<unknown, check return>) ret=004017e6 002a:RET PIS10V2.IEC61850_GetLibraryVersion() retval=1005c2c8 ret=004017e6 ... 002a:CALL PIS10V2.IEC61850_Create(0033fcf0,0033fd2c) ret=004020b0 ... 002a:RET PIS10V2.IEC61850_Create() retval=0043d7e0 ret=004020b0 002a:CALL PIS10V2.IEC61850_LoadSCLFile(0043d7e0,00403210) ret=00401826 002a:Call msvcr100.fopen(00403210 "../cidFiles/client.cid",1005c2b4 "r") ret=100201de ... 002e:Call PE DLL (proc=0x100580ef,module=0x10000000 L"PIS10V2.dll",reason=THREAD_ATTACH,res=(nil)) 002e:Ret PE DLL (proc=0x100580ef,module=0x10000000 L"PIS10V2.dll",reason=THREAD_ATTACH,res=(nil)) retval=1 002a:Call KERNEL32.CreateFileW(0043d9f0 L"../cidFiles/client.cid",80000000,00000003,0033fa0c,00000003,00000001,00000000) ret=7e918c4f 002e:Starting thread proc 0x10056690 (arg=0x43d198) ... 002a:CALL PIS10V2.IEC61850_Start(<unknown, check return>) ret=0040186f ... 002a:Call iphlpapi.GetAdaptersInfo(004af2d0,0033fae0) ret=1001edcc 002a:Ret iphlpapi.GetAdaptersInfo() retval=0000006f ret=1001edcc ... 002a:Call iphlpapi.GetAdaptersInfo(004af778,0033fae0) ret=1001edfe ... 002a:Ret iphlpapi.GetAdaptersInfo() retval=00000000 ret=1001edfe 002a:Call wpcap.pcap_findalldevs_ex(1005e304,00000000,0033faf4,0033fc08) ret=1001ee20 002a:fixme:wpcap:wine_pcap_findalldevs_ex ("rpcap://" (nil) 0x33faf4 0x33fc08): partial stub 002a:trace:wpcap:wine_pcap_findalldevs (0x33faf4 0x33fc08) 002a:Ret wpcap.pcap_findalldevs_ex() retval=00000000 ret=1001ee20 002a:Call msvcr100.memset(0033fb15,00000000,000000ef) ret=1001eede 002a:Ret msvcr100.memset() retval=0033fb15 ret=1001eede 002a:Call msvcr100._stricmp(7d056850 "enp5s0",0033fb00 "rpcap://\Device\NPF_enp5s0") ret=1001ef1f 002a:Ret msvcr100._stricmp() retval=fffffff3 ret=1001ef1f 002a:Call msvcr100.memset(0033fb15,00000000,000000ef) ret=1001eede 002a:Ret msvcr100.memset() retval=0033fb15 ret=1001eede 002a:Call msvcr100._stricmp(7d056850 "enp5s0",0033fb00 "rpcap://\Device\NPF_wlp4s0") ret=1001ef1f 002a:Ret msvcr100._stricmp() retval=fffffff3 ret=1001ef1f 002a:Call msvcr100.memset(0033fb15,00000000,000000ef) ret=1001eede 002a:Ret msvcr100.memset() retval=0033fb15 ret=1001eede 002a:Call msvcr100._stricmp(7d056860 "lo",0033fb00 "rpcap://\Device\NPF_enp5s0") ret=1001ef1f 002a:Ret msvcr100._stricmp() retval=fffffffa ret=1001ef1f ... 002a:RET PIS10V2.IEC61850_Start() retval=ffffffb7 ret=0040186f 002a:CALL PIS10V2.IEC61850_ErrorString(ffffffb7) ret=00401880 002a:RET PIS10V2.IEC61850_ErrorString() retval=1005b140 ret=00401880 ... 002a:CALL PIS10V2.IEC61850_Stop(<unknown, check return>) ret=004020fd 002a:RET PIS10V2.IEC61850_Stop() retval=00000000 ret=004020fd ... --- snip ---
With the adapter names part fixed it still fails (comment #1):
--- snip --- ... 002a:Call wpcap.pcap_findalldevs_ex(1005e304,00000000,0033faf4,0033fc08) ret=1001ee20 002a:fixme:wpcap:wine_pcap_findalldevs_ex ("rpcap://" (nil) 0x33faf4 0x33fc08): partial stub 002a:trace:wpcap:wine_pcap_findalldevs (0x33faf4 0x33fc08) 002a:trace:wpcap:wine_pcap_findalldevs entry: 1. enp5s0 ((null)) addr=0x7c921e40 flags=0x16 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_enp5s0 002a:trace:wpcap:wine_pcap_findalldevs entry: 2. lo ((null)) addr=0x7c921a40 flags=0x37 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_lo 002a:trace:wpcap:wine_pcap_findalldevs entry: 3. any (Pseudo-device that captures on all interfaces) addr=(nil) flags=0x36 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_any 002a:trace:wpcap:wine_pcap_findalldevs entry: 4. wlp4s0 ((null)) addr=0x7c921ec0 flags=0x2a 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_wlp4s0 002a:trace:wpcap:wine_pcap_findalldevs entry: 5. bluetooth-monitor (Bluetooth Linux Monitor) addr=(nil) flags=0x38 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_bluetooth-monitor 002a:trace:wpcap:wine_pcap_findalldevs entry: 6. nflog (Linux netfilter log (NFLOG) interface) addr=(nil) flags=0x30 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_nflog 002a:trace:wpcap:wine_pcap_findalldevs entry: 7. nfqueue (Linux netfilter queue (NFQUEUE) interface) addr=(nil) flags=0x30 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_nfqueue 002a:trace:wpcap:wine_pcap_findalldevs entry: 8. bluetooth0 (Bluetooth adapter number 0) addr=(nil) flags=0x8 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_bluetooth0 002a:trace:wpcap:wine_pcap_findalldevs entry: 9. usbmon0 (All USB buses) addr=(nil) flags=0x30 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_usbmon0 002a:trace:wpcap:wine_pcap_findalldevs entry: 10. usbmon1 (USB bus number 1) addr=(nil) flags=(nil) 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_usbmon1 002a:trace:wpcap:wine_pcap_findalldevs entry: 11. usbmon2 (USB bus number 2) addr=(nil) flags=(nil) 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_usbmon2 002a:trace:wpcap:wine_pcap_findalldevs entry: 12. usbmon3 (USB bus number 3) addr=(nil) flags=(nil) 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_usbmon3 002a:trace:wpcap:wine_pcap_findalldevs entry: 13. usbmon4 (USB bus number 4) addr=(nil) flags=(nil) 002a:trace:wpcap:wine_pcap_findalldevs entry new name: rpcap://\Device\NPF_usbmon4 002a:Ret wpcap.pcap_findalldevs_ex() retval=00000000 ret=1001ee20 002a:Call msvcr100.memset(0033fb15,00000000,000000ef) ret=1001eede 002a:Ret msvcr100.memset() retval=0033fb15 ret=1001eede 002a:Call msvcr100._stricmp(7c921050 "rpcap://\Device\NPF_enp5s0",0033fb00 "rpcap://\Device\NPF_enp5s0") ret=1001ef1f 002a:Ret msvcr100._stricmp() retval=00000000 ret=1001ef1f 002a:Call msvcr100.memset(0033fb15,00000000,000000ef) ret=1001eede 002a:Ret msvcr100.memset() retval=0033fb15 ret=1001eede ... 002a:Call msvcr100._stricmp(7c9211f0 "rpcap://\Device\NPF_usbmon4",0033fb00 "rpcap://\Device\NPF_wlp4s0") ret=1001ef1f 002a:Ret msvcr100._stricmp() retval=fffffffe ret=1001ef1f 002a:Call msvcr100.free(004af778) ret=1001f035 002a:Call ntdll.RtlFreeHeap(00410000,00000000,004af778) ret=7e9204a7 002a:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e9204a7 002a:Ret msvcr100.free() retval=00000001 ret=1001f035 002a:Call msvcr100.free(004af2b8) ret=1001f04a 002a:Call ntdll.RtlFreeHeap(00410000,00000000,004af2b8) ret=7e9204a7 002a:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e9204a7 002a:Ret msvcr100.free() retval=00000001 ret=1001f04a 002a:RET PIS10V2.IEC61850_Start() retval=ffffffb7 ret=0040186f 002a:CALL PIS10V2.IEC61850_ErrorString(ffffffb7) ret=00401880 002a:RET PIS10V2.IEC61850_ErrorString() retval=1005b140 ret=00401880 ... --- snip ---
That seems to be a different issue. The example compares the MAC address of the matching entries against some strange values, such as 01020304050A and fails.
Another example output:
https://www.winpcap.org/docs/docs_411/html/group__wpcap__tut1.html)
--- quote --- On Windows, you will need to create a project, following the instructions in the Using WinPcap in your programs section of this manual. However, we suggest that you use the WinPcap developer's pack (available at the WinPcap website, http://www.winpcap.org ), since it provides many examples already configured as projects including all the code presented in this tutorial and the includes and libraries needed to compile and run the examples.
Assuming we have compiled the program, let's try to run it. On a particular WinXP workstation, the result we optained is
1. \Device\NPF_{4E273621-5161-46C8-895A-48D0E52A0B83} (Realtek RTL8029(AS) Ethernet Adapter) 2. \Device\NPF_{5D24AE04-C486-4A96-83FB-8B5EC6C7F430} (3Com EtherLink PCI)
As you can see, the name of the network adapters (that will be passed to libpcap when opening the devices) under Windows are quite unreadable, so the parenthetical descriptions can be very helpful. --- quote ---
$ sha1sum SET\ IEC61850DLLV2\ Demo.exe 72ebe36f11e4a3fb5c117db7bd6b367b4e0eb058 SET IEC61850DLLV2 Demo.exe
$ du -sh SET\ IEC61850DLLV2\ Demo.exe 1.1M SET IEC61850DLLV2 Demo.exe
$ wine --version wine-4.3-188-gab7756619c
Regards
https://bugs.winehq.org/show_bug.cgi?id=37167
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://api.systemcorp.com.a |https://web.archive.org/web |u/Files/SET%20IEC61850DLLV2 |/20210318203923/http://api. |%20Demo.exe |systemcorp.com.au/Files/SET | |%20IEC61850DLLV2%20Demo.exe
https://bugs.winehq.org/show_bug.cgi?id=37167
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |622b0e29a6efae8f45dd00a1d72 | |8512987252c9f
--- Comment #3 from Hans Leidekker hans@meelstraat.net --- Should be fixed with 622b0e29a6efae8f45dd00a1d728512987252c9f.
https://bugs.winehq.org/show_bug.cgi?id=37167
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.19.