java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Request<Smb2SessionSetupResponse>
org.codelibs.jcifs.smb.internal.smb2.session.Smb2SessionSetupRequest
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockRequest,Request<Smb2SessionSetupResponse>,Message,Request
SMB2 Session Setup request message. This command is used to establish a security session
and authenticate a user to the server.
- Author:
- mbechler
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionSmb2SessionSetupRequest(CIFSContext context, int securityMode, int capabilities, long previousSessionid, byte[] token) Constructs a SMB2 session setup request with the specified parameters -
Method Summary
Modifier and TypeMethodDescriptionbooleanChains another message to this message for compound operations.protected Smb2SessionSetupResponseCreate the response object for this requestprotected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.voidsetSessionBinding(boolean sessionBinding) Sets whether this request is for session bindingintsize()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, 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
-
Constructor Details
-
Smb2SessionSetupRequest
public Smb2SessionSetupRequest(CIFSContext context, int securityMode, int capabilities, long previousSessionid, byte[] token) Constructs a SMB2 session setup request with the specified parameters- Parameters:
context- the CIFS context for this requestsecurityMode- the security mode flags for the sessioncapabilities- the client capabilitiespreviousSessionid- the previous session ID for reconnection (or 0 for new session)token- the security token for authentication
-
-
Method Details
-
createResponse
protected Smb2SessionSetupResponse createResponse(CIFSContext tc, ServerMessageBlock2Request<Smb2SessionSetupResponse> req) Description copied from class:ServerMessageBlock2RequestCreate the response object for this request- Specified by:
createResponsein classServerMessageBlock2Request<Smb2SessionSetupResponse>- Parameters:
tc- the CIFS contextreq- the request object- Returns:
- the response object
-
setSessionBinding
public void setSessionBinding(boolean sessionBinding) Sets whether this request is for session binding- Parameters:
sessionBinding- the sessionBinding to set
-
chain
Chains another message to this message for compound operations.- Overrides:
chainin classServerMessageBlock2- Parameters:
n- the message to chain- Returns:
- whether chaining was successful
- See Also:
-
size
public int size()Gets the size of this message.- 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:
-