[avahi] Binary data in TXT records

Lennart Poettering lennart at poettering.net
Wed Aug 11 12:22:42 PDT 2010


On Tue, 10.08.10 07:40, Jeff Koftinoff (jeffk at jdkoftinoff.com) wrote:

> I just read the following from
> http://www.zeroconf.org/Rendezvous/txtrecords.html which states that
> while it is a TXT record, the NAME is ASCII, but the VALUE is 8 bit
> binary and you SHOULD NOT convert binary values into hexadecimal
> ascii!
> 
> What is the best way to encode binary values in a TXT record as
> defined by the xml service file in avahi?
> 
> Does avahi handle embedded nulls in the value?

The C API allows you to create binary TXT fields very easily. However,
this is not supported in the XML definition for static services, simply
because there is no nice way to include binary data in XML files.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the avahi mailing list