[avahi] how to browse only two (or all) service types

Trent Lloyd lathiat at bur.st
Fri Jul 31 05:15:43 PDT 2009


Hi Ali,

On 31/07/2009, at 5:39 PM, Ali Mazhar wrote:

>
> Hi Trent,
>
> Thanks for the info. My application is for a mesh network and  
> therefore I need to see all the workstations which are in the same  
> network just like on line users in a messenger!

Rather than use _workstation for this you'd probably be better off  
registering your own service.  This way you can pass on states (like  
online/away/etc) and other useful info .. plus you won't see users  
that aren't actually running your mesh software.

> Btw, how is it possible to remove a published service, e.g.  
> multicast, from avahi without restarting the daemon. Actually, my  
> application simply publishes a multicast stream port using "avahi- 
> publish" and then start VLC application but when VLC is closed the  
> multicast stops but service still remains in avahi daemon unless I  
> restart it which naturally brings down my avahi browse application.  
> Any tips?

'avahi-publish' itself can be killed .. there is in no way a require  
to restart avahi-daemon.

to do this properly you would have to integrate support with VLC to  
publish/unpublish within VLC when it starts/stops - using /etc/avahi/ 
services/ or avahi-publish is a workaround to not having this  
available - but obviously not as nice in that it won't register/ 
unregister with the actual program.

Thanks,
Trent


More information about the avahi mailing list