takeshixx / knxmap

KNXnet/IP scanning and auditing tool for KNX home automation installations.
GNU General Public License v3.0
117 stars 41 forks source link

search doesn't work under windows #12

Open GrayGhost93 opened 6 years ago

GrayGhost93 commented 6 years ago

Problem with sockets in core.py:260 SO_REUSEPORT is not supported on windows platforms - according to https://my.oschina.net/miffa/blog/390932 SO_REUSEADDR could be an alternative.

Same with SO_BINDTODEVICE. Didn't found an alternative so far. The problem is to specify the interace in Windows would be great if this could be just the standard or only connected interface.

takeshixx commented 6 years ago

Good catch, thanks for creating the issue.

I haven't really done any testing on Windows systems so this has been unnoticed for quite some time. Do you happen to know if this only applies to specific versions or doesn't this work on Windows in general?

GrayGhost93 commented 6 years ago

I've tested on Windows 10 exclusivly, but as I was reading about SO_REUSEPORT, it seemed that this is a general purpose on windows systems. The other functions work so far, as I can say...

takeshixx commented 6 years ago

The way the search function works is actually quite unconventional. It took me some time to figure out how to implement it properly with asyncio. The other functions are pretty straight forward, at least from a networking-perspective (nothing is really straight forward with KNXnet/IP) so it doesn't surprise me that they are working properly. But it's good to know that Windows struggles with those settings. Let me know if you figure out a solution in the future. :relaxed: