I think there is a need for something similar to RFC3597, except for fields in a record rather than a BLOB for the record itself. RFC3597 is fine for an RRTYPE with only one RDATA element/structure, but not for complex RRs.
Context: there is a general problem on sub-field encodings (i.e. which has arisen from new drafts failing to observe RFC5507's recommendations.) An example use case would be adding extensions to any RRTYPE which uses TLV wire format, and for which no semantically-meaningful encoding of new types within the RRTYPE RDATA in presentation format exists. Here's a short list of things I think such a scheme should have: - A set of defined presentation-format <-> wire-format (bidirectional) transformations - The optional inclusion of a type code (the T in TLV) if the resource record format is TLV - A method of applying a label to a field (for use by user-interfaces, or for hand-edited zone file clarity) Such a scheme would facilitate more-complex RRTYPEs, and be more zone-file-friendly than RFC3597 Here's what I think would work: keyNNNN:label:mapping=value with the following alternate formats: label=value -- requires label be understood by the server, including both the corresponding key number and mapping label:mapping=value -- if the LHS does not begin with "keyNNNN", it is not a TLV encoding in wire format, only a field value encoding keyNNNN::mapping=value -- no label included keyNNNN=value -- no label included, default generic mapping keyNNNN:label=value -- label available, default generic mapping The presentation format of "value" would itself be subject to the rules specified by the "mapping" used. For backward compatibility to any existing implementations, the specification of "keyNNNN" and "mapping" should both be optional, with the existing mapping as the default. This would facilitate migration of zone files between implementations which are "extension-aware" and "extension-unaware" for any given extension of an RRTYPE For purposes of examples, here are some suggested mappings: uint16 - single integer with no leading zeros, maps to 16-bit unsigned value, must be a singleton uint16List - comma-separated list of integers between 0-65535, maps to the same (unsorted) sequence of 16-bit unsigned values; TLV length specifies total length; use in non-TLV context requires a uint16 length uint16SortedList - comma-separated list of integers between 0-65535, maps to a sorted sequence of 16-bit unsigned values; TLV length specifies total length; use in non-TLV context requires a uint16 length base64 - base-64 encoded blob, maps to whatever binary it decodes to, must be a singleton base64List - list of base-64 encoded items, comma separated in presentation format; a sequence of 16-bit length/value pairs in wire format; TLV length specifies total length; use in non-TLV context requires a uint16 length flag - has no value in presentation format, has no data in wire format as a TLV (implicitly a singleton), or a uint16 representation of 0 or 1 in the non-TLV use case ipv4 - an IPv4 address in the same format as an A record (both presentation and wire formats) ipv4list - one or more ipv4 values - if multiple, space separated and double-quote delimited; maps to a sequence of IPv4 addresses (A record wire encoding); TLV length specifies total length; use in non-TLV context requires a uint16 length ipv6 - an IPv6 address in the same format as an AAAA record (both presentation and wire formats) ipv6list - one or more IPv6 addresses - if multiple, space separated and double-quote delimited; maps to a sequence of iPv6 addresses (AAAA record wire encoding); TLV length specifies total length; use in non-TLV context requires a uint16 length CSV - one or more strings, separated by commas, enclosed in double quotes, as follows: inside quotes is encoded as the subset of printable-ASCII characters in the range of decimal 32 to decimal 126 with escaped (backslash) double-quote, escaped escape (double backslash), and also permitting other 8-bit values as escaped-decimal values \DDD maps to sequence of (length | value) where each length is uint8 and length(value) is between 1 and 255 inclusive. mapped value of one string from the list is the contents of the substituted string (e.g. with escape substitutions performed) without the enclosing quotes TLV length specifies total length; use in non-TLV context requires a uint16 length FQDN - a domain name; maps to wire-encoding for a domain name Discussion/feedback is welcome. If there is interest, I will write this up as an ID. Brian
_______________________________________________ DNSOP mailing list DNSOP@ietf.org https://www.ietf.org/mailman/listinfo/dnsop