libsmbclient -I equivalent?
rosack at softhome.net
rosack at softhome.net
Tue Apr 9 10:33:02 GMT 2002
Richard Sharpe writes:
> OK, I have made a change to the 2.2.x code stream that tries again after
> *SMBSERVER fails, if the server was passed in as an IP address.
>
> Not tested, only built!
>
> Of course, this will be slow, as it will try to connect with the IP
> address as the called name first, then *SMBSERVER, and finally will do a
> name_status request (which takes time) and tries to connect with that
> name as the called name.
>
Hmm... that sounds OK, but I already implemented something like your first
idea from last night. :) I should have written back to you sooner.
My crawler has a couple of stages to it, and by the time it reaches the
full-out share crawling stage it already knows everyone's hostname that
it's going to crawl. So, I just added a static char * to libsmbclient that
holds the name of the current server, and a modifier to change it. Then,
in opendir and stat (the only two functions I'm really using) I set server
= the static string and voila, everything's A-OK... it's still incredibly
speedy, too.
I don't know if something like this would be useful enough to actually
merge into libsmbclient... even so, it'd take some work to make it not so
quick-hack like. :) Let me know what you think.
Thanks,
Mike Rosack
www.sacknet.org
www.buzzsearch.org
rosack at softhome.net
More information about the samba-technical
mailing list