Lines Matching refs:bpf
545 int uml_vector_attach_bpf(int fd, void *bpf, int bpf_len) in uml_vector_attach_bpf() argument
547 int err = setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, bpf, bpf_len); in uml_vector_attach_bpf()
558 struct sock_filter *bpf; in uml_vector_default_bpf() local
566 bpf = uml_kmalloc( in uml_vector_default_bpf()
568 if (bpf != NULL) { in uml_vector_default_bpf()
569 bpf_prog.filter = bpf; in uml_vector_default_bpf()
571 bpf[0] = (struct sock_filter){ 0x20, 0, 0, 0x00000008 }; in uml_vector_default_bpf()
573 bpf[1] = (struct sock_filter){ 0x15, 0, 3, ntohl(*mac1)}; in uml_vector_default_bpf()
575 bpf[2] = (struct sock_filter){ 0x28, 0, 0, 0x00000006 }; in uml_vector_default_bpf()
577 bpf[3] = (struct sock_filter){ 0x15, 0, 1, ntohs(*mac2)}; in uml_vector_default_bpf()
579 bpf[4] = (struct sock_filter){ 0x6, 0, 0, 0x00000000 }; in uml_vector_default_bpf()
581 bpf[5] = (struct sock_filter){ 0x6, 0, 0, 0x00040000 }; in uml_vector_default_bpf()
584 kfree(bpf); in uml_vector_default_bpf()
585 bpf = NULL; in uml_vector_default_bpf()
588 return bpf; in uml_vector_default_bpf()