Lines Matching refs:ins
629 static void bpf_stmt(struct sock_filter *ins, unsigned *i, in bpf_stmt() argument
631 ins[(*i)++] = (struct sock_filter) { in bpf_stmt()
637 static void bpf_jmp(struct sock_filter *ins, unsigned *i, in bpf_jmp() argument
640 ins[(*i)++] = (struct sock_filter) { in bpf_jmp()
649 struct sock_filter ins[512] = {}; in sd_device_monitor_filter_update() local
667 bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(monitor_netlink_header, magic)); in sd_device_monitor_filter_update()
669 bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, UDEV_MONITOR_MAGIC, 1, 0); in sd_device_monitor_filter_update()
671 bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); in sd_device_monitor_filter_update()
683 … bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(monitor_netlink_header, filter_tag_bloom_hi)); in sd_device_monitor_filter_update()
685 bpf_stmt(ins, &i, BPF_ALU|BPF_AND|BPF_K, tag_bloom_hi); in sd_device_monitor_filter_update()
687 bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, tag_bloom_hi, 0, 3); in sd_device_monitor_filter_update()
690 … bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(monitor_netlink_header, filter_tag_bloom_lo)); in sd_device_monitor_filter_update()
692 bpf_stmt(ins, &i, BPF_ALU|BPF_AND|BPF_K, tag_bloom_lo); in sd_device_monitor_filter_update()
695 … bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, tag_bloom_lo, 1 + (tag_matches * 6), 0); in sd_device_monitor_filter_update()
699 bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); in sd_device_monitor_filter_update()
708 … bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(monitor_netlink_header, filter_subsystem_hash)); in sd_device_monitor_filter_update()
711 bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); in sd_device_monitor_filter_update()
714 bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 3); in sd_device_monitor_filter_update()
716 … bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(monitor_netlink_header, filter_devtype_hash)); in sd_device_monitor_filter_update()
719 bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, hash, 0, 1); in sd_device_monitor_filter_update()
723 bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); in sd_device_monitor_filter_update()
725 if (i+1 >= ELEMENTSOF(ins)) in sd_device_monitor_filter_update()
730 bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); in sd_device_monitor_filter_update()
734 bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); in sd_device_monitor_filter_update()
739 .filter = ins, in sd_device_monitor_filter_update()