def bpf_of_octets.go

bend-osdev-bpf@0.1.0.0 · insn.bend:404

import bend-osdev-bpf@0.1.0.0/insn.bend as Insn
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B

404# the next n instructions, onto acc (last first), then all of them in order
405def bpf_of_octets.go(n: Nat, +order: BpfOrder, +o: B.Octets, acc: List<&2, BpfRaw>) -> List<&2, BpfRaw>:
406  match n:
407    case 0n:
408      List.reverse(&2, BpfRaw, acc)
409    case 1n+p:
410      bpf_of_octets.go(p, order, B.Octets.drop(8n, o), Con{BpfRaw.of_octets(order, B.Octets.take(8n, o)), acc})

Uses (9)

Used by (1)