Domanda

Given a UNC path like \\server\share, is there any way to determine, using the Win32 API, whether the local and remote computers are connecting using SMB or SMB2?

È stato utile?

Soluzione

After burning a paid support incident, the official answer from Microsoft is that this information isn't exposed by the driver in Windows 7. On Windows 8 it's available using WMI and the MSFT_SmbConnection class, or PowerShell's Get-SmbConnection cmdlet.

Altri suggerimenti

Maybe you can find the answer in the SMB2 specification.

Server Message Block (SMB) Protocol Versions 2 and 3 specification

There should be a way to detect the version... Maybe you can try to implement a minimal part of the SMB protocol just to ask the server the protocol version?

one of the easyest way to find is by taking a network trace using the wireshark (on windows) or tcptrace/tcpdump on the unix (where SMB is running). The trace output should give you the version

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top