[jcifs] Port 445 Transport
Christopher R. Hertel
crh at ubiqx.mn.org
Thu Feb 12 06:25:59 GMT 2004
I outline a strategy in my book:
There are more notes at the end of the current SMB URI draft too.
The problem, of course, is that I can only provide an outline in the book.
The actual implementation is a candidate for a lot of fine tuning.
- If the SMB URL you get resolves as a NetBIOS name then 139 is your best
first-guess. This may mean keeping some state info on the client side
(eg., did you start by looking up a workgroup name and then "descend"
to a server name).
- If port 139 or 445 are specified, then you have a clue.
- If a nonstandard port is specified (common with SSH port redirection,
for example) then you have to do some guessing.
- If you send an NBT Session Request to a non-NBT port (eg., 445) on a
Windows box the Windows box won't respond at all. You wind up timing
out. If you *don't* send the Session Request and one is expected, you
get an NBT Session Service error message *right away*. That's faster,
and you now know what to do. Samba doesn't care whether you send a
Session Request or not (on any port).
- You can't send RAP requests to port 445. Samba will respond (we're odd
that way) but Windows won't. The NetServerEnum2 doesn't make much sense
on port 445, and it seems that MS just doesn't run RAP on that port.
Hope that's useful.
On Thu, Feb 12, 2004 at 12:47:25AM -0500, Michael B Allen wrote:
> Can you recommend a strategy for how the jCIFS client should behave
> regarding port 445 transport. In suspect we should just attempt to connect
> to 445 and fall back to 139?
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs