Share via


SoHAttributeValue 等位

注意

從 Windows 10 開始,無法使用網路存取保護平臺

SoHAttributeValue等位會定義SoHAttribute結構中類型成員的內容。 SoHAttributeValue等位的結構是由SoHAttributeType 在 SoHAttribute 結構的類型成員中指定的 SoHAttributeType所決定。

語法

typedef union tagSoHAttributeValue {
  SystemHealthEntityId     idVal;
  struct tagIpv4Addresses {
    UINT16      count;
    Ipv4Address *addresses;
  } v4AddressesVal;
  struct tagIpv6Addresses {
    UINT16      count;
    Ipv6Address *addresses;
  } v6AddressesVal;
  ResultCodes              codesVal;
  FILETIME                 dateTimeVal;
  struct tagVendorSpecific {
    UINT32 vendorId;
    UINT16 size;
    BYTE   *vendorSpecificData;
  } vendorSpecificVal;
  UINT8                    uint8Val;
  struct tagOctetString {
    UINT16 size;
    BYTE   *data;
  } octetStringVal;
} SoHAttributeValue;

成員

idVal

case (sohAttributeTypeSystemHealthId)

唯一 的 SystemHealthEntityId ,其中包含建構此 SoH 封包之 SYSTEM Health Agent (SHA) 或 System Health Validator (SHV) 識別碼。

v4AddressesVal

case (sohAttributeTypeIpv4FixupServers)

NAP 系統正在使用之修正伺服器的 IPv4 位址。

計數

範圍 1 到maxIpv4CountPerSoHAttribute位址成員中的 IPv4 位址數目。

addresses

Ipv4Address結構的陣列,其中包含 IPv4 位址。

v6AddressesVal

case (sohAttributeTypeIpv6FixupServers)

NAP 系統正在使用之修正伺服器的 IPv6 位址。

計數

範圍 1 到maxIpv6CountPerSoHAttribute位址成員中的 IPv4 位址數目。

addresses

Ipv6Address結構的陣列,其中包含 IPv4 位址。

codeVal

case (sohAttributeTypeComplianceResultCodes, sohAttributeTypeErrorCodes)

ResultCodes結構,包含應用程式定義的用戶端合規性結果碼或NAP 錯誤常數SoH封包必須包含此 TLV 或sohAttributeTypeFailureCategory TLV。

dateTimeVal

case (sohAttributeTypeTimeOfLastUpdate, sohAttributeTypeSoHGenerationTime)

FILETIME結構,其中包含上次SoH更新的時間或SoH產生時間。

vendorSpecificVal

case (sohAttributeTypeVendorSpecific)

廠商所定義的應用程式特定資料。

vendorId

定義 SHA/SHV 配對識別碼的 4 位元組識別碼。 前 3 個位元組是廠商的 IETF 指派 SMI 代碼,最後一個位元組會識別元件本身。 實作 SHA 或 SHV 時,請勿使用指派給 NAP 廠商常數內部 Microsoft 系統健康狀態元件的識別碼值。

size

0 到 maxSoHAttributeSize - 4 () 之廠商資料的大小,以位元組為單位。

vendorSpecificData

以網路位元組順序指向廠商特定資料的指標。

uint8Val

case (sohAttributeTypeHealthClass, sohAttributeTypeFailureCategory,sohAttributeTypeExtendedIsolationState)

HEALTHClassValueFailureCategory值或IsolationInfoEx結構之 NAP 元件的健全狀況類別、失敗類別或擴充隔離狀態。

octetStringVal

預設值

下列屬性的值是八位字串:

  • sohAttributeTypeSoftwareVersion
  • sohAttributeTypeClientId
  • sohAttributeTypeProductName
  • sohAttributeTypeHealthClassStatus

為了向前相容性,所有無法辨識的屬性都會以八位字串傳回。 資料 必須依網路位元組順序排列。

size

範圍 0 到maxSoHAttributeSize的資料大小,以位元組為單位。

data

八位字串值的指標。

實際資料配置

由於 SDK 發佈環境的本質,在語法區塊中不會清楚表示等位。 以下是 NapProtocol.h 標頭檔中的實際語法。

#include <windows.h>

typedef [switch_type(SoHAttributeType)] 
   union tagSoHAttributeValue
   {
      [case(sohAttributeTypeSystemHealthId)]
         SystemHealthEntityId idVal;
   
      [case(sohAttributeTypeIpv4FixupServers)]
         struct tagIpv4Addresses
         {
            [range(1, maxIpv4CountPerSoHAttribute)] 
               UINT16 count;
            [size_is(count)] Ipv4Address* addresses;
         } v4AddressesVal;

      [case(sohAttributeTypeIpv6FixupServers)]
         struct tagIpv6Addresses
         {
            [range(1, maxIpv6CountPerSoHAttribute)]
               UINT16 count;
            [size_is(count)] Ipv6Address* addresses;
         } v6AddressesVal;

      [case(sohAttributeTypeComplianceResultCodes, 
            sohAttributeTypeErrorCodes)]
         ResultCodes codesVal;

      [case(sohAttributeTypeTimeOfLastUpdate, 
            sohAttributeTypeSoHGenerationTime)]
         FILETIME dateTimeVal;

      [case(sohAttributeTypeVendorSpecific)]
         struct tagVendorSpecific
         {
            UINT32 vendorId;
            [range(0, maxSoHAttributeSize - 4)] 
               UINT16 size;
            [size_is(size)] BYTE* vendorSpecificData;
         } vendorSpecificVal;

      [case(sohAttributeTypeHealthClass, 
            sohAttributeTypeFailureCategory,
            sohAttributeTypeExtendedIsolationState)]
         UINT8 uint8Val;

      [default]
         struct tagOctetString
         {
            [range(0, maxSoHAttributeSize)] UINT16 size;
            [size_is(size)] BYTE* data;
         } octetStringVal;

   } SoHAttributeValue;
};

備註

NAP 系統會取用這些屬性類型:

  • sohAttributeTypeSystemHealthId
  • sohAttributeTypeIpv4FixupServers
  • sohAttributeTypeIpv6FixupServers
  • sohAttributeTypeComplianceResultCodes
  • sohAttributeTypeFailureCategory

SoHAttributeTypes的其餘部分純粹是 SHA 和 SHV 使用規定指導方針。

規格需求

需求
最低支援的用戶端
Windows Vista [僅限傳統型應用程式]
最低支援的伺服器
Windows Server 2008 [僅限傳統型應用程式]
標頭
NapProtocol.h
Idl
NapProtocol.idl

另請參閱

NAP 參考

NAP 結構