Modifications to libsmbclient underway ...

Richard Sharpe sharpe at
Thu Jan 31 15:24:04 GMT 2002

Hi folks,

I am about to start working on some mods to libsmbclient as discussed 
with Andrew B a little while ago.

I need to be able to switch on oplocks for files, so I need to do some work.

What I plan to do is to change the way that initialization works, and 
add a bunch of new routines.

1. The library will provide the existing list of exposed names for 
backward compatibility, along with a new static structure of names that 
implement the new way of doing things. Called something like 
smbc_calls.smbc_read etc with the new routines at the end.  All of these 
routines will take a context as their first arg, rest will be similar to 
the original routines ...

2. smbc_init2 will return a context that has been malloc'd. It will 
contain all the necessary bits needed for this instance. One will be 
able to init2 again for new instances.  smbc_init will now create a 
default context.

3. All the old entry points will work, but they will work on the default 
context only.

4. I will add a routine smbc_set_caching that can set caching on a per 
file. It will translate into OPLOCKS in libsmb ...

5. I will add a version number to the library as a macro ...

Any objections/suggestions?

Richard Sharpe, rsharpe at, LPIC-1,, SAMS Teach Yourself Samba 
in 24 Hours, Special Edition, Using Samba

More information about the samba-technical mailing list