libsmbclient API for querying LMB?

Derrell.Lipman at Derrell.Lipman at
Tue Nov 11 01:39:09 GMT 2003

David Wuertele <dave-gnus at> writes:

> 1.  Does running smbc_readdir() multiple times result in multiple
>     packets on the LAN?  Or does it cache and return?

smbc_opendir() does all of the work on the LAN, and can take a looonnnnggggg
time if reading a large folder (not an issue for your browsing usage).
smbc_readdir() just returns data from the cache.  smbc_closedir() frees the

> 2.  Is there a way to specify the ethernet interface used for the
>     query?

Not in the defined interface.  There may be a way using internal
manipulations.  If I recall correctly, smbc_init() reads smb.conf, so anything
that files does as far as specifying interfaces should probably have an
effect.  (You may be able to find an internal interface for manipulating the
configuration information as if it had been read from smb.conf.  I don't know
where that is, however.)


More information about the samba-technical mailing list