wodemeng2007 at gmail.com
2013-Nov-12 08:54 UTC
[Samba] static link libsmbclient.a got a lot of error, and how to include "smbtree" feature in program
Hi All: I have some questions when writing a lib with libsmbclient-dev ,my target environment is on any linux system. 1 I want to static link libsmbclient.a instead of using libsmbclient.so, but I got a lot of error , am I able to use libsmbclient-dev using static link? 2 I found that ?smbtree? command is more stable in finding all those domains and servers than ?smb://? , am I right? why? 3 so I used pipe run way to call ?smbtree? command to get all the servers , but that requires installing samba-common ,can anybody tell me which part of samba source code is for ?smbtree? feature? Thank you very much!!
Chen Zhang
2013-Nov-13 01:03 UTC
[Samba] static link libsmbclient.a got a lot of error, and how to include "smbtree" feature in program
Thank you for your kindly help. yes , I want to know deeper the logic inside the smbtree command and smbclient , it would greatly help if someone in smbclient development team can help me on this. Now I'm making a small piece software that trying to access smb shares on various type of linux version through samba . And I want user to just only install one tool for all , I want to use "smbtree" and also libsmbclient-dev , can anybody tell me how to static link it? On Tue, Nov 12, 2013 at 5:42 PM, Fjong Fjongone <fjongone at gmail.com> wrote:> 2) > smbtree -D > > shows it simple and therefor more stable > > that said doing: > > findsmb > > gives a more complete list of domains and servers. > Example of: > > smbtree -D > WORKGROUP > WOODCUTTER > GODFATHER > > IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION > > ??????????????????????? > > 10.20.0.21 HURRY *[WINDOWS] [Windows 5.0] [Windows 2000 LAN > Manager] > > 10.20.0.34 EEW [WINDOWS] [Windows 5.0] [Windows 2000 LAN > Manager] > > 10.20.0.40 LINUX1 [WINDOWS] [Unix] [Samba 3.0.9-1.3E.2] > > 10.20.0.44 LINUX2 [WINDOWS] [Unix] [Samba 3.0.6-2.3E] > > 10.20.0.61 LINUX3 [WINDOWS] [Unix] [Samba 3.0.9-1.3E.2] > > 10.20.0.63 WINDOWS1 [WINDOWS] [Windows 5.0] [Windows > 2000 LAN Manager] > > 10.20.0.100 NOTES SERVER [GLOBAL] [Unix] [Samba 3.0.33-3.7.el5] > > 10.20.0.101 LINUX5 [WINDOWS] [Unix] [Samba 3.0.28-0.el4.9] > > 10.20.0.102 LINUX10 [WINDOWS] [Unix] [Samba 3.0.33-3.7.el5_3.1] > > 10.20.0.108 NEBULA2 +[WINDOWS] [Unix] [Samba 3.0.28-0.el4.9] > > 10.20.0.248 WINDOWS5 [WINDOWS] [Windows 5.1] [Windows 2000 LAN > Manager] > > As you can see you get much more information. > > Hope this helped, im not much in to SMB yet, I might read up on it ;) > > > > 2013/11/12 <wodemeng2007 at gmail.com>: > > > > Hi All: > > > > I have some questions when writing a lib with libsmbclient-dev ,my target > > environment is on any linux system. > > > > 1 I want to static link libsmbclient.a instead of using > > libsmbclient.so, but I got a lot of error , am I able to use > > libsmbclient-dev using static link? > > > > 2 I found that ?smbtree? command is more stable in finding all > > those domains and servers than ?smb://? , am I right? why? > > > > 3 so I used pipe run way to call ?smbtree? command to get all > > the servers , but that requires installing samba-common ,can anybody > tell me > > which part of samba source code is for ?smbtree? feature? > > > > Thank you very much!! >