Picroft Host name entry

I noticed that when picroft connects to my network, the device becomes available as picroft.network_name.host
Does anyone know how this is done? I scanned all of the scripts and I do not see how this is happening. And is this reliable?

Thank you

Probably avahi-daemon is running, broadcasting the hostname to the local network`?
When connecting via DHCP, some routers also automatically provide their hostnames to the network.

In case compare with cat /etc/hostname .