bpf: Implement link_query for bpf iterators