<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi again,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I would just like to confirm that indeed, you have to leave the service resolver in your client that you get with the resolve_callback alone. If you don't delete this object then it retriggers although you have to wait for about 4 to 5 minutes for this to happen
 after the change of the address took place.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It is a very simple procedure and it should be better explained in the sample code that you find when you want to write your own client.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Anyhow, thank you for your help, Trent!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
cheers,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Gert</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> avahi <avahi-bounces@lists.freedesktop.org> on behalf of Willems Gert (GWI) <Gert.Willems@niko.eu><br>
<b>Sent:</b> Tuesday, February 23, 2021 12:20 PM<br>
<b>To:</b> Avahi ML <avahi@lists.freedesktop.org><br>
<b>Subject:</b> [spoofed message] - Re: [avahi] AVAHI_BROWSER_NEW event when IP address changes is detected in cache</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<table border="0" cellspacing="0" cellpadding="0" align="left" width="`"100%`"">
<tbody>
<tr>
<td style="background:#bba555; padding:5.25pt 5.5pt 5.25pt 1.5pt"></td>
<td width="`"100%`"" cellpadding="`"7px" color="`"#212121`"" style="width:100.0%; background:#ffe599; padding:5.25pt 
3.75pt 5.25pt 11.25pt; word-wrap:break-word">
<div>
<p><span style="font-size:11pt; font-family:Arial,sans-serif; color:#212121"><b>CAUTION:</b> This email originated from outside the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi Trent,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
thank for responding so soon to my question.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm a bit confused about your comment to leave the ServiceResolver running, are you talking about a process or a specific object in the code that I need to keep running in a thread. </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
There is such a thing as the avahi-resolve client that indeed returns the correct address when I run that but that isn't something that keeps on running, it returns immediatly.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Then there is the AvahiServiceResolver object that you can create via the lookup.h include, this one we indeed use and create when the AVAHI_BROWSER_NEW event comes and it is via this ones resolve_callback function that we receive the address when that one
 is triggered when there is an AVAHI_RESOLVER_FOUND event happens. It indeed remains alive in its thread, however this remains silent when an address change occurs.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Gert</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> avahi <avahi-bounces@lists.freedesktop.org> on behalf of Trent Lloyd <trent@lloyd.id.au><br>
<b>Sent:</b> Monday, February 22, 2021 3:52 PM<br>
<b>To:</b> Avahi ML <avahi@lists.freedesktop.org><br>
<b>Subject:</b> Re: [avahi] AVAHI_BROWSER_NEW event when IP address changes is detected in cache</font>
<div> </div>
</div>
<div dir="auto">
<table border="0" cellspacing="0" cellpadding="0" align="left" width="`"100%`"">
<tbody>
<tr>
<td style="background:#bba555; padding:5.25pt 5.5pt 5.25pt 1.5pt"></td>
<td width="`"100%`"" cellpadding="`"7px" color="`"#212121`"" style="width:100.0%; background:#ffe599; padding:5.25pt 
3.75pt 5.25pt 11.25pt; word-wrap:break-word">
<div>
<p><span style="font-size:11pt; font-family:Arial,sans-serif; color:#212121"><b>CAUTION:</b> This email originated from outside the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<div>Hi Willems,
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>Trent<br>
<br>
<div dir="ltr">Sent from my iPhone</div>
<div dir="ltr"><br>
<blockquote type="cite">On 22 Feb 2021, at 4:08 pm, Willems Gert (GWI) <Gert.Willems@niko.eu> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I work in Niko, which is a Belgian company that mainly focusses on domotica applications.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Gert Willems</div>
<span>_______________________________________________</span><br>
<span>avahi mailing list</span><br>
<span>avahi@lists.freedesktop.org</span><br>
<span>https://lists.freedesktop.org/mailman/listinfo/avahi</span><br>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</body>
</html>