Closed nicopace closed 8 years ago
Yes, that would be doable, but it looks like avahi-daemon
might be more suited to this use case and already provides the functionality you are looking for. Keep in mind that announce is meant to be a super-tiny, minimalistic version.
The issue with avahi-daemon is that it doesn't allow to publish services from outside the host... that is really inconvinient in our case....
Ok... i have researched a little bit inside the code. Let me know if I get it right. In order to implement a server that fetches mdns entries from other services, caches it, replicates caches over the network, I would need for this code to:
wow... that seems a lot to do.. any suggestions?
Still think that using Avahi might be your best option...
Avahi doesn't allow me to add entries that are not on the host that Avahi is installed, so it is not possible to go over that path... unless I go into modifying Avahi`s source code... quite complicated for now.
Thanks!
Avahi doesn't allow me to add entries that are not on the host that Avahi is installed
Why do you keep thinking that?
https://linux.die.net/man/5/avahi-daemon.conf
host-name= Set the host name avahi-daemon tries to register on the LAN
I got to this conclusion because you can't add many hosts... just one per interface (as it is with your code too). I might use the reflector feature to begin thinking an implementation.
I think you can have as many Avahi service files on one host as you like...
Ok... so I could create one avahi.service and avahi.hosts information... that may help! will try and post back... thanks!
It works @probonopd, awesome!! Many thanks! Just to leave the information for others to find it, avahi allows to statically add any service or host information to its records... So if you add service files on /etc/avahi/services/ and host info on /etc/avahi/hosts and then reload the config with avahi-daemon -r ... it works!
I'm working on a service for the libremesh project, It would be great to be able to publish a list of services defined on a file or passed as parameters. Also would need to publish services that are not located on the host.
Is that doable?
This is the use case: we have a mesh network of +50 nodes. The mesh protocol has a service subprotocol that allows to send administrative information much more effectively than using multicast, so as we have openwrt on each node, what we want is to snoop the mdns resolvers on each node for their mdns records and publish them through this service subprotocol in order to efficiently share mdns information.
thanks!