Where to call mdns_resp_add_netif?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Where to call mdns_resp_add_netif?

Dave Nadler

I'm using LwIP 2.1.2 with DHCP, which works great.
I need to add MDNS for networks where the name provided to DHCP doesn't get resolved by clients.
I think I need to call mdns_resp_add_netif(struct netif *netif, char *hostname, u32_t dns_ttl)
after DHCP provides an address - where is the correct place to make that call?
Thanks!
Best Regards, Dave

-- 
Dave Nadler, USA East Coast voice (978) 263-0097, [hidden email], Skype 
 Dave.Nadler1

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Where to call mdns_resp_add_netif?

Dave Nadler
Hi - Hoping for a bit of help using MDNS.
Am I correct in understanding I need to register the IPaddress/netif with MDNS as below?
Is there a convenient hook to do this when DHCP receives an IP address?
Thanks in advance for any help,
Best Regards. Dave

On 10/22/2019 5:15 PM, Dave Nadler wrote:

I'm using LwIP 2.1.2 with DHCP, which works great.
I need to add MDNS for networks where the name provided to DHCP doesn't get resolved by clients.
I think I need to call mdns_resp_add_netif(struct netif *netif, char *hostname, u32_t dns_ttl)
after DHCP provides an address - where is the correct place to make that call?
Thanks!
Best Regards, Dave

-- 
Dave Nadler, USA East Coast voice (978) 263-0097, [hidden email], Skype 
 Dave.Nadler1

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Where to call mdns_resp_add_netif?

goldsimon@gmx.de
Am 25.10.2019 um 01:19 schrieb Dave Nadler:
> Hi - Hoping for a bit of help using MDNS.
> Am I correct in understanding I need to register the IPaddress/netif
> with MDNS as below?
> Is there a convenient hook to do this when DHCP receives an IP address?
> Thanks in advance for any help,

You can attach a callback to a netif that gets called when the address
or state changes. That would probably be a good place to do this:

See netif_add_ext_callback documentation.

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Where to call mdns_resp_add_netif?

Dave Nadler
Thanks Simon - Just what I was looking for, sorry I had failed to find this in the documentation,
Best Regards, Dave

On 10/25/2019 2:51 PM, [hidden email] wrote:
Am 25.10.2019 um 01:19 schrieb Dave Nadler:
Hi - Hoping for a bit of help using MDNS.
Am I correct in understanding I need to register the IPaddress/netif
with MDNS as below?
Is there a convenient hook to do this when DHCP receives an IP address?
Thanks in advance for any help,

You can attach a callback to a netif that gets called when the address
or state changes. That would probably be a good place to do this:

See netif_add_ext_callback documentation.

Regards,
Simon
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


-- 
Dave Nadler, USA East Coast voice (978) 263-0097, [hidden email], Skype 
 Dave.Nadler1

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users