libsmb2, meet samba

Andreas Schneider asn at
Wed Apr 26 06:30:59 UTC 2017

On Wednesday, 26 April 2017 01:26:48 CEST ronnie sahlberg via samba-technical 
> Update. Start of unstructured brain dump:
> Libsmb2 is nearing its first official release. Which means it has all
> the features that QEMU and KODI (main consumers) need.
> Please have a look at my github repo.
> Libsmb2 is fully async and non-blocking.
> It does zero-copy for both READ and WRITE commands, in the sense that
> it reads/writes the application buffer directly to/from the socket
> without any memcpy() being done in the library itself.  True zero-copy
> will have to wait until RDMA support comes.
> It also supports compounded requests making the common pattern of
> CREATE/do-something/CLOSE execute in a single roundtrip.
> This should make a lot of metadata operations fast-ish.
> Not bloated yet, almost fitting in memory of a Sinclair Spectrum:
> $ ls -l lib/.libs/
> -rwxrwxr-x. 1 sahlberg sahlberg 51816 Apr 25 16:05
> lib/.libs/
> No external dependencies outside from MIT and basic libc making it,
> very portable.
> As I am not fluent in Visual Studio I would welcome any help I can get
> to set up a proper VS project file.

For something like that I really suggest to switch to the cmake build system. 
cmake is a metabuild system, it produces make, ninja, msys, mingw or VS 
project files. Once you have everything working on Linux, Windows is just a 
few lines of cmake away.

Here is my highly portable unit testing framework called cmocka.


You might want to use that to write unit tests ;)


Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at

More information about the samba-technical mailing list