2.2.1.2.78 DHCP_ATTRIB

The DHCP_ATTRIB structure contains the attribute and its values for the DHCPv4 server. This structure is used in the R_DhcpServerQueryAttribute (section 3.2.4.35) method.

 typedef struct _DHCP_ATTRIB {
   DHCP_ATTRIB_ID DhcpAttribId;
   ULONG DhcpAttribType;
   [switch_is(DhcpAttribType), switch_type(ULONG)] 
     union {
     [case(DHCP_ATTRIB_TYPE_BOOL)] 
       BOOL DhcpAttribBool;
     [case(DHCP_ATTRIB_TYPE_ULONG)] 
       ULONG DhcpAttribUlong;
   };
 } DHCP_ATTRIB,
  *PDHCP_ATTRIB,
  *LPDHCP_ATTRIB;

DhcpAttribId: This is of type DHCP_ATTRIB_ID (section 2.2.1.1.1), a ULONG value specifying the attribute.

DhcpAttribType: This is of type ULONG. The value specifies the type of the attribute's data and which one of the values is chosen from the subsequent union.

Value

Meaning

DHCP_ATTRIB_TYPE_BOOL

0x00000001

The attribute value is of type BOOL, and DhcpAttribBool is chosen from the following union.

DHCP_ATTRIB_TYPE_ULONG

0x00000002

The attribute value is of type ULONG, and DhcpAttribUlong is chosen from the following union.

DhcpAttribBool: This is of type BOOL and contains the value of the attribute. This is chosen from the union if DhcpAttribType contains DHCP_ATTRIB_TYPE_BOOL.

DhcpAttribUlong: This is of type ULONG and contains the value of the attribute. This is chosen from the union if DhcpAttribType  contains DHCP_ATTRIB_TYPE_ULONG.