[jcifs] NT_TRANSACT_NOTIFY_CHANGE

Michael B Allen miallen at ioplex.com
Wed Apr 2 15:20:53 GMT 2008


Get a capture of XP and a capture of your messages and compare them
byte-for-byte using WireShark.

Mike

On Wed, 2 Apr 2008 17:06:48 +0200
"Federico POGGIO" <fpoggio at elephantmemo.com> wrote:

> NT_TRANSACT_NOTIFY_CHANGE.
> 
> I have developed a NT_TRANSACT_NOTIFY_CHANGE that use a protocol
> SmbComNtTransaction. I add a Setup Words into method : 
> 
> nt writeSetupWireFormat(byte[] dst, int dstIndex)
> 
>             {
> 
>                         
> 
>                          int start = dstIndex;
> 
>                          
> 
>                          writeInt4( FILE_NOTIFY_CHANGE_FILE_NAME, dst,
> dstIndex );
> 
>                          dstIndex += 4;
> 
>                          writeInt2( fid, dst, dstIndex );
> 
>                  dstIndex += 2;
> 
>                          byte b = (byte)(watchTree?1:0);
> 
>                  dst[dstIndex++] = b;
> 
>                  dst[dstIndex++] = (byte)0x00; // Reserved          return
> dstIndex - start;
> 
>             }
> 
>    
> 
> I added this code in the costructor : 
> 
>     
> 
>             NtTransactNotifyChange(int completionFilter, int fid, boolean
> watchTree ) {
> 
>                         
> 
>                         this.completionFilter = completionFilter;
> 
>                         this.fid = fid;
> 
>                         this.watchTree = watchTree;
> 
>                         
> 
>                         command = SMB_COM_NT_TRANSACT;
> 
>                         timeout = 0xFFFFFFFF;
> 
>                         System.out.println("process to
> NtTransactNotifyyyChange");
> 
>                         function = NT_TRANSACT_NOTIFY_CHANGE;
> 
>                         
> 
>                         totalDataCount = 0;
> 
>                         maxParameterCount = 0;
> 
>              
> 
>                 maxDataCount = 4096;
> 
>              
> 
>                 maxSetupCount = (byte)0;
> 
>                 parameterCount = 0;
> 
>                         
> 
>                         setupCount = 4;
> 
>                                            
> 
>             }
> 
>  
> 
>  
> 
> When I call the transaction, the server response is a timeout.
> 
>  
> 
> I tryed to delete setupWordCount for look if the server can analyze a
> massage : A server respnse is a nt_trans : parameter incorrect. 
> 
>  
> 
> I am looking a bytes of message : a lenght of message is 81 bytes : the
> first bytes is header, after the header i find a Word Count whith a value of
> 23 (19 byte of standard parameters - MaxSetupCount, Reserver,
> TotalParameterCount, MaxParameterCount....) and 4 bytes for a setupwords[4] 
> 
>  
> 
> My problem is that after 30 sec, the server response is timeout.
> 
> The last trace that strace in SUSE  write is : 
> 
> read(5,
> "\xff\x53\x4d\x42\xa0\x00\x00\x00\x00\x18\x03\xd0\x00\x00\x00\x00\x00\x00\x0
> 0\x00\x00\x00\x00\x00\x01\x00\xa1\x84\x64\x00\x04\x00\x17\x00\x00\x00\x00\x0
> 0\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x0
> 0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x00\x08\x07\x00\x00\xa
> 1\x2a\x01\x00\x00\x00", 81) = 81 <0.000079>
> 
>  
> 
>  
> 
> Another people has writed NT_TRANSACT_NOTIFY_CHANGE ? 
> 
>  
> 
> Thank's
> 
>  
> 
> Federico POGGIO
> 
> 


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


More information about the jcifs mailing list