From d0309e150c7615928ad747787fbf17aeee513fb9 Mon Sep 17 00:00:00 2001 From: Damian Krolik Date: Thu, 27 Jul 2023 17:30:46 +0200 Subject: [PATCH] [dnssd] remove constants for _A subtype and AP TXT field The _A subtype and AP TXT field were removed from the spec long time ago but the constants describing the maximum lengths are still present in the SDK. --- src/lib/dnssd/Constants.h | 6 ++---- src/lib/dnssd/TxtFields.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/dnssd/Constants.h b/src/lib/dnssd/Constants.h index 992ab9cba4bb63..2c570892376d05 100644 --- a/src/lib/dnssd/Constants.h +++ b/src/lib/dnssd/Constants.h @@ -39,8 +39,7 @@ constexpr size_t kSubTypeShortDiscriminatorMaxLength = 4; // _S
constexpr size_t kSubTypeLongDiscriminatorMaxLength = 6; // _L constexpr size_t kSubTypeVendorIdMaxLength = 7; // _V constexpr size_t kSubTypeDeviceTypeMaxLength = 12; // _T -constexpr size_t kSubTypeCommissioningModeMaxLength = 3; // _C -constexpr size_t kSubTypeAdditionalCommissioningMaxLength = 3; // _A +constexpr size_t kSubTypeCommissioningModeMaxLength = 3; // _CM constexpr size_t kSubTypeCompressedFabricIdMaxLength = 18; // _I<16-hex-digits> /* @@ -68,8 +67,7 @@ namespace Commission { #define SUBTYPES \ (std::initializer_list{ kSubTypeShortDiscriminatorMaxLength, kSubTypeLongDiscriminatorMaxLength, \ - kSubTypeVendorIdMaxLength, kSubTypeDeviceTypeMaxLength, kSubTypeCommissioningModeMaxLength, \ - kSubTypeAdditionalCommissioningMaxLength }) + kSubTypeVendorIdMaxLength, kSubTypeDeviceTypeMaxLength, kSubTypeCommissioningModeMaxLength }) constexpr size_t kInstanceNameMaxLength = 16; // 64-bit random number in hex constexpr size_t kSubTypeMaxNumber = SUBTYPES.size(); diff --git a/src/lib/dnssd/TxtFields.h b/src/lib/dnssd/TxtFields.h index b39f8617d8ddd1..ffc0e0ecedf823 100644 --- a/src/lib/dnssd/TxtFields.h +++ b/src/lib/dnssd/TxtFields.h @@ -40,7 +40,6 @@ static constexpr size_t kKeyTcpSupportedMaxLength = 1; // Commissionable/commissioner node TXT entries static constexpr size_t kKeyLongDiscriminatorMaxLength = 5; static constexpr size_t kKeyVendorProductMaxLength = 11; -static constexpr size_t kKeyAdditionalCommissioningMaxLength = 1; static constexpr size_t kKeyCommissioningModeMaxLength = 1; static constexpr size_t kKeyDeviceTypeMaxLength = 10; static constexpr size_t kKeyDeviceNameMaxLength = 32; @@ -87,7 +86,6 @@ constexpr const TxtFieldInfo txtFieldInfo[static_cast(TxtFieldKey::kCoun { TxtFieldKey::kUnknown, 0, "", TxtKeyUse::kNone }, { TxtFieldKey::kLongDiscriminator, kKeyLongDiscriminatorMaxLength, "D", TxtKeyUse::kCommission }, { TxtFieldKey::kVendorProduct, kKeyVendorProductMaxLength, "VP", TxtKeyUse::kCommission }, - { TxtFieldKey::kAdditionalPairing, kKeyAdditionalCommissioningMaxLength, "AP", TxtKeyUse::kCommission }, { TxtFieldKey::kCommissioningMode, kKeyCommissioningModeMaxLength, "CM", TxtKeyUse::kCommission }, { TxtFieldKey::kDeviceType, kKeyDeviceTypeMaxLength, "DT", TxtKeyUse::kCommission }, { TxtFieldKey::kDeviceName, kKeyDeviceNameMaxLength, "DN", TxtKeyUse::kCommission },