Package com.hierynomus.smbj.connection
Class ConnectionContext
java.lang.Object
com.hierynomus.smbj.connection.ConnectionContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SMB3EncryptionCipher
private EnumSet
<SMB2GlobalCapability> private final UUID
private int
private Set
<SMB3CompressionAlgorithm> private byte[]
private NegotiatedProtocol
private String
private SMB3HashAlgorithm
private byte[]
private Server
private static final int
private static final int
private Long
private WindowsVersion
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionContext
(UUID clientGuid, String hostname, int port, SmbConfig config) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates that the client prefers encryption on this connection.byte[]
byte[]
(package private) Set
<SMB2GlobalCapability> (package private) int
boolean
boolean
(package private) void
negotiated
(SMBProtocolNegotiator.NegotiationContext negotiationContext) void
setNetBiosName
(String netBiosName) void
void
setWindowsVersion
(WindowsVersion windowsVersion) private boolean
supports
(SMB2GlobalCapability capability) boolean
boolean
If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_DIRECTORY_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsDirectoryLeasing to TRUE.boolean
boolean
If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsFileLeasing to TRUE.boolean
If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_MULTI_CHANNEL is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiChannel to TRUE.boolean
If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LARGE_MTU is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiCredit to TRUE.toString()
-
Field Details
-
SIGNING_ENABLED
private static final int SIGNING_ENABLED- See Also:
-
SIGNING_REQUIRED
private static final int SIGNING_REQUIRED- See Also:
-
windowsVersion
-
netBiosName
-
gssNegotiateToken
private byte[] gssNegotiateToken -
negotiatedProtocol
-
server
-
clientGuid
-
clientCapabilities
-
clientSecurityMode
private int clientSecurityMode -
preauthIntegrityHashId
-
preauthIntegrityHashValue
private byte[] preauthIntegrityHashValue -
cipherId
-
compressionIds
-
timeOffsetMillis
-
-
Constructor Details
-
ConnectionContext
-
-
Method Details
-
negotiated
-
getClientGuid
-
isServerRequiresSigning
public boolean isServerRequiresSigning() -
isServerSigningEnabled
public boolean isServerSigningEnabled() -
getServerSecurityMode
int getServerSecurityMode() -
getServerCapabilities
Set<SMB2GlobalCapability> getServerCapabilities() -
getNegotiatedProtocol
-
getGssNegotiateToken
public byte[] getGssNegotiateToken() -
getServerGuid
-
getServerName
-
supports
-
getClientCapabilities
-
getWindowsVersion
-
setWindowsVersion
-
getNetBiosName
-
setNetBiosName
-
getCipherId
-
supportsEncryption
public boolean supportsEncryption() -
clientPrefersEncryption
public boolean clientPrefersEncryption()Indicates that the client prefers encryption on this connection. This will only be enabled if the established Session has an encryptionkey set.- Returns:
true
iff the negotiated protocol is at least SMB3 and both client and server have indicated they support encryption
-
supportsDFS
public boolean supportsDFS() -
supportsFileLeasing
public boolean supportsFileLeasing()If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsFileLeasing to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
supportsMultiCredit
public boolean supportsMultiCredit()If the client implements SMB 2.1 or SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_LARGE_MTU is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiCredit to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
supportsDirectoryLeasing
public boolean supportsDirectoryLeasing()If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_DIRECTORY_LEASING is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsDirectoryLeasing to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
supportsMultiChannel
public boolean supportsMultiChannel()If Connection.Dialect belongs to the SMB 3.x dialect family, the client MUST perform the following: If SMB2_GLOBAL_CAP_MULTI_CHANNEL is set in the Capabilities field of the SMB2 NEGOTIATE Response, the client MUST set Connection.SupportsMultiChannel to TRUE. Otherwise, it MUST be set to FALSE.- Returns:
-
getTimeOffsetMillis
-
toString
-
getServer
-
setServer
-
getPreauthIntegrityHashId
-
getPreauthIntegrityHashValue
public byte[] getPreauthIntegrityHashValue() -
getCompressionIds
-