java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Request<Smb2IoctlResponse>
org.codelibs.jcifs.smb.internal.smb2.ioctl.Smb2IoctlRequest
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockRequest,Request<Smb2IoctlResponse>,RequestWithFileId,Message,Request
public class Smb2IoctlRequest
extends ServerMessageBlock2Request<Smb2IoctlResponse>
implements RequestWithFileId
SMB2 IOCTL request message. This command is used to perform device control operations
on files, pipes, or the server itself.
- Author:
- mbechler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFunction code to retrieve DFS referralsstatic final intFunction code to retrieve extended DFS referralsstatic final intFunction code to trim file level storagestatic final intFunction code to request resilient handle for network failuresstatic final intFunction code to peek at named pipe data without removing itstatic final intFunction code to transceive data on a named pipestatic final intFunction code to wait for a named pipe to become availablestatic final intFunction code to query network interface informationstatic final intFunction code to set a reparse point on a filestatic final intFunction code for server-side copy chunk operationstatic final intFunction code for server-side copy chunk write operationstatic final intFunction code to enumerate volume shadow copy snapshotsstatic final intFunction code to read hash data from serverstatic final intFunction code to request a resume key for server-side copystatic final intFunction code to validate SMB2 negotiate informationstatic final intFlag indicating this IOCTL is a file system control operationFields inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
SMB2_CANCEL, SMB2_CHANGE_NOTIFY, SMB2_CLOSE, SMB2_CREATE, SMB2_ECHO, SMB2_FLAGS_ASYNC_COMMAND, SMB2_FLAGS_DFS_OPERATIONS, SMB2_FLAGS_PRIORITY_MASK, SMB2_FLAGS_RELATED_OPERATIONS, SMB2_FLAGS_REPLAY_OPERATION, SMB2_FLAGS_SERVER_TO_REDIR, SMB2_FLAGS_SIGNED, SMB2_FLUSH, SMB2_IOCTL, SMB2_LOCK, SMB2_LOGOFF, SMB2_NEGOTIATE, SMB2_OPLOCK_BREAK, SMB2_QUERY_DIRECTORY, SMB2_QUERY_INFO, SMB2_READ, SMB2_SESSION_SETUP, SMB2_SET_INFO, SMB2_TREE_CONNECT, SMB2_TREE_DISCONNECT, SMB2_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionSmb2IoctlRequest(Configuration config, int controlCode) Constructs an SMB2 IOCTL request with an unspecified file IDSmb2IoctlRequest(Configuration config, int controlCode, byte[] fileId) Constructs an SMB2 IOCTL request with a specified file IDSmb2IoctlRequest(Configuration config, int controlCode, byte[] fileId, byte[] outputBuffer) Constructs an SMB2 IOCTL request with output buffer -
Method Summary
Modifier and TypeMethodDescriptionprotected Smb2IoctlResponseCreate the response object for this requestprotected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.voidsetFileId(byte[] fileId) Sets the file ID for this request.voidsetFlags(int flags) Set the IOCTL flagsvoidsetInputData(Encodable inputData) Set the input data for the IOCTL requestvoidsetMaxInputResponse(int maxInputResponse) Set the maximum input response sizevoidsetMaxOutputResponse(int maxOutputResponse) Set the maximum output response sizevoidsetOutputData(Encodable outputData) Set the output data for the IOCTL requestintsize()Gets the size of this message.protected intwriteBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.Methods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Request
allowChain, createCancel, encode, getCreditCost, getNext, getOverrideTimeout, getResponse, ignoreDisconnect, initResponse, isCancel, isResponseAsync, setNext, setOverrideTimeout, setRequestCredits, setResponse, setTid, splitMethods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
addFlags, chain, clearFlags, decode, decode, equals, getAsyncId, getCommand, getConfig, getCredit, getCreditCharge, getDigest, getErrorContextCount, getErrorData, getFlags, getHeaderStart, getLength, getMid, getNextCommandOffset, getRawPayload, getSessionId, getStatus, getTreeId, hashCode, haveResponse, isAsync, isErrorResponseStatus, isRetainPayload, pad8, readErrorResponse, readHeaderWireFormat, reset, retainPayload, setAsyncId, setCommand, setCredit, setDigest, setExtendedSecurity, setMid, setNext, setRawPayload, setReadSize, setSessionId, setTreeId, setUid, size8, size8, toString, writeHeaderWireFormatMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codelibs.jcifs.smb.internal.CommonServerMessageBlock
decode, getCommand, getDigest, getMid, reset, setCommand, setDigest, setExtendedSecurity, setMid, setSessionId, setUidMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayload
-
Field Details
-
FSCTL_DFS_GET_REFERRALS
public static final int FSCTL_DFS_GET_REFERRALSFunction code to retrieve DFS referrals- See Also:
-
FSCTL_PIPE_PEEK
public static final int FSCTL_PIPE_PEEKFunction code to peek at named pipe data without removing it- See Also:
-
FSCTL_PIPE_WAIT
public static final int FSCTL_PIPE_WAITFunction code to wait for a named pipe to become available- See Also:
-
FSCTL_PIPE_TRANSCEIVE
public static final int FSCTL_PIPE_TRANSCEIVEFunction code to transceive data on a named pipe- See Also:
-
FSCTL_SRV_COPYCHUNK
public static final int FSCTL_SRV_COPYCHUNKFunction code for server-side copy chunk operation- See Also:
-
FSCTL_SRV_ENUMERATE_SNAPSHOTS
public static final int FSCTL_SRV_ENUMERATE_SNAPSHOTSFunction code to enumerate volume shadow copy snapshots- See Also:
-
FSCTL_SRV_REQUEST_RESUME_KEY
public static final int FSCTL_SRV_REQUEST_RESUME_KEYFunction code to request a resume key for server-side copy- See Also:
-
FSCTL_SRV_READ_HASH
public static final int FSCTL_SRV_READ_HASHFunction code to read hash data from server- See Also:
-
FSCTL_SRV_COPYCHUNK_WRITE
public static final int FSCTL_SRV_COPYCHUNK_WRITEFunction code for server-side copy chunk write operation- See Also:
-
FSCTL_LRM_REQUEST_RESILENCY
public static final int FSCTL_LRM_REQUEST_RESILENCYFunction code to request resilient handle for network failures- See Also:
-
FSCTL_QUERY_NETWORK_INTERFACE_INFO
public static final int FSCTL_QUERY_NETWORK_INTERFACE_INFOFunction code to query network interface information- See Also:
-
FSCTL_SET_REPARSE_POINT
public static final int FSCTL_SET_REPARSE_POINTFunction code to set a reparse point on a file- See Also:
-
FSCTL_DFS_GET_REFERRALS_EX
public static final int FSCTL_DFS_GET_REFERRALS_EXFunction code to retrieve extended DFS referrals- See Also:
-
FSCTL_FILE_LEVEL_TRIM
public static final int FSCTL_FILE_LEVEL_TRIMFunction code to trim file level storage- See Also:
-
FSCTL_VALIDATE_NEGOTIATE_INFO
public static final int FSCTL_VALIDATE_NEGOTIATE_INFOFunction code to validate SMB2 negotiate information- See Also:
-
SMB2_O_IOCTL_IS_FSCTL
public static final int SMB2_O_IOCTL_IS_FSCTLFlag indicating this IOCTL is a file system control operation- See Also:
-
-
Constructor Details
-
Smb2IoctlRequest
Constructs an SMB2 IOCTL request with an unspecified file ID- Parameters:
config- the client configurationcontrolCode- the IOCTL control code
-
Smb2IoctlRequest
Constructs an SMB2 IOCTL request with a specified file ID- Parameters:
config- the client configurationcontrolCode- the IOCTL control codefileId- the file identifier
-
Smb2IoctlRequest
Constructs an SMB2 IOCTL request with output buffer- Parameters:
config- the client configurationcontrolCode- the IOCTL control codefileId- the file identifieroutputBuffer- the output buffer for the IOCTL operation
-
-
Method Details
-
setFileId
public void setFileId(byte[] fileId) Sets the file ID for this request.- Specified by:
setFileIdin interfaceRequestWithFileId- Parameters:
fileId- the file ID to set- See Also:
-
createResponse
protected Smb2IoctlResponse createResponse(CIFSContext tc, ServerMessageBlock2Request<Smb2IoctlResponse> req) Description copied from class:ServerMessageBlock2RequestCreate the response object for this request- Specified by:
createResponsein classServerMessageBlock2Request<Smb2IoctlResponse>- Parameters:
tc- the CIFS contextreq- the request object- Returns:
- the response object
-
setFlags
public void setFlags(int flags) Set the IOCTL flags- Parameters:
flags- the flags to set
-
setMaxInputResponse
public void setMaxInputResponse(int maxInputResponse) Set the maximum input response size- Parameters:
maxInputResponse- the maxInputResponse to set
-
setMaxOutputResponse
public void setMaxOutputResponse(int maxOutputResponse) Set the maximum output response size- Parameters:
maxOutputResponse- the maxOutputResponse to set
-
setInputData
Set the input data for the IOCTL request- Parameters:
inputData- the inputData to set
-
setOutputData
Set the output data for the IOCTL request- Parameters:
outputData- the outputData to set
-
size
public int size()Gets the size of this message.- Specified by:
sizein interfaceCommonServerMessageBlockRequest- Returns:
- the size of this message
- See Also:
-
writeBytesWireFormat
protected int writeBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.- Specified by:
writeBytesWireFormatin classServerMessageBlock2- Parameters:
dst- the destination bufferdstIndex- the starting position in the buffer- Returns:
- number of bytes written
- See Also:
-
readBytesWireFormat
protected int readBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.- Specified by:
readBytesWireFormatin classServerMessageBlock2- Parameters:
buffer- the buffer to read frombufferIndex- the starting position in the buffer- Returns:
- number of bytes read
- See Also:
-