def rr.len

bend-kit-dns@0.7.0.0 · dns.bend:191

import bend-kit-dns@0.7.0.0/dns.bend as Dns
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

191def rr.len(+ty: U32, +cl: U32, r: Bytes.Cursor & Maybe<&2, U32>) -> Bytes.Cursor & RR:
192  (c, m) = r
193  match m:
194    case None{}:
195      (c, RRBad{})
196    case Some{+len}:
197      rr.data(Bool.and(Bool.and(U32.is_eq(ty, 1), U32.is_eq(cl, 1)), U32.is_eq(len, 4)), Bytes.Cursor.region(c, len))

Uses (10)

Used by (1)