#ifndef _NTIOAPI_H
// Win32 FILE_REMOTE_PROTOCOL_INFO
typedef struct _FILE_REMOTE_PROTOCOL_INFORMATION
{
// Structure Version
USHORT StructureVersion; // 1 for Win7, 2 for Win8 SMB3, 3 for Blue SMB3, 4 for RS5
USHORT StructureSize; // sizeof(FILE_REMOTE_PROTOCOL_INFORMATION)
ULONG Protocol; // Protocol (WNNC_NET_*) defined in winnetwk.h or ntifs.h.
// Protocol Version & Type
USHORT ProtocolMajorVersion;
USHORT ProtocolMinorVersion;
USHORT ProtocolRevision;
USHORT Reserved;
// Protocol-Generic Information
ULONG Flags;
struct
{
ULONG Reserved[8];
} GenericReserved;
// Protocol specific information
union
{
struct
{
struct
{
ULONG Capabilities;
} Server;
struct
{
ULONG Capabilities;
ULONG ShareFlags; // previoulsly CachingFlags before 21H1
UCHAR ShareType; // RS5
UCHAR Reserved0[3];
ULONG Reserved1;
} Share;
} Smb2;
ULONG Reserved[16];
} ProtocolSpecific;
} FILE_REMOTE_PROTOCOL_INFORMATION, *PFILE_REMOTE_PROTOCOL_INFORMATION;
View code on GitHub// ntifs.h
typedef struct _FILE_REMOTE_PROTOCOL_INFORMATION {
USHORT StructureVersion;
USHORT StructureSize;
ULONG Protocol;
USHORT ProtocolMajorVersion;
USHORT ProtocolMinorVersion;
USHORT ProtocolRevision;
USHORT Reserved;
ULONG Flags;
struct {
ULONG Reserved[8];
} GenericReserved;
struct {
ULONG Reserved[16];
} ProtocolSpecificReserved;
union {
struct {
struct {
ULONG Capabilities;
} Server;
struct {
ULONG Capabilities;
ULONG ShareFlags;
ULONG CachingFlags;
UCHAR ShareType;
UCHAR Reserved0[3];
ULONG Reserved1;
} Share;
} Smb2;
ULONG Reserved[16];
} ProtocolSpecific;
} FILE_REMOTE_PROTOCOL_INFORMATION, *PFILE_REMOTE_PROTOCOL_INFORMATION;
View the official Windows Driver Kit DDI referenceThis structure is documented in Windows Driver Kit.
The FILE_REMOTE_PROTOCOL_INFORMATION structure contains file remote protocol information. This structure is returned from FltQueryInformationFile when FileRemoteProtocolInformation is passed in as the FileInformationClass parameter.
StructureVersionVersion of this structure. Set this member as follows.
| Value | Meaning |
|---|---|
| 1 | Communication is between computers running Windows 7 |
| 2 | Communication is between computers running Windows 8 |
| 3 | Communication is between computers running Windows 8.1 |
| 4 | Communication is between computers running Windows 10 or later |
StructureSizeSize of this structure, in bytes. This member should be set to sizeof(FILE_REMOTE_PROTOCOL_INFORMATION).
ProtocolOne of the WNNC_NET_*XXX* remote protocol network types defined in ntifs.h.
ProtocolMajorVersionMajor number of the remote protocol.
ProtocolMinorVersionMinor number of the remote protocol.
ProtocolRevisionRevision of the remote protocol.
ReservedShould be set to zero. Do not use this member.
FlagsRemote protocol information. This member can be set to zero or more of the following flags.
| Value | Meaning |
|---|---|
| REMOTE_PROTOCOL_FLAG_LOOPBACK | The remote protocol is using a loopback |
| REMOTE_PROTOCOL_FLAG_OFFLINE | The remote protocol is using an offline cache |
| REMOTE_PROTOCOL_INFO_FLAG_PERSISTENT_HANDLE | The remote protocol is using a persistent handle. This flag is supported only if StructureVersion is 2 or higher. |
| REMOTE_PROTOCOL_INFO_FLAG_PRIVACY | The remote protocol is using privacy. This flag is supported only if StructureVersion is 2 or higher. |
| REMOTE_PROTOCOL_INFO_FLAG_INTEGRITY | The remote protocol is using integrity so the data is signed. This flag is supported only if StructureVersion is 2 or higher. |
| REMOTE_PROTOCOL_INFO_FLAG_MUTUAL_AUTH | The remote protocol is using mutual authentication using Kerberos. This flag is supported only if StructureVersion is 2 or higher. |
GenericReservedProtocol-generic information structure.
GenericReserved.ReservedShould be set to zero. Do not use this member.
ProtocolSpecificReservedProtocolSpecificReserved.ReservedProtocolSpecificProtocolSpecific.Smb2ProtocolSpecific.Smb2.ServerProtocolSpecific.Smb2.Server.CapabilitiesProtocolSpecific.Smb2.ShareProtocolSpecific.Smb2.Share.CapabilitiesProtocolSpecific.Smb2.Share.ShareFlagsProtocolSpecific.Smb2.Share.CachingFlagsProtocolSpecific.Smb2.Share.ShareTypeProtocolSpecific.Smb2.Share.Reserved0ProtocolSpecific.Smb2.Share.Reserved1ProtocolSpecific.Reserved