TPM_CAPABILITY_AREA
#define TPM_CAP_ORD ((TPM_CAPABILITY_AREA) 0x00000001)
#define TPM_CAP_ALG ((TPM_CAPABILITY_AREA) 0x00000002)
#define TPM_CAP_PID ((TPM_CAPABILITY_AREA) 0x00000003)
#define TPM_CAP_FLAG ((TPM_CAPABILITY_AREA) 0x00000004)
#define TPM_CAP_PROPERTY ((TPM_CAPABILITY_AREA) 0x00000005)
#define TPM_CAP_VERSION ((TPM_CAPABILITY_AREA) 0x00000006)
#define TPM_CAP_KEY_HANDLE ((TPM_CAPABILITY_AREA) 0x00000007)
#define TPM_CAP_CHECK_LOADED ((TPM_CAPABILITY_AREA) 0x00000008)
#define TPM_CAP_SYM_MODE ((TPM_CAPABILITY_AREA) 0x00000009)
#define TPM_CAP_KEY_STATUS ((TPM_CAPABILITY_AREA) 0x0000000C)
#define TPM_CAP_NV_LIST ((TPM_CAPABILITY_AREA) 0x0000000D)
#define TPM_CAP_MFR ((TPM_CAPABILITY_AREA) 0x00000010)
#define TPM_CAP_NV_INDEX ((TPM_CAPABILITY_AREA) 0x00000011)
#define TPM_CAP_TRANS_ALG ((TPM_CAPABILITY_AREA) 0x00000012)
#define TPM_CAP_HANDLE ((TPM_CAPABILITY_AREA) 0x00000014)
#define TPM_CAP_TRANS_ES ((TPM_CAPABILITY_AREA) 0x00000015)
#define TPM_CAP_AUTH_ENCRYPT ((TPM_CAPABILITY_AREA) 0x00000017)
#define TPM_CAP_SELECT_SIZE ((TPM_CAPABILITY_AREA) 0x00000018)
#define TPM_CAP_VERSION_VAL ((TPM_CAPABILITY_AREA) 0x0000001A)
#define TPM_CAP_FLAG_PERMANENT ((TPM_CAPABILITY_AREA) 0x00000108)
#define TPM_CAP_FLAG_VOLATILE ((TPM_CAPABILITY_AREA) 0x00000109)
#define TPM_CAP_PROP_PCR ((TPM_CAPABILITY_AREA) 0x00000101)
#define TPM_CAP_PROP_DIR ((TPM_CAPABILITY_AREA) 0x00000102)
#define TPM_CAP_PROP_MANUFACTURER ((TPM_CAPABILITY_AREA) 0x00000103)
#define TPM_CAP_PROP_KEYS ((TPM_CAPABILITY_AREA) 0x00000104)
#define TPM_CAP_PROP_MIN_COUNTER ((TPM_CAPABILITY_AREA) 0x00000107)
#define TPM_CAP_PROP_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010A)
#define TPM_CAP_PROP_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010B)
#define TPM_CAP_PROP_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010C)
#define TPM_CAP_PROP_MAX_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010D)
#define TPM_CAP_PROP_MAX_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010E)
#define TPM_CAP_PROP_MAX_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010F)
#define TPM_CAP_PROP_MAX_KEYS ((TPM_CAPABILITY_AREA) 0x00000110)
#define TPM_CAP_PROP_OWNER ((TPM_CAPABILITY_AREA) 0x00000111)
#define TPM_CAP_PROP_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000112)
#define TPM_CAP_PROP_MAX_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000113)
#define TPM_CAP_PROP_FAMILYROWS ((TPM_CAPABILITY_AREA) 0x00000114)
#define TPM_CAP_PROP_TIS_TIMEOUT ((TPM_CAPABILITY_AREA) 0x00000115)
#define TPM_CAP_PROP_STARTUP_EFFECT ((TPM_CAPABILITY_AREA) 0x00000116)
#define TPM_CAP_PROP_DELEGATE_ROW ((TPM_CAPABILITY_AREA) 0x00000117)
#define TPM_CAP_PROP_DAA_MAX ((TPM_CAPABILITY_AREA) 0x00000119)
#define CAP_PROP_SESSION_DAA ((TPM_CAPABILITY_AREA) 0x0000011A)
#define TPM_CAP_PROP_CONTEXT_DIST ((TPM_CAPABILITY_AREA) 0x0000011B)
#define TPM_CAP_PROP_DAA_INTERRUPT ((TPM_CAPABILITY_AREA) 0x0000011C)
#define TPM_CAP_PROP_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011D)
#define TPM_CAP_PROP_MAX_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011E)
#define TPM_CAP_PROP_CMK_RESTRICTION ((TPM_CAPABILITY_AREA) 0x0000011F)
#define TPM_CAP_PROP_DURATION ((TPM_CAPABILITY_AREA) 0x00000120)
#define TPM_CAP_PROP_ACTIVE_COUNTER ((TPM_CAPABILITY_AREA) 0x00000122)
#define TPM_CAP_PROP_MAX_NV_AVAILABLE ((TPM_CAPABILITY_AREA) 0x00000123)
#define TPM_CAP_PROP_INPUT_BUFFER ((TPM_CAPABILITY_AREA) 0x00000124)
#define TPM_SET_PERM_FLAGS ((TPM_CAPABILITY_AREA) 0x00000001)
#define TPM_SET_PERM_DATA ((TPM_CAPABILITY_AREA) 0x00000002)
#define TPM_SET_STCLEAR_FLAGS ((TPM_CAPABILITY_AREA) 0x00000003)
#define TPM_SET_STCLEAR_DATA ((TPM_CAPABILITY_AREA) 0x00000004)
#define TPM_SET_STANY_FLAGS ((TPM_CAPABILITY_AREA) 0x00000005)
#define TPM_SET_STANY_DATA ((TPM_CAPABILITY_AREA) 0x00000006)
#define TPM_PF_DISABLE ((TPM_CAPABILITY_AREA) 1)
#define TPM_PF_OWNERSHIP ((TPM_CAPABILITY_AREA) 2)
#define TPM_PF_DEACTIVATED ((TPM_CAPABILITY_AREA) 3)
#define TPM_PF_READPUBEK ((TPM_CAPABILITY_AREA) 4)
#define TPM_PF_DISABLEOWNERCLEAR ((TPM_CAPABILITY_AREA) 5)
#define TPM_PF_ALLOWMAINTENANCE ((TPM_CAPABILITY_AREA) 6)
#define TPM_PF_PHYSICALPRESENCELIFETIMELOCK ((TPM_CAPABILITY_AREA) 7)
#define TPM_PF_PHYSICALPRESENCEHWENABLE ((TPM_CAPABILITY_AREA) 8)
#define TPM_PF_PHYSICALPRESENCECMDENABLE ((TPM_CAPABILITY_AREA) 9)
#define TPM_PF_CEKPUSED ((TPM_CAPABILITY_AREA) 10)
#define TPM_PF_TPMPOST ((TPM_CAPABILITY_AREA) 11)
#define TPM_PF_TPMPOSTLOCK ((TPM_CAPABILITY_AREA) 12)
#define TPM_PF_FIPS ((TPM_CAPABILITY_AREA) 13)
#define TPM_PF_OPERATOR ((TPM_CAPABILITY_AREA) 14)
#define TPM_PF_ENABLEREVOKEEK ((TPM_CAPABILITY_AREA) 15)
#define TPM_PF_NV_LOCKED ((TPM_CAPABILITY_AREA) 16)
#define TPM_PF_READSRKPUB ((TPM_CAPABILITY_AREA) 17)
#define TPM_PF_TPMESTABLISHED ((TPM_CAPABILITY_AREA) 18)
#define TPM_PF_MAINTENANCEDONE ((TPM_CAPABILITY_AREA) 19)
#define TPM_PF_DISABLEFULLDALOGICINFO ((TPM_CAPABILITY_AREA) 20)
#define TPM_SF_DEACTIVATED ((TPM_CAPABILITY_AREA) 1)
#define TPM_SF_DISABLEFORCECLEAR ((TPM_CAPABILITY_AREA) 2)
#define TPM_SF_PHYSICALPRESENCE ((TPM_CAPABILITY_AREA) 3)
#define TPM_SF_PHYSICALPRESENCELOCK ((TPM_CAPABILITY_AREA) 4)
#define TPM_SF_BGLOBALLOCK ((TPM_CAPABILITY_AREA) 5)
#define TPM_AF_POSTINITIALISE ((TPM_CAPABILITY_AREA) 1)
#define TPM_AF_LOCALITYMODIFIER ((TPM_CAPABILITY_AREA) 2)
#define TPM_AF_TRANSPORTEXCLUSIVE ((TPM_CAPABILITY_AREA) 3)
#define TPM_AF_TOSPRESENT ((TPM_CAPABILITY_AREA) 4)
#define TPM_PD_REVMAJOR ((TPM_CAPABILITY_AREA) 1)
#define TPM_PD_REVMINOR ((TPM_CAPABILITY_AREA) 2)
#define TPM_PD_TPMPROOF ((TPM_CAPABILITY_AREA) 3)
#define TPM_PD_OWNERAUTH ((TPM_CAPABILITY_AREA) 4)
#define TPM_PD_OPERATORAUTH ((TPM_CAPABILITY_AREA) 5)
#define TPM_PD_MANUMAINTPUB ((TPM_CAPABILITY_AREA) 6)
#define TPM_PD_ENDORSEMENTKEY ((TPM_CAPABILITY_AREA) 7)
#define TPM_PD_SRK ((TPM_CAPABILITY_AREA) 8)
#define TPM_PD_DELEGATEKEY ((TPM_CAPABILITY_AREA) 9)
#define TPM_PD_CONTEXTKEY ((TPM_CAPABILITY_AREA) 10)
#define TPM_PD_AUDITMONOTONICCOUNTER ((TPM_CAPABILITY_AREA) 11)
#define TPM_PD_MONOTONICCOUNTER ((TPM_CAPABILITY_AREA) 12)
#define TPM_PD_PCRATTRIB ((TPM_CAPABILITY_AREA) 13)
#define TPM_PD_ORDINALAUDITSTATUS ((TPM_CAPABILITY_AREA) 14)
#define TPM_PD_AUTHDIR ((TPM_CAPABILITY_AREA) 15)
#define TPM_PD_RNGSTATE ((TPM_CAPABILITY_AREA) 16)
#define TPM_PD_FAMILYTABLE ((TPM_CAPABILITY_AREA) 17)
#define TPM_DELEGATETABLE ((TPM_CAPABILITY_AREA) 18)
#define TPM_PD_EKRESET ((TPM_CAPABILITY_AREA) 19)
#define TPM_PD_MAXNVBUFSIZE ((TPM_CAPABILITY_AREA) 20)
#define TPM_PD_LASTFAMILYID ((TPM_CAPABILITY_AREA) 21)
#define TPM_PD_NOOWNERNVWRITE ((TPM_CAPABILITY_AREA) 22)
#define TPM_PD_RESTRICTDELEGATE ((TPM_CAPABILITY_AREA) 23)
#define TPM_PD_TPMDAASEED ((TPM_CAPABILITY_AREA) 24)
#define TPM_PD_DAAPROOF ((TPM_CAPABILITY_AREA) 25)
#define TPM_SD_CONTEXTNONCEKEY ((TPM_CAPABILITY_AREA)0x00000001)
#define TPM_SD_COUNTID ((TPM_CAPABILITY_AREA)0x00000002)
#define TPM_SD_OWNERREFERENCE ((TPM_CAPABILITY_AREA)0x00000003)
#define TPM_SD_DISABLERESETLOCK ((TPM_CAPABILITY_AREA)0x00000004)
#define TPM_SD_PCR ((TPM_CAPABILITY_AREA)0x00000005)
#define TPM_SD_DEFERREDPHYSICALPRESENCE ((TPM_CAPABILITY_AREA)0x00000006)
#define TPM_AD_CONTEXTNONCESESSION ((TPM_CAPABILITY_AREA) 1)
#define TPM_AD_AUDITDIGEST ((TPM_CAPABILITY_AREA) 2)
#define TPM_AD_CURRENTTICKS ((TPM_CAPABILITY_AREA) 3)
#define TPM_AD_CONTEXTCOUNT ((TPM_CAPABILITY_AREA) 4)
#define TPM_AD_CONTEXTLIST ((TPM_CAPABILITY_AREA) 5)
#define TPM_AD_SESSIONS ((TPM_CAPABILITY_AREA) 6)
TPM_CAPABILITY_AREA capArea = TSS_TPMCAP_VERSION_VAL;