Lines Matching refs:fcode
377 static int fix_program(pcap_t *handle, struct sock_fprog *fcode,
380 static int set_kernel_filter(pcap_t *handle, struct sock_fprog *fcode);
1688 if (!handle->md.use_bpf && handle->fcode.bf_insns) {
1689 if (bpf_filter(handle->fcode.bf_insns, bp,
2329 struct sock_fprog fcode;
2358 if (handle->fcode.bf_len > USHRT_MAX) {
2360 * fcode.len is an unsigned short for current kernel.
2366 fcode.len = 0;
2367 fcode.filter = NULL;
2385 switch (fix_program(handle, &fcode, is_mmapped)) {
2415 * fields of "fcode". As of the 2.6.32.4 kernel, at least,
2419 * If there is anything in "fcode" that is not initialized,
2438 if ((err = set_kernel_filter(handle, &fcode)) == 0)
2472 if (fcode.filter != NULL)
2473 free(fcode.filter);
3939 if (run_bpf && handle->fcode.bf_insns &&
3940 (bpf_filter(handle->fcode.bf_insns, bp,
5309 fix_program(pcap_t *handle, struct sock_fprog *fcode, int is_mmapped)
5321 prog_size = sizeof(*handle->fcode.bf_insns) * handle->fcode.bf_len;
5322 len = handle->fcode.bf_len;
5329 memcpy(f, handle->fcode.bf_insns, prog_size);
5330 fcode->len = len;
5331 fcode->filter = (struct sock_filter *) f;
5446 set_kernel_filter(pcap_t *handle, struct sock_fprog *fcode)
5521 fcode, sizeof(*fcode));