summaryrefslogtreecommitdiffstats
path: root/samples/bpf/sockex2_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/sockex2_user.c')
-rw-r--r--samples/bpf/sockex2_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/sockex2_user.c b/samples/bpf/sockex2_user.c
index 8a4085c..6a40600 100644
--- a/samples/bpf/sockex2_user.c
+++ b/samples/bpf/sockex2_user.c
@@ -39,8 +39,8 @@ int main(int ac, char **argv)
int key = 0, next_key;
struct pair value;
- while (bpf_get_next_key(map_fd[0], &key, &next_key) == 0) {
- bpf_lookup_elem(map_fd[0], &next_key, &value);
+ while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) {
+ bpf_map_lookup_elem(map_fd[0], &next_key, &value);
printf("ip %s bytes %lld packets %lld\n",
inet_ntoa((struct in_addr){htonl(next_key)}),
value.bytes, value.packets);
OpenPOWER on IntegriCloud