#
---
_include: {
  tlvf/WSC/eWscLengths.h,
  tlvf/WSC/eWscAuth.h,
  tlvf/WSC/eWscVendorId.h,
  tlvf/WSC/eWscVendorExt.h,
  tlvf/WSC/eWscDev.h,
  tlvf/WSC/eWscWfaVendorExtSubelement.h,
  tlvf/common/sMacAddr.h,
  tlvf/WSC/eWscAttributes.h,
  tlvf/WSC/eWscEncr.h,
  tlvf/WSC/eWscValues8.h,
  tlvf/WSC/eWscMessageType.h,
  tlvf/WSC/eWscConn.h,
  tlvf/WSC/eWscRfBands.h,
  tlvf/WSC/eWscAssoc.h,
  tlvf/WSC/eWscValues16.h,
  tlvf/WSC/eWscState.h,
}
_namespace: WSC

#encrypted attributes

sWscAttrAuthenticationType:
  _type: struct
  attribute_type:
    _type: eWscAttributes
    _value: ATTR_AUTH_TYPE
  data_length:
    _type: uint16_t
    _value: 2
  data:
    _type: eWscAuth
    _value: eWscAuth::WSC_AUTH_WPA2PSK

sWscAttrEncryptionType:
  _type: struct
  attribute_type:
    _type: eWscAttributes
    _value: ATTR_ENCR_TYPE
  data_length:
    _type: uint16_t
    _value: 2
  data:
    _type: eWscEncr
    _value: eWscEncr::WSC_ENCR_AES

sWscAttrBssid:
  _type: struct
  attribute_type:
    _type: eWscAttributes
    _value: ATTR_MAC_ADDR
  data_length:
    _type: uint16_t
    _value: WSC_MAC_LENGTH
  data:
    _type: sMacAddr

sWscWfaVendorExtSubelementVersion2:
  _type: struct
  id:
    _type: uint8_t
    _value: VERSION2
  length:
    _type: uint8_t
    _value: 0x1
  value:
    _type: uint8_t
    _value: WSC_VERSION2

sWscWfaVendorExtSubelementMultiApIdentifier:
  _type: struct
  id:
    _type: uint8_t
    _value: MULTI_AP_IDENTIFIER
  length:
    _type: uint8_t
    _value: 0x1
  value:
    _type: uint8_t
    _value: TEARDOWN
    
cWscAttrKeyWrapAuthenticator:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_KEY_WRAP_AUTH
  length:
    _type: uint16_t
    _value: WSC_KEY_WRAP_AUTH_LENGTH
  data:
    _type: uint8_t
    _length: [ WSC_KEY_WRAP_AUTH_LENGTH ]
    
cWscAttrVendorExtension:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_VENDOR_EXTENSION
  length:
    _type: uint16_t
    _length_var: True
  vendor_id_0:
    _type: uint8_t
    _value: WSC_VENDOR_ID_WFA_1
  vendor_id_1:
    _type: uint8_t
    _value: WSC_VENDOR_ID_WFA_2
  vendor_id_2:
    _type: uint8_t
    _value: WSC_VENDOR_ID_WFA_3
  vendor_data:
    _type: uint8_t
    _length: []

cConfigData:
  _type: class
  ssid_type:
    _type: eWscAttributes
    _value: ATTR_SSID
  ssid_length:
    _type: uint16_t
    _length_var: True
  ssid:
    _type: char
    _length: [ ssid_length ]
    _length_max: WSC_MAX_SSID_LENGTH
  authentication_type_attr: sWscAttrAuthenticationType
  encryption_type_attr: sWscAttrEncryptionType
  network_key_type:
    _type: eWscAttributes
    _value: ATTR_NETWORK_KEY
  network_key_length:
    _type: uint16_t
    _length_var: True
  network_key:
    _type: char
    _length: [ network_key_length ]
    _length_max: WSC_MAX_NETWORK_KEY_LENGTH
  bssid_attr: sWscAttrBssid
  bss_type:
    _type: uint8_t
    _value: TEARDOWN
  mld_id:
    _type: int8_t
    _value: 0
  hidden_ssid:
    _type: uint8_t
    _value: 0

cWscAttrEncryptedSettings:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value_const: ATTR_ENCR_SETTINGS
  length:
    _type: uint16_t
    _length_var: True
  iv:
    _type: char
    _length: [WSC_ENCRYPTED_SETTINGS_IV_LENGTH]
  encrypted_settings:
    _type: char
    _length: []

cWscAttrVersion:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_VERSION
  length:
    _type: uint16_t
    _value_const: 1
  data:
    _type: eWscValues8
    _value: WSC_VERSION

cWscAttrMessageType:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_MSG_TYPE
  length:
    _type: uint16_t
    _value_const: 1
  msg_type:
    _type: eWscMessageType
    _value: WSC_MSG_TYPE_INVALID

cWscAttrEnrolleeNonce:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_ENROLLEE_NONCE
  length:
    _type: uint16_t
    _value_const: WSC_NONCE_LENGTH
  nonce:
    _type: uint8_t
    _length: [ WSC_NONCE_LENGTH ]

cWscAttrPublicKey:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_PUBLIC_KEY
  length:
    _type: uint16_t
    _value_const: WSC_PUBLIC_KEY_LENGTH
  public_key:
    _type: uint8_t
    _length: [ WSC_PUBLIC_KEY_LENGTH ]

cWscAttrAuthenticationTypeFlags:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_AUTH_TYPE_FLAGS
  length: 
    _type: uint16_t
    _value_const: 2
  auth_type_flags: 
    _type: eWscAuth
    _value: eWscAuth(eWscAuth::WSC_AUTH_OPEN | eWscAuth::WSC_AUTH_WPA2PSK)

cWscAttrEncryptionTypeFlags:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_ENCR_TYPE_FLAGS
  length:
    _type: uint16_t
    _value_const: 2
  encr_type_flags:
    _type: uint16_t
    _value: uint16_t(eWscEncr::WSC_ENCR_NONE) | uint16_t(eWscEncr::WSC_ENCR_AES)
  
cWscAttrConnectionTypeFlags:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_CONN_TYPE_FLAGS
  length:
    _type: uint16_t
    _value_const: 1
  conn_type_flags:
    _type: eWscConn
    _value: WSC_CONN_ESS
  
cWscAttrConfigurationMethods:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_CONFIG_METHODS
  length:
    _type: uint16_t
    _value_const: 2
  conf_methods:
    _type: uint16_t
    _value: (WSC_CONFIG_PHY_PUSHBUTTON | WSC_CONFIG_VIRT_PUSHBUTTON)

cWscAttrManufacturer:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_MANUFACTURER
  length:
    _type: uint16_t
    _length_var: True
  manufacturer:
    _type: char
    _length: []

cWscAttrModelName:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_MODEL_NAME
  length:
    _type: uint16_t
    _length_var: True
  model:
    _type: char
    _length: []

cWscAttrModelNumber:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_MODEL_NUMBER
  length:
    _type: uint16_t
    _length_var: True
  model_number:
    _type: char
    _length: []

cWscAttrSerialNumber:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_SERIAL_NUMBER
  length:
    _type: uint16_t
    _length_var: True
  serial_number:
    _type: char
    _length: []

cWscAttrPrimaryDeviceType:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_PRIMARY_DEV_TYPE
  length:
    _type: uint16_t
    _value_const: WSC_PRIMARY_DEV_TYPE_LENGTH
  category_id:
    _type: uint16_t 
    _value: WSC_DEV_NETWORK_INFRA
  oui:
    _type: uint32_t
    _value: 0x0050F204
  sub_category_id:
    _type: uint16_t

cWscAttrDeviceName:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_DEV_NAME
  length:
    _type: uint16_t
    _length_var: True
  device_name:
    _type: char
    _length: []

cWscAttrRfBands:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_RF_BANDS
  length:
    _type: uint16_t
    _value_const: 1
  bands:
    _type: eWscRfBands

cWscAttrAssociationState:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_ASSOC_STATE
  length:
    _type: uint16_t
    _value_const: 2
  assoc_state:
    _type: eWscAssoc
    _value: WSC_ASSOC_NOT_ASSOC

cWscAttrDevicePasswordID:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_DEV_PASSWORD_ID
  length:
    _type: uint16_t
    _value_const: 2
  pw:
    _type: eWscValues16
    _value: DEV_PW_PUSHBUTTON

cWscAttrConfigurationError:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_CONFIG_ERROR
  length:
    _type: uint16_t
    _value_const: 2
  cfg_err:
    _type: eWscValues16
    _value: WSC_CFG_NO_ERROR

cWscAttrOsVersion:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_OS_VERSION
  length:
    _type: uint16_t
    _value_const: WSC_OS_VERSION_LENGTH
  os_version:
    _type: uint32_t
    _value: 0x80000001

cWscAttrMac:
  _type: class
  _is_tlv_class: True
  type: 
    _type: eWscAttributes
    _value: ATTR_MAC_ADDR
  length:
    _type: uint16_t
    _value_const: WSC_MAC_LENGTH
  data: sMacAddr

cWscAttrUuidE:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_UUID_E
  length:
    _type: uint16_t
    _value_const: WSC_UUID_LENGTH
  data:
    _type: uint8_t
    _length: [ WSC_UUID_LENGTH ]

cWscAttrWscState:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_WSC_STATE
  length:
    _type: uint16_t
    _value_const: 1
  state:
    _type: eWscState
    _value: WSC_STATE_NOT_CONFIGURED

cWscAttrUuidR:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_UUID_R
  length:
    _type: uint16_t
    _value_const: WSC_UUID_LENGTH
  data:
    _type: uint8_t
    _length: [ WSC_UUID_LENGTH ]

cWscAttrAuthenticator:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_AUTHENTICATOR
  length:
    _type: uint16_t
    _value: WSC_AUTHENTICATOR_LENGTH
  data:
    _type: uint8_t
    _length: [ WSC_AUTHENTICATOR_LENGTH ]

cWscAttrRegistrarNonce:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_REGISTRAR_NONCE
  length:
    _type: uint16_t
    _value: WSC_NONCE_LENGTH
  nonce:
    _type: uint8_t
    _length: [ WSC_NONCE_LENGTH ]

cWscAttrSsid:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_SSID
  length:
    _type: uint16_t
    _length_var: True
  ssid:
    _type: char
    _length: []

cWscAttrAuthenticationType:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_AUTH_TYPE
  length:
    _type: uint16_t
    _value_const: 2
    _length_var: True
  data:
    _type: eWscAuth
    _value: eWscAuth::WSC_AUTH_WPA2PSK

cWscAttrEncryptionType:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_ENCR_TYPE
  length:
    _type: uint16_t
    _value_const: 2
    _length_var: True
  data:
    _type: eWscEncr
    _value: eWscEncr::WSC_ENCR_AES

cWscAttrNetworkKey:
  _type: class
  _is_tlv_class: True
  type:
    _type: eWscAttributes
    _value: ATTR_NETWORK_KEY
  length:
    _type: uint16_t
    _length_var: True
  key:
    _type: char
    _length: []
