diff --git a/common/sign.cpp b/common/sign.cpp index 805f5bd..df9a7a9 100644 --- a/common/sign.cpp +++ b/common/sign.cpp @@ -77,6 +77,7 @@ AbstractProtocol::FieldFlags SignProtocol::fieldFlags(int index) const { case sign_magic: case sign_tlv_guid: + case sign_tlv_ttag: case sign_tlv_end: break; @@ -116,6 +117,29 @@ QVariant SignProtocol::fieldData(int index, FieldAttrib attrib, } break; } + case sign_tlv_ttag: + { + switch(attrib) + { + case FieldName: + return QString("T-Tag"); + case FieldValue: + return 0; + case FieldTextValue: + return QString("%1").arg(0); + case FieldFrameValue: + { + QByteArray fv; + fv.resize(2); + fv[0] = 0; + fv[1] = kTypeLenTtagPlaceholder; + return fv; + } + default: + break; + } + break; + } case sign_tlv_guid: { quint32 guid = data.stream_guid() & 0xFFFFFF; diff --git a/common/sign.h b/common/sign.h index fa1809f..e7b8941 100644 --- a/common/sign.h +++ b/common/sign.h @@ -42,6 +42,8 @@ TLVs are encoded as Defined TLVs Type = 0, Len = 0 (0x00): End of TLVs Type = 1, Len = 3 (0x61): Stream GUID + Type = 2, Len = 1 (0x22): T-Tag Placeholder (0 value) + Type = 3, Len = 1 (0x23): T-Tag with actual value */ class SignProtocol : public AbstractProtocol @@ -52,6 +54,7 @@ public: // Frame Fields sign_tlv_end = 0, sign_tlv_guid, + sign_tlv_ttag, sign_magic, // Meta Fields @@ -88,6 +91,8 @@ private: static const quint32 kSignMagic = 0x1d10c0da; // coda! (unicode - 0x1d10c) static const quint8 kTypeLenEnd = 0x00; static const quint8 kTypeLenGuid = 0x61; + static const quint8 kTypeLenTtagPlaceholder = 0x22; + static const quint8 kTypeLenTtag = 0x23; OstProto::Sign data; };