- All Superinterfaces:
CommonServerMessageBlock,Message,Response
- All Known Implementing Classes:
Smb2NegotiateResponse,SmbComNegotiateResponse
Interface for SMB protocol negotiation response handling.
Represents the server's response to a protocol negotiation request, containing negotiated
dialect version, security settings, capabilities, and buffer sizes for the SMB connection.
- Author:
- mbechler
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanReuse(CIFSContext tc, boolean forceSigning) Checks whether a connection can be reused for the given configuration.intGets the number of initial credits granted by the server for SMB2.intGets the negotiated receive buffer size.Gets the SMB dialect version selected by the server.intGets the negotiated send buffer size.intGets the negotiated maximum transaction buffer size.booleanhaveCapabilitiy(int cap) Checks whether a specific capability has been negotiated.booleanChecks whether the server supports Distributed File System (DFS).booleanChecks whether the server has SMB message signing enabled.booleanChecks whether SMB message signing has been successfully negotiated.booleanChecks whether the server requires SMB message signing.booleanisValid(CIFSContext cifsContext, SmbNegotiationRequest request) Check if the negotiation response is validvoidsetupRequest(CommonServerMessageBlock request) Sets up the given request with negotiated parameters.voidsetupResponse(Response resp) Sets up the given response with negotiated parameters.Methods 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.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, getNextResponse, isError, isReceived, isVerifyFailed, received, reset, setExpiration, setMid, verifySignature
-
Method Details
-
isValid
Check if the negotiation response is valid- Parameters:
cifsContext- the CIFS contextrequest- the negotiation request- Returns:
- whether the protocol negotiation was successful
-
getSelectedDialect
DialectVersion getSelectedDialect()Gets the SMB dialect version selected by the server.- Returns:
- selected dialect
-
isSigningEnabled
boolean isSigningEnabled()Checks whether the server has SMB message signing enabled.- Returns:
- whether the server has signing enabled
-
isSigningRequired
boolean isSigningRequired()Checks whether the server requires SMB message signing.- Returns:
- whether the server requires signing
-
isDFSSupported
boolean isDFSSupported()Checks whether the server supports Distributed File System (DFS).- Returns:
- whether the server supports DFS
-
setupRequest
Sets up the given request with negotiated parameters.- Parameters:
request- the request to configure
-
setupResponse
Sets up the given response with negotiated parameters.- Parameters:
resp- the response to configure
-
isSigningNegotiated
boolean isSigningNegotiated()Checks whether SMB message signing has been successfully negotiated.- Returns:
- whether signing has been negotiated
-
haveCapabilitiy
boolean haveCapabilitiy(int cap) Checks whether a specific capability has been negotiated.- Parameters:
cap- the capability flag to check- Returns:
- whether capability is negotiated
-
getSendBufferSize
int getSendBufferSize()Gets the negotiated send buffer size.- Returns:
- the send buffer size
-
getReceiveBufferSize
int getReceiveBufferSize()Gets the negotiated receive buffer size.- Returns:
- the receive buffer size
-
getTransactionBufferSize
int getTransactionBufferSize()Gets the negotiated maximum transaction buffer size.- Returns:
- the transaction buffer size
-
getInitialCredits
int getInitialCredits()Gets the number of initial credits granted by the server for SMB2.- Returns:
- number of initial credits the server grants
-
canReuse
Checks whether a connection can be reused for the given configuration.- Parameters:
tc- the CIFS context to check compatibility withforceSigning- whether signing is being forced- Returns:
- whether a connection can be reused for this config
-