1 18 19 package jcifs.smb; 20 21 import java.io.UnsupportedEncodingException ; 22 23 class NetShareEnum extends SmbComTransaction { 24 25 private static final String DESCR = "WrLeh\u0000B13BWz\u0000"; 26 27 NetShareEnum() { 28 command = SMB_COM_TRANSACTION; 29 subCommand = NET_SHARE_ENUM; name = new String ( "\\PIPE\\LANMAN" ); 31 maxParameterCount = 8; 32 33 maxSetupCount = (byte)0x00; 35 setupCount = 0; 36 timeout = 5000; 37 } 38 39 int writeSetupWireFormat( byte[] dst, int dstIndex ) { 40 return 0; 41 } 42 int writeParametersWireFormat( byte[] dst, int dstIndex ) { 43 int start = dstIndex; 44 byte[] descr; 45 46 try { 47 descr = DESCR.getBytes( "ASCII" ); 48 } catch( UnsupportedEncodingException uee ) { 49 return 0; 50 } 51 52 writeInt2( NET_SHARE_ENUM, dst, dstIndex ); 53 dstIndex += 2; 54 System.arraycopy( descr, 0, dst, dstIndex, descr.length ); 55 dstIndex += descr.length; 56 writeInt2( 0x0001, dst, dstIndex ); 57 dstIndex += 2; 58 writeInt2( maxDataCount, dst, dstIndex ); 59 dstIndex += 2; 60 61 return dstIndex - start; 62 } 63 int writeDataWireFormat( byte[] dst, int dstIndex ) { 64 return 0; 65 } 66 int readSetupWireFormat( byte[] buffer, int bufferIndex, int len ) { 67 return 0; 68 } 69 int readParametersWireFormat( byte[] buffer, int bufferIndex, int len ) { 70 return 0; 71 } 72 int readDataWireFormat( byte[] buffer, int bufferIndex, int len ) { 73 return 0; 74 } 75 public String toString() { 76 return new String ( "NetShareEnum[" + super.toString() + "]" ); 77 } 78 } 79 | Popular Tags |