Lines Matching refs:bpf
663 int uml_vector_attach_bpf(int fd, void *bpf, int bpf_len) in uml_vector_attach_bpf() argument
665 int err = setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, bpf, bpf_len); in uml_vector_attach_bpf()
676 struct sock_filter *bpf; in uml_vector_default_bpf() local
684 bpf = uml_kmalloc( in uml_vector_default_bpf()
686 if (bpf != NULL) { in uml_vector_default_bpf()
687 bpf_prog.filter = bpf; in uml_vector_default_bpf()
689 bpf[0] = (struct sock_filter){ 0x20, 0, 0, 0x00000008 }; in uml_vector_default_bpf()
691 bpf[1] = (struct sock_filter){ 0x15, 0, 3, ntohl(*mac1)}; in uml_vector_default_bpf()
693 bpf[2] = (struct sock_filter){ 0x28, 0, 0, 0x00000006 }; in uml_vector_default_bpf()
695 bpf[3] = (struct sock_filter){ 0x15, 0, 1, ntohs(*mac2)}; in uml_vector_default_bpf()
697 bpf[4] = (struct sock_filter){ 0x6, 0, 0, 0x00000000 }; in uml_vector_default_bpf()
699 bpf[5] = (struct sock_filter){ 0x6, 0, 0, 0x00040000 }; in uml_vector_default_bpf()
702 kfree(bpf); in uml_vector_default_bpf()
703 bpf = NULL; in uml_vector_default_bpf()
706 return bpf; in uml_vector_default_bpf()