-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mdns: Fix/Update Windows mdns code #837
Conversation
rgetz
commented
Apr 6, 2022
1204601
to
b336afb
Compare
b336afb
to
a4c0551
Compare
figured out there is still a problem on Windows/private networks - so this isn't ready to be merged yet. I must have missed something in copying things over from the other branch... |
d39f914
to
1c38bb7
Compare
Codacy complains that we are keeping track of something, and not using it (but we do use it in an IIO_DEBUG() function, it's just compiled out at this time)... So, ignore Codacy.... |
This patch relies on #838 - once that is committed - I will rebase on master and try binaries from CI - otherwise - it is ready to go/be reviewed. -Robin |
1c38bb7
to
905d6ca
Compare
Can confirm (finally) that this works on private/local links (
and then:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some cosmetic changes needed.
905d6ca
to
34a7b2a
Compare
Updated - and still works :)
|
34a7b2a
to
5540e28
Compare
Ok - still a bug if a device is serving up different ports... (currently sees only one). digging into that now. |
dns_sd_windows.c
Outdated
@@ -20,6 +20,10 @@ | |||
#include "iio-private.h" | |||
#include "deps/mdns/mdns.h" | |||
|
|||
#define _STRINGIFY(x) #x | |||
#define STRINGIFY(x) _STRINGIFY(x) | |||
#define MDNS_PORT_STR _STRINGIFY(MDNS_PORT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took me a few days to debug... But the fix is literally removing one character:
#define MDNS_PORT_STR STRINGIFY(MDNS_PORT)
One thing I wonder, is the usefulness to list scanned contexts on both IPv6 and IPv4; because afterwards, there is no way to specify which to use (they both would list the URI as ip:analog.local
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed on the branch, just testing to see if this resolves things.
What does that “fix”? I can see that’s a problem - and needs to be updated - but I don’t think that will fix the problem I was seeing…. As for ipv4 vs ipv6 - yes, if you use them by name, it doesn’t help - which is why it always displays the IP number at the same time. It has always been this way, and doesn’t have anything to do with the window implementation. |
@rgetz MDNS_PORT_STR evaluated to |
Yes - like I said - that needs to be fixed, but I don't think that solves the problem I was seeing (ipv4 and ipv6 with multiple instances of iiod running on different ports). |
Well I can assure you it does. I obviously tested it. |
Paul: on private network (cross over cable, no IP config) or on DHCP configured network? With and without VPN turned on? Getting all things working was the part I was having issues with. |
On a DHCP configured network with VPN turned off. |
It works with ADI's VPN turned ON as well. |
And private networks? cross over cable to RPi (That is where I was having most issues). |
My Windows laptop has no Ethernet port unfortunately :( |
I was using usb <-> Ethernet dongle to test. |
This syncs the application side with the updates in the mdns.h file from: https://github.com/mjansson/mdns/ and does things according to the specs. (build up info from both A, AAAA and SRV records), not just assuming that the DNS server is the host. Signed-off-by: Robin Getz <[email protected]>
5540e28
to
8453d92
Compare
@rgetz ready to merge? |
Robin is on vacation and might not respond. -Michael |