[avahi] how to determine if an AvahiAddress is the
local machine's?
Lennart Poettering
lennart at poettering.de
Fri Sep 9 14:53:29 PDT 2005
On Fri, 09.09.05 17:32, Charles Schmidt (cschmidt2 at emich.edu) wrote:
> > Third I will add a new DBUS API function "IsAddressLocal()" for
> > you. However, we will not add a wrapper in avahi-client for that. If
> > you use avahi-client you can use netlink or SIOCGIFCONF directly. Or
> > use the cookie stuff/avahi_client_is_service_local(). The reason why I
> > add it as DBUS method is that a similar function is already available
> > in avahi's core and people who make direct use of DBUS from something
> > that is not C/C++ (without going through avahi-client) might need it.
> >
> > I hope this would satisfy your needs?
>
> Yeah. That sounds good. However, your suggestions do bring my
> attention to an alternative solution, at least for my purposes.
>
> In my situation, I am resolving immediately, because I need some of the
> TXT records before I determine how to use the service. I hadn't
> considered that I could just add my own TXT record to my own service
> that would identify it well enough. So I think I'll switch my code over
> to do it this way until what you're describe makes a release.
Yes, that a possible solution (though it will work reliable only if
you only have a single local instance of your app running.) If you add
those TXT records and this is for an "official" protocol, consider
adding a "vendor prefix" to your key
name. i.e. "org.foobar.supersoftware.cookie=". For more information on
vendor prefixes see the dns-sd spec, chapter 6.4.
Lennart
--
Lennart Poettering; lennart [at] poettering [dot] de
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.de/lennart/
More information about the avahi
mailing list