Hi, I ran into a problem when trying to translate IANA registry "DNSKEY Flags" [1] into a YANG "bits" type. Each bit is the registry has an assigned number (0-15), so it seems natural to specify this number as the position of each bit in YANG.
However, it turns out that each bit contributes to the numeric value of the entire bit field with a value of 2^(15-n) where n is the bit number. For example, if bits ZONE (number 7) and SEP (15) are set, then the value of the flags field, which also appears in the DNSKEY resource record, is 257 = 2^8 + 2^0 My question is: Although it is not specified in RFC 7950, was the intention that bit of position n contributes with 2^n? Thanks, Lada [1] https://www.iana.org/assignments/dnskey-flags/dnskey-flags.xhtml -- Ladislav Lhotka Head, CZ.NIC Labs PGP Key ID: 0xB8F92B08A9F76C67 _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
