[avahi] hosts with multiple names
Jeff Koftinoff
jeffk at jdkoftinoff.com
Tue Mar 16 08:40:15 PDT 2010
On 2010-Mar-16, at 7:32 AM, Trent Lloyd wrote:
> Hi Jeff,
>
> On 16/03/2010, at 9: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:
>> acme-sx194j-3428472.local.
>>
>> 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:
>> camera-front-door.local.
>> and it will still be accessible as:
>> acme-sx194j-3428472.local.
>>
>> 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?
>
> Unfortunately avahi cannot do this directly, as if you put an entry in /etc/avahi/hosts it will conflict with the reverse DNS for your LAN ip.
>
>
> You will need to write a C or Python program which uses the add_record / AddRecord call.
>
> Regards,
> Trent
Thank you for the info. For further clarification I want the two hostnames to be visible via an off the shelf web browser like an iphone, so I can't use TXT records of my protocol. I see I'd have to be able to handle the rare case of a duplication "acme-sx194j-3428472.local." domain name.
Regards,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/avahi/attachments/20100316/0ce61c59/attachment.htm>
More information about the avahi
mailing list