1 18 19 package jcifs.smb; 20 21 class Trans2GetDfsReferral extends SmbComTransaction { 22 23 private int maxReferralLevel = 3; 24 25 Trans2GetDfsReferral( String filename ) { 26 path = filename; 27 command = SMB_COM_TRANSACTION2; 28 subCommand = TRANS2_GET_DFS_REFERRAL; 29 totalDataCount = 0; 30 maxParameterCount = 0; 31 maxDataCount = 4096; 32 maxSetupCount = (byte)0x00; 33 } 34 35 int writeSetupWireFormat( byte[] dst, int dstIndex ) { 36 dst[dstIndex++] = subCommand; 37 dst[dstIndex++] = (byte)0x00; 38 return 2; 39 } 40 int writeParametersWireFormat( byte[] dst, int dstIndex ) { 41 int start = dstIndex; 42 43 writeInt2( maxReferralLevel, dst, dstIndex ); 44 dstIndex += 2; 45 dstIndex += writeString( path, dst, dstIndex ); 46 47 return dstIndex - start; 48 } 49 int writeDataWireFormat( byte[] dst, int dstIndex ) { 50 return 0; 51 } 52 int readSetupWireFormat( byte[] buffer, int bufferIndex, int len ) { 53 return 0; 54 } 55 int readParametersWireFormat( byte[] buffer, int bufferIndex, int len ) { 56 return 0; 57 } 58 int readDataWireFormat( byte[] buffer, int bufferIndex, int len ) { 59 return 0; 60 } 61 public String toString() { 62 return new String ( "Trans2GetDfsReferral[" + super.toString() + 63 ",maxReferralLevel=0x" + maxReferralLevel + 64 ",filename=" + path + "]" ); 65 } 66 } 67 | Popular Tags |