Rediger

Del via


SoHAttributeValue union

Note

The Network Access Protection platform is not available starting with Windows 10

The SoHAttributeValue union defines the contents of the type member in a SoHAttribute structure. The structure of the SoHAttributeValue union is determined by the SoHAttributeType specified in the type member of the SoHAttribute structure.

Syntax

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;

Members

idVal

case(sohAttributeTypeSystemHealthId)

A unique SystemHealthEntityId that contains the ID of the System Health Agent (SHA) or System Health Validator (SHV) that constructed this SoH packet.

v4AddressesVal

case(sohAttributeTypeIpv4FixupServers)

The IPv4 addresses of the fix-up servers in use by the NAP system.

count

The number of IPv4 addresses in the addresses member in the range 1 to maxIpv4CountPerSoHAttribute.

addresses

An array of Ipv4Address structures that contain the IPv4 addresses.

v6AddressesVal

case(sohAttributeTypeIpv6FixupServers)

The IPv6 addresses of the fix-up servers in use by the NAP system.

count

The number of IPv4 addresses in the addresses member in the range 1 to maxIpv6CountPerSoHAttribute.

addresses

An array of Ipv6Address structures that contain the IPv4 addresses.

codesVal

case(sohAttributeTypeComplianceResultCodes, sohAttributeTypeErrorCodes)

A ResultCodes structure that contains either the application defined compliance result codes of the client or NAP error constants. An SoH packet must contain this TLV or the sohAttributeTypeFailureCategory TLV.

dateTimeVal

case(sohAttributeTypeTimeOfLastUpdate, sohAttributeTypeSoHGenerationTime)

A FILETIME structure that contains the time of the last SoH update or the SoH generation time.

vendorSpecificVal

case(sohAttributeTypeVendorSpecific)

Application-specific data that is defined by the vendor.

vendorId

A 4-byte identifier that defines the SHA/SHV pair ID. The first 3 bytes are the IETF-assigned SMI code of the vendor, and the last byte identifies the component itself. When implementing a SHA or SHV, do not use the ID values assigned to internal Microsoft system health components on NAP vendor constants.

size

The size, in bytes, of the vendor data in the range 0 to (maxSoHAttributeSize - 4).

vendorSpecificData

A pointer to the vendor specific data in network byte order.

uint8Val

case(sohAttributeTypeHealthClass, sohAttributeTypeFailureCategory,sohAttributeTypeExtendedIsolationState)

The health class, failure category, or extended isolation state of a NAP component as either a HealthClassValue or FailureCategory value, or a IsolationInfoEx structure.

octetStringVal

default

The following attributes' values are octet strings:

  • sohAttributeTypeSoftwareVersion
  • sohAttributeTypeClientId
  • sohAttributeTypeProductName
  • sohAttributeTypeHealthClassStatus

For forward compatibility, all unrecognized attributes are returned as octet strings. data must be in network byte order.

size

The size, in bytes, of data in the range 0 to maxSoHAttributeSize.

data

A pointer to the octet string value.

Actual data layout

Due to the nature of the SDK publishing environment, unions are not clearly represented in syntax blocks. Here is the actual syntax from the NapProtocol.h header file.

#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;
};

Remarks

These attribute types are consumed by the NAP system:

  • sohAttributeTypeSystemHealthId
  • sohAttributeTypeIpv4FixupServers
  • sohAttributeTypeIpv6FixupServers
  • sohAttributeTypeComplianceResultCodes
  • sohAttributeTypeFailureCategory

The rest of the SoHAttributeTypes are meant purely as prescriptive guidance for usage by SHAs and SHVs.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
NapProtocol.h
IDL
NapProtocol.idl

See also

NAP Reference

NAP Structures