diff --git a/libbpf-tools/bindsnoop.c b/libbpf-tools/bindsnoop.c index cd120358c988..00cc834c97a0 100644 --- a/libbpf-tools/bindsnoop.c +++ b/libbpf-tools/bindsnoop.c @@ -168,9 +168,9 @@ static void handle_event(void *ctx, int cpu, void *data, __u32 data_sz) i++; } if (e->ver == 4) { - inet_ntop(AF_INET, &e->addr, addr, sizeof(addr)); + inet_ntop(AF_INET, e->addr, addr, sizeof(addr)); } else { - inet_ntop(AF_INET6, &e->addr, addr, sizeof(addr)); + inet_ntop(AF_INET6, e->addr, addr, sizeof(addr)); } printf("%-7d %-16s %-3d %-5s %-5s %-4d %-5d %-48s\n", e->pid, e->task, e->ret, proto, opts, e->bound_dev_if, e->port, addr); diff --git a/libbpf-tools/bindsnoop.h b/libbpf-tools/bindsnoop.h index fa7b19de0d49..855e62f338f3 100644 --- a/libbpf-tools/bindsnoop.h +++ b/libbpf-tools/bindsnoop.h @@ -5,7 +5,7 @@ #define TASK_COMM_LEN 16 struct bind_event { - unsigned __int128 addr; + __u8 addr[16]; __u64 ts_us; __u32 pid; __u32 bound_dev_if;