Type–length–value
Also called: TLV, tag-length-value
Type–length–value is a way to organize fields inside a message. The type identifies what a field represents, the length describes its size according to the format’s rules, and the value contains its data. A receiver can use those boundaries to locate the next field without understanding every value.
In a hypothetical format with one-byte type and length fields, type 05, length 03 and bytes 41 42 43 carry the three ASCII letters ABC. That whole field occupies five bytes. Real protocols must define field widths, byte order and what the length counts. An unknown type can be skipped only when that protocol’s rules permit it; lengths still need validation.
- Read first
- Message framing
- Further reading
- IETF — RFC 8200, IPv6 option format