@Rayman said:
How does that work? Does the Wiznet ask the device for a preferred name?
And then, everybody can address each other by name?
The names have to be in the .local domain, but yes, if you have a nameresolver that supports MDNS, you can connect to other devices with the hostname. Windows will even go to just a short name. I don't know if other resolvers do that.
How it works in this instance:
I configure socket 4 on the W6100 to join the multicast group : 01:00:5E:00:00:FB
I configure the socket to have a destination IP of 224.0.0.251
I configure the destination port to be 5353
I open the socket. It joins the multicast group and listens for UDP traffic destined for 224.0.0.251 on port 5353.
In the webserver, when I am waiting for a connect, if none is detected, I execute a method to check if there is any data waiting on socket 4. If there is, I validate if it a MDNS query. If it isn't, I return. I then check to see of the queried hostname matches my own. If it doesn't, I return. If it does, I send an MDNS announcement via socket 4 with my IP address. The remote machine receives this query and then caches the IP address for the name in its resolver.
I currently do not do service announcements and I am not sure if there is value in doing that.
Comments
The names have to be in the .local domain, but yes, if you have a nameresolver that supports MDNS, you can connect to other devices with the hostname. Windows will even go to just a short name. I don't know if other resolvers do that.
How it works in this instance:
I configure socket 4 on the W6100 to join the multicast group : 01:00:5E:00:00:FB
I configure the socket to have a destination IP of 224.0.0.251
I configure the destination port to be 5353
I open the socket. It joins the multicast group and listens for UDP traffic destined for 224.0.0.251 on port 5353.
In the webserver, when I am waiting for a connect, if none is detected, I execute a method to check if there is any data waiting on socket 4. If there is, I validate if it a MDNS query. If it isn't, I return. I then check to see of the queried hostname matches my own. If it doesn't, I return. If it does, I send an MDNS announcement via socket 4 with my IP address. The remote machine receives this query and then caches the IP address for the name in its resolver.
I currently do not do service announcements and I am not sure if there is value in doing that.