Avahi service name
omri50 at gmail.com
Fri Sep 1 16:56:42 UTC 2017
Samba currently advertises Avahi services under its NetBIOS name.
Since this is DNS-SD, it may make more sense to advertise under the hostname instead.
Since the NetBIOS name is uppercased, using it can be surprising to users.
There also isn’t any error checking on the NetBIOS name—if it is too long (greater than AVAHI_LABEL_MAX = 64 bytes, including null terminator), then avahi_entry_group_add_service() fails.
Obtaining the hostname can be done using gethostname() directly, or by get_myname() from libsamba-util (which calls gethostname() internally).
Thoughts on retaining NetBIOS name (truncating it if too long) versus using hostname?
More information about the samba-technical