java.lang.Object
org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
org.codelibs.jcifs.smb.internal.smb1.AndXServerMessageBlock
org.codelibs.jcifs.smb.internal.smb1.com.SmbComTreeConnectAndXResponse
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockRequest,CommonServerMessageBlockResponse,RequestWithPath,TreeConnectResponse,Message,Request,Response
public class SmbComTreeConnectAndXResponse
extends AndXServerMessageBlock
implements TreeConnectResponse
SMB1 Tree Connect AndX response implementation.
Handles server responses to tree connect requests in SMB1 protocol, providing
information about the connected share including service type and DFS capabilities.
- Author:
- mbechler
-
Field Summary
Fields inherited from class org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
batchLevel, byteCount, digest, errorCode, flags2, headerStart, length, mid, path, pid, SMB_COM_CHECK_DIRECTORY, SMB_COM_CLOSE, SMB_COM_CREATE_DIRECTORY, SMB_COM_DELETE, SMB_COM_DELETE_DIRECTORY, SMB_COM_ECHO, SMB_COM_FIND_CLOSE2, SMB_COM_LOCKING_ANDX, SMB_COM_LOGOFF_ANDX, SMB_COM_MOVE, SMB_COM_NEGOTIATE, SMB_COM_NT_CANCEL, SMB_COM_NT_CREATE_ANDX, SMB_COM_NT_TRANSACT, SMB_COM_NT_TRANSACT_SECONDARY, SMB_COM_OPEN_ANDX, SMB_COM_QUERY_INFORMATION, SMB_COM_READ_ANDX, SMB_COM_RENAME, SMB_COM_SEEK, SMB_COM_SESSION_SETUP_ANDX, SMB_COM_SET_INFORMATION, SMB_COM_TRANSACTION, SMB_COM_TRANSACTION_SECONDARY, SMB_COM_TRANSACTION2, SMB_COM_TREE_CONNECT_ANDX, SMB_COM_TREE_DISCONNECT, SMB_COM_WRITE, SMB_COM_WRITE_ANDX, tid, uid, wordCount -
Constructor Summary
ConstructorsConstructorDescriptionSmbComTreeConnectAndXResponse(Configuration config, ServerMessageBlock andx) Constructs a tree connect AndX response. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the native file system type of the connected share.final StringReturns the service type of the connected share (e.g., A: for disk, LPT1: for printer, IPC for named pipe).final booleanIndicates whether the connected share is part of a Distributed File System (DFS) namespace.final booleanIndicates whether the share supports search operations with search bits.booleanIndicates whether the tree connection has been successfully established and has a valid tree ID.protected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the data bytes portion of the SMB message from the wire format.protected intreadParameterWordsWireFormat(byte[] buffer, int bufferIndex) Reads the parameter words portion of the SMB message from the wire format.toString()protected intwriteBytesWireFormat(byte[] dst, int dstIndex) Writes the data bytes portion of the SMB message to the wire format.protected intwriteParameterWordsWireFormat(byte[] dst, int dstIndex) Writes the parameter words portion of the SMB message to the wire format.Methods inherited from class org.codelibs.jcifs.smb.internal.smb1.AndXServerMessageBlock
decode, encode, getAndx, getBatchLimit, getNext, getNextResponse, readAndXWireFormat, writeAndXWireFormatMethods inherited from class org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
addFlags2, allowChain, clearReceived, createCancel, equals, error, exception, getByteCount, getCommand, getConfig, getCreditCost, getDigest, getDomain, getErrorCode, getException, getExpiration, getFlags, getFlags2, getFullUNCPath, getGrantedCredits, getLength, getMid, getOverrideTimeout, getPath, getPid, getRawPayload, getResponse, getServer, getSignSeq, getTid, getUid, hashCode, ignoreDisconnect, isAsync, isCancel, isError, isExtendedSecurity, isForceUnicode, isReceived, isResolveInDfs, isResponse, isResponseAsync, isRetainPayload, isUseUnicode, isVerifyFailed, prepare, readHeaderWireFormat, readString, readString, readString, readStringLength, received, remFlags2, reset, retainPayload, setCommand, setDigest, setErrorCode, setExpiration, setExtendedSecurity, setFlags, setFlags2, setFullUNCPath, setMid, setOverrideTimeout, setPath, setPid, setRawPayload, setRequestCredits, setResolveInDfs, setResponse, setSessionId, setSignSeq, setTid, setUid, setUseUnicode, size, split, stringWireLength, verifySignature, writeHeaderWireFormat, writeString, writeStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codelibs.jcifs.smb.internal.CommonServerMessageBlock
decode, encode, getCommand, getDigest, getMid, getResponse, reset, setCommand, setDigest, setExtendedSecurity, setMid, setResponse, setSessionId, setUidMethods inherited from interface org.codelibs.jcifs.smb.internal.CommonServerMessageBlockResponse
getNextResponse, isAsync, prepareMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayloadMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Response
clearReceived, error, exception, getErrorCode, getException, getExpiration, getGrantedCredits, getMid, isError, isReceived, isVerifyFailed, received, reset, setExpiration, setMid, verifySignatureMethods inherited from interface org.codelibs.jcifs.smb.internal.TreeConnectResponse
getTid
-
Constructor Details
-
SmbComTreeConnectAndXResponse
Constructs a tree connect AndX response.- Parameters:
config- the configuration to useandx- the next command in the AndX chain, or null
-
-
Method Details
-
getService
Description copied from interface:TreeConnectResponseReturns the service type of the connected share (e.g., A: for disk, LPT1: for printer, IPC for named pipe).- Specified by:
getServicein interfaceTreeConnectResponse- Returns:
- the service
-
getNativeFileSystem
Returns the native file system type of the connected share.- Returns:
- the nativeFileSystem
-
isSupportSearchBits
public final boolean isSupportSearchBits()Indicates whether the share supports search operations with search bits.- Returns:
- the supportSearchBits
-
isValidTid
public boolean isValidTid()Indicates whether the tree connection has been successfully established and has a valid tree ID.- Specified by:
isValidTidin interfaceTreeConnectResponse- Returns:
- whether the tree id is a valid one
- See Also:
-
writeParameterWordsWireFormat
protected int writeParameterWordsWireFormat(byte[] dst, int dstIndex) Description copied from class:ServerMessageBlockWrites the parameter words portion of the SMB message to the wire format.- Specified by:
writeParameterWordsWireFormatin classServerMessageBlock- Parameters:
dst- the destination bufferdstIndex- the starting offset in the buffer- Returns:
- the number of bytes written
-
writeBytesWireFormat
protected int writeBytesWireFormat(byte[] dst, int dstIndex) Description copied from class:ServerMessageBlockWrites the data bytes portion of the SMB message to the wire format.- Specified by:
writeBytesWireFormatin classServerMessageBlock- Parameters:
dst- the destination bufferdstIndex- the starting offset in the buffer- Returns:
- the number of bytes written
-
readParameterWordsWireFormat
protected int readParameterWordsWireFormat(byte[] buffer, int bufferIndex) Description copied from class:ServerMessageBlockReads the parameter words portion of the SMB message from the wire format.- Specified by:
readParameterWordsWireFormatin classServerMessageBlock- Parameters:
buffer- the buffer containing the message databufferIndex- the starting offset in the buffer- Returns:
- the number of bytes read
-
readBytesWireFormat
protected int readBytesWireFormat(byte[] buffer, int bufferIndex) Description copied from class:ServerMessageBlockReads the data bytes portion of the SMB message from the wire format.- Specified by:
readBytesWireFormatin classServerMessageBlock- Parameters:
buffer- the buffer containing the message databufferIndex- the starting offset in the buffer- Returns:
- the number of bytes read
-
toString
- Overrides:
toStringin classAndXServerMessageBlock
-