def flags.ok
import bend-kit-dns@0.7.0.0/dns.bend as Dnsimport Base
296# §4.1.1: QR set, opcode QUERY, not truncated, RCODE 0.
297def flags.ok(+f: U32) -> Bool:
298 Bool.and(Bool.and(U32.is_eq(U32.and(f, 32768), 32768), U32.is_eq(U32.and(f, 30720), 0)), Bool.and(U32.is_eq(U32.and(f, 512), 0), U32.is_eq(U32.and(f, 15), 0)))