Lines Matching refs:fcode
681 bpf_check_upgrade(u_long cmd, struct bpf_d *d, struct bpf_insn *fcode, int flen)
688 if (d->bd_writer == 0 || fcode == NULL)
701 if (cmd == BIOCSETF && flen == 1 && fcode[0].code == (BPF_RET | BPF_K))
1833 struct bpf_insn *fcode, *old;
1862 fcode = NULL;
1878 fcode = malloc(size, M_BPF, M_WAITOK);
1879 if (copyin(fp->bf_insns, fcode, size) != 0 ||
1880 !bpf_validate(fcode, flen)) {
1881 free(fcode, M_BPF);
1885 /* Filter is copied inside fcode and is perfectly valid. */
1886 jfunc = bpf_jitter(fcode, flen);
1902 d->bd_wfilter = fcode;
1905 d->bd_rfilter = fcode;
1913 need_upgrade = bpf_check_upgrade(cmd, d, fcode, flen);