proposal: libsmbclient functionality addition
rsharpe at ns.aus.com
Tue Jun 18 09:58:02 GMT 2002
On Tue, 18 Jun 2002, Tom Jansen wrote:
> > Here, I want to make it possible for people do do:
> > smbc_handle1 = smbc_init(client_name1);
> > ... a bunch of ops using smbc_handle1;
> > smbc_handle2 = smbc_init(client_name1);
> > ... a bunch of ops using smbc_handle2
> > That is, a single program can pretend to be multiple clients.
> I can make some time to help you implement this stuff if you would like that.
> I've got a few extra questions about that too:
> o Will all smbc_* functions get the handle when called ?
Yes, they have to be given the file handle.
The major issue here is that this will break all existing programs. I have
spent some time trying to think of a way to avoid this breakage, but fear
that I cannot do it easily.
> o Will the filetables still be global or will they be handle specific ? (Global
> is better IMHO. That way, only connection-initializing functions like smbc_open
> need the handle. And this eases porting to the "future"-libsmbclient)
This is a good point. The filetable should perhaps be global.
> Furthermore, my upcoming patch (for the suggestions that started this thread) is
> coming along nicely. I'm busy cleaning it up to match the samba-code-style.
> Some new features:
> o The cache system is different now. By default the internal cache system is
> used but that is changeable. (I will explain this beter when the patch arrives)
> o The servers are organized in a server_table now and have filedescriptors so we
> don't have to give internal information to an externa cache system. (I think
> this approach eases the change to the "handle-system" you mentioned above.)
> o Checking of the server connection before it will be pulled out of cache.
> o Transparant reconnects upon failures.
> Please, if you (Richard, the samba-technical people) have any suggestions, speak.
OK. I will wait for the patch ...
Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org,
sharpe at ethereal.com
More information about the samba-technical