libdsm with meson support

Jean-Baptiste Kempf b92949df35 Explicitely include smb_types.h when including the main include %!s(int64=9) %!d(string=hai) anos
bin d82f6c18c0 program: use correct header for Windows %!s(int64=9) %!d(string=hai) anos
compat 9c1f592397 Fix O_NONBLOCK declaration %!s(int64=9) %!d(string=hai) anos
contrib 33f4a0e556 Fix libtasn1 version detection. Move tasn1 compat types to config.h %!s(int64=11) %!d(string=hai) anos
doc 425f8c82c4 doxygen: only generate doc for include %!s(int64=10) %!d(string=hai) anos
include b92949df35 Explicitely include smb_types.h when including the main include %!s(int64=9) %!d(string=hai) anos
m4 0483435c39 Add -Wall -Wextra to build flags %!s(int64=10) %!d(string=hai) anos
src da7364ac84 Netbios_query: include winsock2 on Win32 %!s(int64=9) %!d(string=hai) anos
www 3a25719776 add www/README %!s(int64=10) %!d(string=hai) anos
.gitignore 94fb9df84b Improve gitignore %!s(int64=9) %!d(string=hai) anos
.mailmap 60744f1558 Update mailmap for macromizer %!s(int64=9) %!d(string=hai) anos
AUTHORS 1fdde416f4 Update AUTHORS %!s(int64=9) %!d(string=hai) anos
COPYING dce710003c Update license and Readme %!s(int64=11) %!d(string=hai) anos
Makefile.am 4dbe222ec4 Add a compatible queue.h when missing %!s(int64=9) %!d(string=hai) anos
NEWS 3da58f20f1 Version 0.2.2 %!s(int64=9) %!d(string=hai) anos
NOTES.md 162ab2b352 Fix NOTES.md to actually match markdown syntax %!s(int64=9) %!d(string=hai) anos
README.md 9880bab40b Update Readme %!s(int64=9) %!d(string=hai) anos
abi_version.sh 69bdc304e1 build: Initial autotools %!s(int64=11) %!d(string=hai) anos
bootstrap 70b038c85f allow to run bootstrap from build-folder %!s(int64=9) %!d(string=hai) anos
configure.ac 36e1161059 configure: set _FILE_OFFSET_BITS to 64 bits %!s(int64=9) %!d(string=hai) anos
libdsm.pc.in 12b970c17b Correctly export winsock2 as linking library for Windows %!s(int64=9) %!d(string=hai) anos
package_version.sh 69bdc304e1 build: Initial autotools %!s(int64=11) %!d(string=hai) anos

README.md

liBDSM

lib Defective SMb (libDSM) is a SMB protocol client implementation in pure old C, with a lot less features than Samba but is simpler, and has with a more permissive license (currently LGPL + proprietary).

The initial goal of this project is to have a library that can access most SMB shares to read files and that has with a license compatible with the iOS/Android/WinRT appstores in order to integrate it into VLC for iOS and VLC for Android.

This library is also licensable under a proprietary license, if LGPL is not good enough for you.

The lib is provided as a static library or as a dynamically linked library. A few useless (yet) utils are also provided, mostly for testing purpose.

Features

Here's a list of the currently supported features:

  • NETBIOS
    • Basic bi-directionnal NETBIOS name resolution
    • Hacky LAN SMB servers discovery (Listing all the smb servers on the LAN, no WINS, etc.)
    • Basic NETBIOS Session transport layer
  • SMB
    • Support only required parts of 'NT LM 0.12' (aka CIFS?) dialect.
    • User based authentication
    • List Shares
    • Browse folders
    • Read file
    • Write file
    • Delete file
    • Delete empty folder
    • Move and rename file/folder
    • Create new folder
    • No copy, lock, RPCs, etc. [Hum... yet]

Support

liBDSM has been tested/reported to work with the following devices/OSes:

  • Windows 7
  • Windows 8/8.1
  • Samba
  • smbX (OSX new smb implementation)
  • QNAP TS-212
  • A cheap NAS whose name i can't remember :)

Feel free to contribute items to this list (or network trace of not working devices)

Building

Requirements

  • A Unix system with a bash-compatible shell
  • C99 C compiler
  • (GNU) Make
  • Autotools
  • libc with iconv
  • getopt_long
  • GNU tasn1 compiler/support library

The build dependencies can be installed on Debian(-based) systems using

sudo apt-get install build-essential autoconf libtool pkg-config libtasn1-3-dev libtasn1-3-bin libbsd-dev

HowTo

$> ./bootstrap
$> ./configure --prefix=/your/prefix
$> make
$> make install # maybe

TODO

  • HEAVILY refactor. Any help is welcome.
  • Support more of the SMBv2 and v3 protocols.

Contributing

  • Fork videolabs/libdsm
  • Make a feature branch
  • Commits your work there
  • Make a pull request
  • ...
  • Profit !