2

I'm trying to write a C program that allows me to publish a service over the local network. I'm using Avahi to publish this service named download and of type _lzo._tcp.

Basically, I deployed this C program in 2 raspberry-pi boards which both have an avahi-daemon & have a different IP address (192.168.0.10 & 192.168.0.11).

Actually, I'm having one of the two download services found by using avahi-discover, corresponding to the first raspberry-pi that has declared the service.

In the second one, I have no issue given by the avahi-daemon. Is this really possible to have twice the same download service of the same type but corresponding to two different publishers?

Mateusz Piotrowski
  • 8,029
  • 10
  • 53
  • 79
Lazao
  • 225
  • 6
  • 16

2 Answers2

0

Yes, this is called a name collision in zero conf, and should work. It's advised to not do this as most clients will be confused and only display one of them. Other, such as the bonjour implementation will rename the second one to dowload (2). In summary, it is possibly, but not worth the trouble.

vidstige
  • 12,492
  • 9
  • 66
  • 110
0

This might be present in the DNS-SD protocol on top of which Avahi is implemented. In Android, I saw using NSD-Manager there is a bug which sometimes publishes one service 3-4 times. In network if you browse you will see it as Service, Service(2), ...

Saby
  • 718
  • 9
  • 29