D | device-monitor.c | 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() [all …]
|