[avahi] publishing multiple instances of same service

Galen Seitz galens at seitzassoc.com
Fri Jun 13 10:41:40 PDT 2014


I'd like use avahi to publish multiple instances of the same service, 
with the only difference being the port number.  The host platform for 
the service and avahi is OpenWRT running on MIPS.  The service that I 
want to publish is ser2net, a serial port to network proxy 
(http://ser2net.sourceforge.net/).  ser2net presents each configured 
serial port as a telnet port.  I'd like to publish each of these telnet 
ports.  Because each serial port is a USB-to-serial converter, I'm using 
a hotplug script to dynamically configure the serial ports as they come 
and go.

Using an avahi service file, is it possible to publish multiple 
instances of the same service in a single file?  For example, say I have 
ttyUSB0 on telnet port 2000, and ttyUSB1 on telnet port 2001, can this 
be published in a single avahi service file?  My experiments with avahi 
suggest that this is not possible.

Regarding the service files, is it possible to change the location of 
the service files without rebuilding the avahi daemon?  Because /etc is 
on a flash filesystem, I'm currently using symbolic links to point to 
service files in /tmp.  If I could point to a different directory for 
the service files, I wouldn't need the symbolic links.  I've browsed the 
daemon code at ohloh.net, but I don't see where AVAHI_SERVICE_DIR is 

Galen Seitz
galens at seitzassoc.com

More information about the avahi mailing list