From 1cc832269f72642682773d05c2933b2aec8ef0b7 Mon Sep 17 00:00:00 2001 From: lezhan Date: Mon, 6 May 2024 06:21:05 +0000 Subject: [PATCH] [tlv] add new tlvs for network diagnostic libotcommissioner.jar, a versatile Java library, provides support for wide range of TMF message transactions, including MeshCop protocols and diagnostic TLVs. This PR focuses on integrating all the diagnostic TLVs, as defined in the spec `10.11.3` into the library's TLV module --- src/library/tlv.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/library/tlv.cpp b/src/library/tlv.cpp index efeddde9..d5cae8f1 100644 --- a/src/library/tlv.cpp +++ b/src/library/tlv.cpp @@ -226,9 +226,15 @@ bool Tlv::IsValid() const { // Network disgnostic layer TLVs case Type::kNetworkDiagExtMacAddress: +<<<<<<< HEAD return length == 8; case Type::kNetworkDiagMacAddress: return length == 2; +======= + return length >= 8; + case Type::kNetworkDiagMacAddress: + return length >= 2; +>>>>>>> 20da654 ([tlv] add new tlvs for network diagnostic) case Type::kNetworkDiagMode: return length == 1; case Type::kNetworkDiagTimeout: