Skip to content

Conversation

@jukkar
Copy link
Member

@jukkar jukkar commented Sep 3, 2017

No description provided.

@jukkar jukkar added the net label Sep 3, 2017
@jukkar jukkar added this to the v1.10 milestone Sep 3, 2017
@jukkar jukkar self-assigned this Sep 3, 2017
@jukkar jukkar requested review from pfalcon and tbursztyka September 3, 2017 19:24
@jukkar jukkar mentioned this pull request Sep 4, 2017
const char *ptr = strstr(query, ".local");

for (j = 0; j < CONFIG_DNS_RESOLVER_MAX_SERVERS; j++) {
if (ptr && !memcmp(ptr, (const void *){ ".local\0" }, 7)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimal libc has a strrchr() function: search for the last dot, and memcmp() the returned ptr with ".local". It should be faster than using strstr() which is quadratic in the minimal libc.

This implements mDNS client from RFC 6762. What this means that
caller is able to resolve "hostname.local" names using multicast DNS.

Signed-off-by: Jukka Rissanen <[email protected]>
The DNS resolver example enables mDNS client support and then
queries zephyr.local hostname. The net-tools project has example
avahi-daemon script that will response these .local queries and
can be used in testing.

Signed-off-by: Jukka Rissanen <[email protected]>
The IPv4 multicast address to MAC address mapping was missing
the 4th byte high bit clearing.

We also need to have some storage for the multicast MAC address.
This was missing which could cause NULL pointer access.

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar
Copy link
Member Author

jukkar commented Sep 8, 2017

New version uploaded with suggested changes from @lpereira

@nashif nashif merged commit 91041f9 into zephyrproject-rtos:master Sep 17, 2017
@nashif nashif modified the milestones: v1.10, v1.10.0 Oct 3, 2017
nagineni pushed a commit to nagineni/zephyr that referenced this pull request Nov 20, 2017
@jukkar jukkar deleted the mdns-client branch June 21, 2018 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants