Re: [avahi] Is it possible to customize #define AVAHI_DEFAULT_TTL_HOST_NAME and #define AVAHI_DEFAULT_TTL, rather than embedding them statically in the code?

2012-07-10 Thread Patrick Oppenlander





On Tue, Jul 10, 2012 at 4:55 AM, Patrick Oppenlander 
pattyo.li...@gmail.com mailto:pattyo.li...@gmail.com wrote:


On 05/07/12 20:19, Ajay Garg wrote:

Hi all.

I ran into a issue, as described at
https://bugs.freedesktop.org/show_bug.cgi?id=51501


This behaviour is not a bug. It's a side-effect of how MDNS is
(intentionally) designed.

Your bug report states that the callback is not called. It will in
fact be called, it just takes a long time.



Yes, I think it would.
But the callback is not called after 120 seconds. May be after 75 
minutes.. but I haven't waited that long enough :)


Also, as per 
https://tools.ietf.org/html/draft-cheshire-dnsext-multicastdns-15#section-10, 
the standard says that the timeout is expected to be 120 seconds.


I think you're misunderstanding how the TTLs are used. the 120 seconds 
refers to host specific records -- i.e. records that are available after 
a resolve. A client application is not notified when these records 
expire as they are transient.


The 75 minute TTL is for everything else, including PTR records, which 
is what you are interested in.


I've never used Telepathy so I can't really offer suggestions on how to 
proceed with your issue, but keep in mind that DNS-SD was never designed 
to provide an iron-clad guarantee that a service is available. The only 
way to determine that a service is genuinely available is to first 
resolve it, and if the resolve succeeds attempt to connect.


Patrick

___
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi


Re: [avahi] Is it possible to customize #define AVAHI_DEFAULT_TTL_HOST_NAME and #define AVAHI_DEFAULT_TTL, rather than embedding them statically in the code?

2012-07-10 Thread Ajay Garg
Thanks Patrick for the reply.


On Tue, Jul 10, 2012 at 11:38 AM, Patrick Oppenlander 
pattyo.li...@gmail.com wrote:




 On Tue, Jul 10, 2012 at 4:55 AM, Patrick Oppenlander 
 pattyo.li...@gmail.com wrote:

  On 05/07/12 20:19, Ajay Garg wrote:

 Hi all.

 I ran into a issue, as described at
 https://bugs.freedesktop.org/show_bug.cgi?id=51501


  This behaviour is not a bug. It's a side-effect of how MDNS is
 (intentionally) designed.

 Your bug report states that the callback is not called. It will in fact
 be called, it just takes a long time.



 Yes, I think it would.
 But the callback is not called after 120 seconds. May be after 75
 minutes.. but I haven't waited that long enough :)

 Also, as per
 https://tools.ietf.org/html/draft-cheshire-dnsext-multicastdns-15#section-10,
 the standard says that the timeout is expected to be 120 seconds.


 I think you're misunderstanding how the TTLs are used. the 120 seconds
 refers to host specific records -- i.e. records that are available after a
 resolve. A client application is not notified when these records expire as
 they are transient.

 The 75 minute TTL is for everything else, including PTR records, which is
 what you are interested in.

 I've never used Telepathy so I can't really offer suggestions on how to
 proceed with your issue, but keep in mind that DNS-SD was never designed to
 provide an iron-clad guarantee that a service is available. The only way to
 determine that a service is genuinely available is to first resolve it, and
 if the resolve succeeds attempt to connect.



Yes, that's right.

But the use-case we need to handle (getting to know when a client has
disconnected from the telepathy-salut network) wouldn't be solved by this.
Therein, we need to have a mechanism by which the dis-connectivity may be
known. Unfortunately, polling (or pseudo-polling) is the only ultimate way
(since the going-disconnected-buddy doesn't give the goodbye signal,
since no network-medium is available).


So, perhaps a client notification *should* get notified, once the
transient-resolved-records expire??!!



Just my 2 cents :)



Thanks and Regards,
Ajay







 Patrick


 ___
 avahi mailing list
 avahi@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/avahi


___
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi


Re: [avahi] Is it possible to customize #define AVAHI_DEFAULT_TTL_HOST_NAME and #define AVAHI_DEFAULT_TTL, rather than embedding them statically in the code?

2012-07-10 Thread Patrick Oppenlander

On 11/07/12 01:17, Ajay Garg wrote:


So, perhaps a client notification *should* get notified, once the 
transient-resolved-records expire??!!


This doesn't help as these records always expire after two minutes. They 
are not refreshed unless another resolve is requested.


Patrick
___
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi


Re: [avahi] Is it possible to customize #define AVAHI_DEFAULT_TTL_HOST_NAME and #define AVAHI_DEFAULT_TTL, rather than embedding them statically in the code?

2012-07-09 Thread Ajay Garg
Hi all.

I have written a patch, that solves the issue
https://bugs.freedesktop.org/show_bug.cgi?id=51501#c5

The patch is available at
http://people.sugarlabs.org/ajay/root/freedesktop_bug_51501/common-patch-for-f14-and-f17/customize-avahi-default-ttl-values.patch


Will be glad to have it considered, and have feedback/criticism/whatever.


Thanks and Regards,
Ajay

On Thu, Jul 5, 2012 at 7:32 PM, Ajay Garg ajaygargn...@gmail.com wrote:

 Hi all.

 Just found about /etc/avahi/avahi-daemon.conf.
 That would do it !!! (of course after patching avahi to read-in the two
 new values).

 Will be back soon with a patch :)


 Regards,
 Ajay


 On Thu, Jul 5, 2012 at 3:49 PM, Ajay Garg ajaygargn...@gmail.com wrote:

 Hi all.

 I ran into a issue, as described at
 https://bugs.freedesktop.org/show_bug.cgi?id=51501


 I followed these steps ::

 a)
 I changed the values to

  #define AVAHI_DEFAULT_TTL_HOST_NAME (20)
  #define
 AVAHI_DEFAULT_TTL   (20)

 b)
 Re-compiled the RPMS


 c)
 Upgraded to these new RPMS on my F17.


 And voila, the contacts-disappearance signals did emit (after about 20
 seconds)  !!!


 The same approach solved the issue on F14 as well !!!




 So, now I intend to make the values of these 2 #defines customizable.
 My queries are ::

 (i)
 Is it possible already?

 (ii)
 If answer to (i) is no, perhaps GConf might help? The thing that
 worries me is in what context should Gconf-entries be populated, since
 avahi runs as a daemon.




 Will be grateful to a reply.


 Thanks and Regards,
 Ajay






___
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi


Re: [avahi] Is it possible to customize #define AVAHI_DEFAULT_TTL_HOST_NAME and #define AVAHI_DEFAULT_TTL, rather than embedding them statically in the code?

2012-07-09 Thread Patrick Oppenlander

On 05/07/12 20:19, Ajay Garg wrote:

Hi all.

I ran into a issue, as described at 
https://bugs.freedesktop.org/show_bug.cgi?id=51501


This behaviour is not a bug. It's a side-effect of how MDNS is 
(intentionally) designed.


Your bug report states that the callback is not called. It will in fact 
be called, it just takes a long time.





I followed these steps ::

a)
I changed the values to

 #define AVAHI_DEFAULT_TTL_HOST_NAME (20)
 #define 
AVAHI_DEFAULT_TTL   (20)


This is a pretty bad idea as these records will need to be refreshed at 
17 second intervals.


Some people already consider mDNS to be a chatty protocol [1]. This 
kind of thing just exacerbates the problem.


Patrick

[1] http://www.net.princeton.edu/filters/mdns.html
___
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi


Re: [avahi] Is it possible to customize #define AVAHI_DEFAULT_TTL_HOST_NAME and #define AVAHI_DEFAULT_TTL, rather than embedding them statically in the code?

2012-07-09 Thread Ajay Garg
On Tue, Jul 10, 2012 at 4:55 AM, Patrick Oppenlander pattyo.li...@gmail.com
 wrote:

  On 05/07/12 20:19, Ajay Garg wrote:

 Hi all.

 I ran into a issue, as described at
 https://bugs.freedesktop.org/show_bug.cgi?id=51501


 This behaviour is not a bug. It's a side-effect of how MDNS is
 (intentionally) designed.

 Your bug report states that the callback is not called. It will in fact be
 called, it just takes a long time.



Yes, I think it would.
But the callback is not called after 120 seconds. May be after 75 minutes..
but I haven't waited that long enough :)

Also, as per
https://tools.ietf.org/html/draft-cheshire-dnsext-multicastdns-15#section-10,
the standard says that the timeout is expected to be 120 seconds.

So, at least making
 #define AVAHI_DEFAULT_TTL_HOST_NAME
 #define
AVAHI_DEFAULT_TTL

configurable (and not hard-coded), would make it more convenient for
personal customizations.


Just my 2 cents :)



Thanks and Regards,
Ajay









 I followed these steps ::

 a)
 I changed the values to

  #define AVAHI_DEFAULT_TTL_HOST_NAME (20)
  #define
 AVAHI_DEFAULT_TTL   (20)


 This is a pretty bad idea as these records will need to be refreshed at 17
 second intervals.

 Some people already consider mDNS to be a chatty protocol [1]. This kind
 of thing just exacerbates the problem.

 Patrick

 [1] http://www.net.princeton.edu/filters/mdns.html

 ___
 avahi mailing list
 avahi@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/avahi


___
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi


Re: [avahi] Is it possible to customize #define AVAHI_DEFAULT_TTL_HOST_NAME and #define AVAHI_DEFAULT_TTL, rather than embedding them statically in the code?

2012-07-05 Thread Ajay Garg
Hi all.

Just found about /etc/avahi/avahi-daemon.conf.
That would do it !!! (of course after patching avahi to read-in the two new
values).

Will be back soon with a patch :)


Regards,
Ajay

On Thu, Jul 5, 2012 at 3:49 PM, Ajay Garg ajaygargn...@gmail.com wrote:

 Hi all.

 I ran into a issue, as described at
 https://bugs.freedesktop.org/show_bug.cgi?id=51501


 I followed these steps ::

 a)
 I changed the values to

  #define AVAHI_DEFAULT_TTL_HOST_NAME (20)
  #define
 AVAHI_DEFAULT_TTL   (20)

 b)
 Re-compiled the RPMS


 c)
 Upgraded to these new RPMS on my F17.


 And voila, the contacts-disappearance signals did emit (after about 20
 seconds)  !!!


 The same approach solved the issue on F14 as well !!!




 So, now I intend to make the values of these 2 #defines customizable. My
 queries are ::

 (i)
 Is it possible already?

 (ii)
 If answer to (i) is no, perhaps GConf might help? The thing that worries
 me is in what context should Gconf-entries be populated, since avahi runs
 as a daemon.




 Will be grateful to a reply.


 Thanks and Regards,
 Ajay





___
avahi mailing list
avahi@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/avahi