smb service discovery support

Rishi Srivatsavai rishisv at gmail.com
Tue Mar 13 22:22:25 GMT 2007


Hello Volker,

On 3/13/07, Volker Lendecke <Volker.Lendecke at sernet.de> wrote:
>
> On Tue, Mar 13, 2007 at 05:18:45PM -0400, Rishi Srivatsavai wrote:
> > I have included the svn diff output below to add support for DNS service
> > discovery in smbd and smbclient. Please provide feedback on the proposed
>
> > changes. Changes are needed in configure.in for this feature as well.
> > My original post on adding this support is here:
> >     http://lists.samba.org/archive/samba/2007-January/128967.html
> >
> > The changes in smbd only advertise the availability of the smb service
> > and the advertisement does not include the browseable shares. But
> > users can use smbclient for the lookup once they discover the smb
> > service.
>
> The server side is a bit difficult I think. To me it seems
> that DNSServiceRegister() is a sync interface that blocks if
> something is wrong in the mdns daemon. This is not a good
> idea to do in the main smbd accepting client connections.



The DNSServiceRegister() call is async, does not block and results
incl. errors are also delivered async.


Two solutions:
>
> 1) Fork a daemon along the lines of the lpq updater daemon.
>
> 2) The MUCH preferred solution would be to also have the
> parent use lib/events.c like the children do. This is not
> yet the case, but it would be easy to add. This way a fully
> async registring implementation would be possible. Using
> lib/events.c makes it API compatible with the Samba4 events
> lib which will eventually make it into Samba3. It will also
> get rid of the nasty statics that you use for repeating your
> registering attempts. You could use timed events to do this
> once per minute or so.


I shall take a look at lib/events.c and try using it which will incl.
checking the events in the parent. I shall get back to the list
with the results. Thank you for reviewing the proposed changes.

Thanks,
Rishi


More information about the samba-technical mailing list