Logo Search packages:      
Sourcecode: avahi version File versions  Download package

int avahi_nss_support ( void   ) 

Return 1 if gethostbyname() supports mDNS lookups, 0 otherwise.

Since:
0.6.5

Definition at line 31 of file check-nss.c.

                            {
    int b = 0;

#ifdef HAVE_DLOPEN
    static const char * const libs[] = {
        "libnss_mdns.so.2",
        "libnss_mdns4.so.2",
        "libnss_mdns6.so.2",
        NULL };

    const char * const *l;

    for (l = libs; *l; l++) {
        void *dl;

        if ((dl = dlopen(*l, RTLD_LAZY))) {
            b = 1;
            dlclose(dl);
            break;
        }
    }
#endif

    return b;
}


Generated by  Doxygen 1.6.0   Back to index