]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - samples/bpf/sampleip_user.c
samples/bpf: Make samples more libbpf-centric
[mirror_ubuntu-zesty-kernel.git] / samples / bpf / sampleip_user.c
index 260a6bdd6413ecf2e24b434ce5c30ca137d37ca2..5ac5adf7593121adba8426a67974c54567f1969d 100644 (file)
@@ -95,8 +95,8 @@ static void print_ip_map(int fd)
 
        /* fetch IPs and counts */
        key = 0, i = 0;
-       while (bpf_get_next_key(fd, &key, &next_key) == 0) {
-               bpf_lookup_elem(fd, &next_key, &value);
+       while (bpf_map_get_next_key(fd, &key, &next_key) == 0) {
+               bpf_map_lookup_elem(fd, &next_key, &value);
                counts[i].ip = next_key;
                counts[i++].count = value;
                key = next_key;