//***************************************************************************
//
// 
//  Module: iScsi Discovery api
//
//  Purpose: 
//
//  Copyright (c) 2001 Microsoft Corporation
//
//***************************************************************************

#pragma autorecover
#pragma namespace("\\\\.\\Root\\WMI")
instance of __namespace{ name="ms_804";};
#pragma namespace("\\\\.\\Root\\WMI\\ms_804")

[Description("Microsoft iSCSI 发起程序: 门户") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_Portal
{
  [key,Description("此门户的索引号") : Amended] uint32 Index;
  [Description("门户符号名称") : Amended] string SymbolicName;
  [Description("门户地址") : Amended] string Address;
  [Description("门户端口") : Amended] uint16 Port;
};

[Description("Microsoft iSCSI 发起程序: 门户组") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_PortalGroup
{
  [key,Description("此门户组的索引号") : Amended] uint32 Index;
  [Description("此门户组中的门户列表") : Amended] MSiSCSIInitiator_Portal Portals[];
};

[Description("Microsoft iSCSI 发起程序: 目标地址") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_TargetAddress
{
  [Description("操作系统设备名") : Amended] string OSDeviceName;
  [Description("目标映射到的操作系统 SCSI 总线编号") : Amended] uint32 OSBusNumber;
  [Description("目标映射到的操作系统 SCSI 目标编号") : Amended] uint32 OSTargetNumber;
  [Description("目标 LUN 映射到的操作系统 SCSI LUN 编号") : Amended] uint32 OSLunNumber;
};

[Description("Microsoft iSCSI 发起程序: LUN 列表") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_LUNList
{
  [Description("目标 LUN 映射到的操作系统 SCSI LUN 编号") : Amended] uint32 OSLunNumber;
  [Description("目标 LUN") : Amended] uint64 TargetLun;
};

[Description("Microsoft iSCSI 发起程序: 目标映射") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_TargetMappings
{
  [Description("发起程序名称") : Amended] string InitiatorName;
  [Description("目标名称") : Amended] string TargetName;
  [Description("操作系统设备名") : Amended] string OSDeviceName;
  [Description("目标映射到的操作系统 SCSI 总线编号") : Amended] uint32 OSBusNumber;
  [Description("目标映射到的操作系统 SCSI 目标编号") : Amended] uint32 OSTargetNumber;
  [Description("LUN 列表") : Amended] MSiSCSIInitiator_LUNList LUNList[];
};

[Description("Microsoft iSCSI 发起程序: 目标登录选项") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_TargetLoginOptions
{
  [Description("ISCSI 登录选项版本") : Amended] uint32 Version;
  [Description("用于指示指定了哪些信息的位域") : Amended] uint32 InformationSpecified;
  [Description("影响登录方式的标志") : Amended] uint32 LoginFlags;
  [Description("指示登录身份验证类型的标志") : Amended,Values{"无身份验证", "CHAP", "相互 CHAP"} : Amended] uint32 AuthType;
  [Description("可以针对标头摘要协商的循环完整性校验和") : Amended] uint32 HeaderDigest;
  [Description("可以针对数据摘要协商的循环完整性校验和") : Amended] uint32 DataDigest;
  [Description("最大连接数，0 表示无限制") : Amended] uint32 MaximumConnections;
  [Description("发起程序和目标协商在意外连接终止或连接重置之后，尝试显式/隐式注销或活动任务重新分配之前，要等待的最短时间(以秒为单位)。") : Amended] uint32 DefaultTime2Wait;
  [Description(" 发起程序和目标协商在意外连接终止或连接重置之后的初始等待(Time2Wait)后，仍有可能进行显式/隐式连接注销或活动任务重新分配的最长时间(以秒为单位)。") : Amended] uint32 DefaultTime2Retain;
  [Description("iSCSI 身份验证的用户名") : Amended] uint8 Username[];
  [Description("iSCSI 身份验证的密码") : Amended] uint8 Password[];
};

[Description("Microsoft iSCSI 发起程序: 连接信息") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_ConnectionInformation
{
  [Description("连接 ID 字符串") : Amended] string ConnectionID;
  [Description("发起程序地址") : Amended] string InitiatorAddress;
  [Description("目标地址") : Amended] string TargetAddress;
  [Description("发起程序端口") : Amended] uint16 InitiatorPort;
  [Description("目标端口") : Amended] uint16 TargetPort;
  [Description("连接 ID 标记") : Amended] uint8 CID[];
};

[Description("Microsoft iSCSI 发起程序: IKE 预共享密钥身份验证信息") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_IKEPresharedKeyAuthenticationInfo
{
  [Description("身份验证方法: 预共享密钥") : Amended] uint32 AuthMethod;
  [Description("安全标志") : Amended] uint64 SecurityFlags;
  [Description("IKE 标识负载类型") : Amended] uint32 IdType;
  [Description("ID") : Amended] uint8 Id[];
  [Description("密钥") : Amended] uint8 Key[];
};

[Description("Microsoft iSCSI 发起程序: 目标类") : Amended ToSubclass,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_TargetClass
{
  [key : ToSubclass,Description("目标名称") : Amended ToSubclass] string TargetName;
  [key : ToSubclass,Description("发现机制") : Amended ToSubclass] string DiscoveryMechanism;
  [Description("发起程序名称") : Amended ToSubclass] string InitiatorName;
  [Description("协议类型") : Amended ToSubclass] uint32 ProtocolType;
  [Description("目标别名") : Amended ToSubclass] string TargetAlias;
  [Description("门户组") : Amended ToSubclass] MSiSCSIInitiator_PortalGroup PortalGroups[];
  [Description("映射") : Amended ToSubclass] MSiSCSIInitiator_TargetMappings Mappings;
  [Description("目标标志") : Amended ToSubclass] uint32 TargetFlags;
  [Description("登录选项") : Amended ToSubclass] MSiSCSIInitiator_TargetLoginOptions LoginOptions;
  [Description("登录到此目标") : Amended ToInstance ToSubclass] uint32 Login([in,Description("指示此会话是否为信息性会话") : Amended] boolean IsInformationalSession,[in,Description("发起程序端口号") : Amended] uint32 InitiatorPortNumber,[in,Description("目标门户") : Amended] MSiSCSIInitiator_Portal TargetPortal,[in,Description("安全标志") : Amended] uint64 SecurityFlags,[in,Description("映射") : Amended] MSiSCSIInitiator_TargetMappings Mappings[],[in,Description("登录选项") : Amended] MSiSCSIInitiator_TargetLoginOptions LoginOptions,[in,Description("密钥") : Amended] uint8 Key[],[in,Description("IsPersistent") : Amended] boolean IsPersistent,[out,Description("唯一会话 ID") : Amended] string UniqueSessionId,[out,Description("唯一连接 ID") : Amended] string UniqueConnectionId);
};

[Description("Microsoft iSCSI 发起程序: 永久登录类") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_PersistentLoginClass
{
  [key,Description("目标名称") : Amended] string TargetName;
  [Description("指示此会话是否为信息性会话") : Amended] boolean IsInformationalSession;
  [Description("发起程序实例") : Amended] string InitiatorInstance;
  [Description("发起程序端口号") : Amended] uint32 InitiatorPortNumber;
  [Description("目标门户") : Amended] MSiSCSIInitiator_Portal TargetPortal;
  [Description("安全标志") : Amended] uint64 SecurityFlags;
  [Description("映射") : Amended] MSiSCSIInitiator_TargetMappings Mappings;
  [Description("登录选项") : Amended] MSiSCSIInitiator_TargetLoginOptions LoginOptions;
};

[Description("Microsoft iSCSI 发起程序: iSNS 服务器类") : Amended ToSubclass,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_iSNSServerClass
{
  [key : ToSubclass,Description("iSNS 服务器地址") : Amended ToSubclass] string iSNSServerAddress;
  [Description("刷新从此 iSNS 服务器发现的目标列表") : Amended ToInstance ToSubclass] uint32 Refresh();
};

[Description("Microsoft iSCSI 发起程序: 发送目标门户类") : Amended ToSubclass,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_SendTargetPortalClass
{
  [key : ToSubclass,Description("门户标识符字符串") : Amended ToSubclass] string PortalIdentifierString;
  [Description("发起程序实例或名称") : Amended ToSubclass] string InitiatorName;
  [Description("发起程序端口号") : Amended ToSubclass] uint32 InitiatorPortNumber;
  [Description("门户符号名称") : Amended ToSubclass] string PortalSymbolicName;
  [Description("门户地址") : Amended ToSubclass] string PortalAddress;
  [Description("门户端口") : Amended ToSubclass] uint16 PortalPort;
  [Description("登录选项") : Amended ToSubclass] MSiSCSIInitiator_TargetLoginOptions LoginOptions;
  [Description("安全标志") : Amended ToSubclass] uint64 SecurityFlags;
  [Description("刷新从此发送目标门户发现的目标列表") : Amended ToInstance ToSubclass] uint32 Refresh();
};

[Description("Microsoft iSCSI 发起程序: 发起程序类") : Amended ToSubclass,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_InitiatorClass
{
  [key : ToSubclass,Description("发起程序名称") : Amended ToSubclass] string InitiatorName;
};

[Description("Microsoft iSCSI 发起程序: 附加到会话的设备") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_DeviceOnSession
{
};

[Description("Microsoft iSCSI 发起程序: 会话类") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_SessionClass
{
  [key,Description("会话 ID") : Amended] string SessionId;
  [Description("发起程序名称") : Amended] string InitiatorName;
  [Description("目标节点名称") : Amended] string TargetNodeName;
  [Description("目标名称") : Amended] string TargetName;
  [Description("发起程序特定 ID") : Amended] uint8 ISID[];
  [Description("目标特定 ID") : Amended] uint8 TSID[];
  [Description("在此会话中从 iSCSI 目标注销") : Amended] uint32 Logout();
  [Description("发送 SCSI Inquiry 命令") : Amended] uint32 SendScsiInquiry([in,Description("LUN") : Amended] uint64 Lun,[in,Description("EvpdCmddt") : Amended] uint8 EvpdCmddt,[in,Description("页代码") : Amended] uint8 PageCode,[out,Description("SCSI 状态") : Amended] uint8 ScsiStatus,[out,Description("响应缓冲区") : Amended] uint8 ResponseBuffer[],[out,Description("感知缓冲区") : Amended] uint8 SenseBuffer[]);
  [Description("发送 SCSI Read Capacity 命令") : Amended] uint32 SendScsiReadCapacity([in,Description("LUN") : Amended] uint64 Lun,[out,Description("SCSI 状态") : Amended] uint8 ScsiStatus,[out,Description("响应缓冲区") : Amended] uint8 ResponseBuffer[],[out,Description("感知缓冲区") : Amended] uint8 SenseBuffer[]);
  [Description("发送 SCSI Report LUNs 命令") : Amended] uint32 SendScsiReportLuns([out,Description("SCSI 状态") : Amended] uint8 ScsiStatus,[out,Description("响应缓冲区") : Amended] uint8 ResponseBuffer[],[out,Description("感知缓冲区") : Amended] uint8 SenseBuffer[]);
  [Description("向会话添加连接") : Amended ToInstance ToSubclass] uint32 AddConnection([in,Description("发起程序端口号") : Amended] uint32 InitiatorPortNumber,[in,Description("目标门户") : Amended] MSiSCSIInitiator_Portal TargetPortal,[in,Description("安全标志") : Amended] uint64 SecurityFlags,[in,Description("登录选项") : Amended] MSiSCSIInitiator_TargetLoginOptions LoginOptions,[in,Description("密钥") : Amended] uint8 Key[],[out,Description("唯一连接 ID") : Amended] string UniqueConnectionId);
  [Description("从会话删除连接") : Amended ToInstance ToSubclass] uint32 RemoveConnection([in,Description("唯一连接 ID") : Amended] string UniqueConnectionId);
};

#pragma deleteclass("MSiSCSIInitiator_MethodClass",NOFAIL)

[Description("Microsoft iSCSI 发起程序: 方法类") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_MethodClass
{
  [Description("iSCSI 发起程序节点名称") : Amended] string iSCSINodeName;
  [Description("使用所有可用的发现方法刷新整个目标列表") : Amended ToInstance ToSubclass] uint32 RefreshTargetList();
  [Description("设置 iSCSI 隧道模式外部地址") : Amended] uint32 SetIScsiTunnelModeOuterAddress([in,Description("发起程序名称") : Amended] string InitiatorName,[in,Description("发起程序端口号") : Amended] uint32 InitiatorPortNumber,[in,Description("目标地址") : Amended] string DestinationAddress,[in,Description("外部模式地址") : Amended] string OuterModeAddress,[in,Description("指示是否要保留") : Amended] boolean Persist);
  [Description("设置 iSCSI IKE 信息") : Amended] uint32 SetIScsiIKEInfo([in,Description("发起程序名称") : Amended] string InitiatorName,[in,Description("发起程序端口号") : Amended] uint32 InitiatorPortNumber,[in,Description("IKE 身份验证信息") : Amended] MSiSCSIInitiator_IKEPresharedKeyAuthenticationInfo AuthInfo,[in,Description("指示是否要保留") : Amended] boolean Persist);
  [Description("设置 iSCSI 组预共享密钥") : Amended] uint32 SetIScsiGroupPresharedKey([in,Description("密钥") : Amended] uint8 Key[],[in,Description("指示是否要保留") : Amended] boolean Persist);
  [Description("设置 iSCSI CHAP 共享机密") : Amended] uint32 SetIScsiInitiatorCHAPSharedSecret([in,Description("共享机密") : Amended] uint8 SharedSecret[]);
  [Description("设置 iSCSI RADIUS 共享机密") : Amended] uint32 SetIScsiInitiatorRADIUSSharedSecret([in,Description("共享机密") : Amended] uint8 SharedSecret[]);
  [Description("设置 iSCSI 发起程序节点名称") : Amended] uint32 SetIScsiInitiatorNodeName([in,Description("发起程序节点名称") : Amended] string InitiatorNodeName);
  [Description("设置永久 iSCSI 卷") : Amended] uint32 SetupPersistentIScsiVolumes();
  [Description("清除永久 iSCSI 卷") : Amended] uint32 ClearPersistentIScsiVolumes();
};

[Description("Microsoft iSCSI 发起程序: 永久设备") : Amended,AMENDMENT, LOCALE(0x0804)] 
class MSiSCSIInitiator_PersistentDevices
{
  [key,Description("DevicePath") : Amended] string DevicePath;
};
