[avahi] The purpose and usage of the TXT field
lennart at poettering.net
Tue Aug 19 05:10:53 PDT 2008
On Tue, 19.08.08 10:49, Nathan Huesken (avahi at lonely-star.org) wrote:
> Hi, The avahi_entry_group_add_service last 3 parameters are, I
> guess, for the "TXT information". I can not find any documentation
> for them and so I wonder:
Uh? avahi_entry_group_add_service() is a variadic function. It takes
an arbitrary number of arguments. Speaking of the "last 3" doesn't
really make sense:
The list needs to be terminated with a NULL sentinel.
> a) How to use them? Why are there 3? What does every single one of
There are as many as you wish but at most 255 (if I remember
correctly). The order is not relevant.
> b) What is the idea of TXT field and what should it be used for?
You can attach any information to a service you want. For printers
this might be paper size as one example, or whether it's a color/bw
printer and so on.
See chapter 6 of the DNS-SD spec:
Stuart's list of service types also lists a few TXT fields that are
known for each type:
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the avahi