Lines Matching defs:fcode
326 static int fix_program(pcap_t *handle, struct sock_fprog *fcode);
328 static int set_kernel_filter(pcap_t *handle, struct sock_fprog *fcode);
4137 if (handlep->filter_in_userland && handle->fcode.bf_insns) {
4143 if (pcapint_filter_with_aux_data(handle->fcode.bf_insns,
4467 struct sock_fprog fcode;
4497 if (handle->fcode.bf_len > USHRT_MAX) {
4499 * fcode.len is an unsigned short for current kernel.
4505 fcode.len = 0;
4506 fcode.filter = NULL;
4525 switch (fix_program(handle, &fcode)) {
4555 * fields of "fcode". As of the 2.6.32.4 kernel, at least,
4559 * If there is anything in "fcode" that is not initialized,
4578 if ((err = set_kernel_filter(handle, &fcode)) == 0)
4632 if (fcode.filter != NULL)
4633 free(fcode.filter);
5409 fix_program(pcap_t *handle, struct sock_fprog *fcode)
5422 prog_size = sizeof(*handle->fcode.bf_insns) * handle->fcode.bf_len;
5423 len = handle->fcode.bf_len;
5430 memcpy(f, handle->fcode.bf_insns, prog_size);
5431 fcode->len = len;
5432 fcode->filter = (struct sock_filter *) f;
5563 set_kernel_filter(pcap_t *handle, struct sock_fprog *fcode)
5658 fcode, sizeof(*fcode));