[avahi] hosts with multiple names
robin.perkins at internode.on.net
Tue Mar 16 05:06:44 PDT 2010
On 16/03/2010, at 11:11 AM, Jeff Koftinoff wrote:
> I want to use avahi in an embedded device. I'd like for avahi to advertise the device's manufacturer name and serial number as the host name of the device. I also want the user to be able to enter in an alias for this device's host name. I want the device to be discoverable by both host names even though they would resolve to the same IP address.
> For instance, ACME Inc., has a device model number SX194J and the device's serial number is 3428472. The device would always be accessible via the host name:
> The user purchases the device and via the front panel, enters in the alias name: 'camera-front-door'
> Now the device is also accessible as:
> and it will still be accessible as:
> I want this because the name with the embedded serial number is easy to match with a label on the device, and the user friendly name is relevant to the user - until it isn't, for instance the device is disconnected as re-sold.
> How do I configure avahi to do this?
Whist I think what you want could be achieved with avahi_entry_group_add_record(...) I would proceed with caution. The hostname part is supposed to be malleable as part of the Zeroconf spec in order to deal with naming conflicts.
What service types are you advertising with your devices ? If it is a proprietary or custom protocol perhaps you could simply have the model and serial numbers associated with that service as txt records ? That way you can present the 'user friendly name' alongside the serial & model in a simple custom browser.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the avahi