smb service discovery support

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Mar 13 21:56:32 GMT 2007


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.

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.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070313/0e9eb667/attachment.bin


More information about the samba-technical mailing list