Network Drive Protocol Definition

Is there a way to determine the protocol name (SMB / CIFS, NFS) and the version that is used for the mapped network drive in Windows? (in c #)

EDIT

Using the information from Rusted answer, I received the following information from a Windows 7 computer on the network.

NETRESOURCE res = WinApiWNETwrapper.GetResourceInfo("\\Test-PC");

res.dwDisplayType = SERVER
res.dwScope       = 0
res.dwType        = ANY
res.dwUsage       = CONTAINER
res.lpComment     = ""
res.lpLocalName   = null
res.lpProvider    = "Microsoft Windows Network"
res.lpLocalName   = "\\Test-PC"

NETINFOSTRUCT netinfo = WinApiWNETwrapper.GetNetworkInfo("\\Test-PC");

netinfo.cbStructureSize   = 32
netinfo.dwCharacteristics = 0
netinfo.dwDrives          = -1
netinfo.dwHandle          = 1880621056
netinfo.dwPrinters        = -1
netinfo.dwProviderVersion = 1024
netinfo.dwStatus          = Running
netinfo.wNetType          = LANMAN

SERVER_TRANSPORT_INFO_1[] transports = WinApiNETwrapper.ServerTransportEnum_1("\\Test-PC");

transports[0].svti1_domain                 = "WORKGROUP"
transports[0].svti1_networkaddress         = "TEST-PC"
transports[0].svti1_numberofvcs            = 0
transports[0].svti1_transportaddress       = 73107336
transports[0].svti1_transportaddresslength = ...
transports[0].TransportAddress             = "TEST-PC"

transports[0].svti1_transportname          = "\\Device\\NetbiosSmb"
transports[1].svti1_transportname          = "\\Device\\NetBT_Tcpip_{F4C75115-...}"
transports[2].svti1_transportname          = "\\Device\\NetBT_Tcpip_{70BD9048-...}"

The important part seems to be:

transports[0].svti1_transportname          = "\\Device\\NetbiosSmb"

But I can not find the version number of the SMB protocol anywhere. Any ideas?

+2
source share
1 answer

I suppose you need the Windows Networking (WNet) API , the value from the NetType field in NETINFOSTRUCT returned by the WNetGetNetworkInformation function .

- #, WnetApi .NET Wnet API.

UNC , PathToUNC .

+2

All Articles