[avahi] Avahi and CUPS?

Lennart Poettering lennart at poettering.net
Tue Jul 25 07:05:53 PDT 2006


On Tue, 25.07.06 09:41, Norman Ramsey (nr at eecs.harvard.edu) wrote:

> 
>  > On Tue, 25.07.06 09:13, Norman Ramsey (nr at eecs.harvard.edu) wrote:
>  > 
>  > > Last week I was traveling, and avahi-browse worked perfectly
>  > > in finding printers.  Unfortunately, I could not persuade CUPS
>  > > of the existence of these printers.  Perhaps  I should be asking
>  > > on a CUPS list, but is there some trick to it?  (I thought other
>  > > Avahi users might know.)
>  > > 
>  > > The parts of my /etc/cups/cupsd.conf that I believe to be relevant are:
>  > > 
>  > > # Show shared printers on the local network.
>  > > Browsing On
>  > > BrowseOrder allow,deny
>  > > BrowseAllow from @LOCAL
>  > > BrowseProtocols dnssd cups
>  > > BrowseRemoteProtocols dnssd cups
>  > > BrowseLocalProtocols dnssd cups
>  > 
>  > AFAIK CUPS upstream doesn't support browsing for printers with either
>  > Bonjour or Avahi.
> 
> Hmm.  The documentation clearly lists 'dnssd' as an option, but maybe
> Avahi is considered 'mdnsd'?  In any case, thanks for the quick
> answer.

I grepped through the sources of cups 1.2.1 now:

<snip>
[lennart at ecstasy] ~/tmp/cupsys-1.2.1$ egrep '(dns.?sd|mdns|bonjour|rendezvous|avahi)' -i -R .
./doc/help/ref-cupsd-conf.html:BrowseLocalProtocols dns-sd
./doc/help/ref-cupsd-conf.html:BrowseLocalProtocols cups dns-sd
./doc/help/ref-cupsd-conf.html:BrowseProtocols dns-sd
./doc/help/ref-cupsd-conf.html:BrowseProtocols cups dns-sd
./doc/help/ref-cupsd-conf.html:BrowseRemoteProtocols dns-sd
./doc/help/ref-cupsd-conf.html:BrowseRemoteProtocols cups dns-sd
./scheduler/main.c:     (!Browsing || !(BrowseLocalProtocols & BROWSE_DNSSD) ||
./scheduler/conf.c:    else if (!strcasecmp(valstart, "dnssd") || !strcasecmp(valstart, "bonjour"))
./scheduler/conf.c:      protocols |= BROWSE_DNSSD;
./scheduler/sysman.c:    /* TODO: Possibly update when MDNS support is added? */
./scheduler/sysman.c:   * TODO: This might need updating for MDNS.
./scheduler/dirsvc.h:#define BROWSE_DNSSD       8               /* DNS Service Discovery aka Bonjour */
./man/cupsd.conf.man.in:BrowseProtocols [All] [CUPS] [DNSSD] [LDAP] [SLP]
./man/cupsd.conf.man.in:BrowseLocalProtocols [All] [CUPS] [DNSSD] [LDAP] [SLP]
./man/cupsd.conf.man.in:BrowseRemoteProtocols [All] [CUPS] [DNSSD] [LDAP] [SLP]
[lennart at ecstasy] ~/tmp/cupsys-1.2.1$
</snip>

What can we read from this? CUPS parses the config option "dnssd" and
it is even documented. But there is no actual implementation of it in the
sources! With neither the Bonjour not the Avahi API!

I wonder what they have been smoking when they did this. Looks a
little bit unprofessional to me...

Lennart

-- 
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/


More information about the avahi mailing list