[jcifs] Exists Junit tests?

Michael B Allen miallen at ioplex.com
Mon Mar 3 16:31:03 GMT 2008


On Mon, 3 Mar 2008 11:22:32 +0100
"Jordi Martín" <jordimartin at gmail.com> wrote:

> is possible I do [a CIFS] implementation in .NET (mono) for my
> final university project?

Sure. You could do some basic file operations with NTLMv1 authentication.

First, use WireShark to get a packet capture of Explorer looking at
some files.

  http://www.wireshark.org/

Use these references to decipher what you're looking at:

  http://ubiqx.org/cifs/rfc-draft/draft-leach-cifs-v1-spec-02.html
  http://ubiqx.org/cifs/
  http://davenport.sourceforge.net/ntlm.html

And look at JCIFS for design inspiration such as how it puts the request
and response into a map by MID and encodes and decodes frames.

Then implement the following commands:

  SMB_COM_NEGOTIATE
  SMB_COM_SESSION_SETUP_ANDX
  SMB_COM_TREE_CONNECT_ANDX
  SMB_COM_NT_CREATE_ANDX
  SMB_COM_READ_ANDX
  SMB_COM_WRITE_ANDX
  SMB_COM_CLOSE
  + all responses for above

Finally, anyone who wants to implement the CIFS needs to know one very
important thing - the "official" CIFS documentation is not accurate
and does not reflect reality. There is NO specification. Do not believe
anything you read in the IETF draft or the SNIA document (same document
different formatting). Use it only as a hint. The definitive reference
is whatever you see on the wire.

WireShark Rules!

Good luck,

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/


More information about the jcifs mailing list