[avahi] AVAHI_BROWSER_NEW event when IP address changes is detected in cache

Trent Lloyd trent at lloyd.id.au
Mon Feb 22 14:52:26 UTC 2021


Hi Willems,

For detecting this case I think you want to leave the ServiceResolver running.  Do you get a new hit on the ServiceResolver if you leave it running?

Trent

Sent from my iPhone

> On 22 Feb 2021, at 4:08 pm, Willems Gert (GWI) <Gert.Willems at niko.eu> wrote:
> 
> 
> Hello,
> 
> I'm new to the mailing list and have been digging around in the code of avahi for the last couple of days to figure out how it would be possible that the server would post a AVAHI_BROWSER_NEW event when an IP address change has been detected.
> I work in Niko, which is a Belgian company that mainly focusses on domotica applications.
> We use avahi in our product to detect what the devices are on the network. We use the client resolve_callback function in order to do this and this works find however we do have a problem that we don't get a trigger when there is an IP address change because of a reboot of the DHCP server or some other reason. Because of this we lose connection with our devices and other then a full reboot there is no way of solving that.
> I've been concentrating on the 0.7 release since that is the one that we are using. I've found out that the avahi cache does detect a change of IP address and that it even cleans up the old address. So it was a bit surprising to see that this doesn't lead to an event towards the client (like an AVAHI_BROWSER_NEW). As far as I can tell only new PTR records seem to lead to an actual event that triggers the client. So my question is, if I would like to create a custom version where address changes do lead to AVAHI_BROWER_NEW events, how would be the best way to go about and do this?
> 
> regards,
> Gert Willems
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/avahi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/avahi/attachments/20210222/37245217/attachment.htm>


More information about the avahi mailing list