github.com/inspektor-gadget/inspektor-gadget@v0.28.1/pkg/gadgets/top/tcp/tracer/bpf/tcptop.h (about)

     1  /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
     2  #ifndef __TCPTOP_H
     3  #define __TCPTOP_H
     4  
     5  #define TASK_COMM_LEN 16
     6  #define IPV6_LEN 16
     7  
     8  struct ip_key_t {
     9  	__u8 saddr[IPV6_LEN];
    10  	__u8 daddr[IPV6_LEN];
    11  	__u64 mntnsid;
    12  	__u32 pid;
    13  	__u8 name[TASK_COMM_LEN];
    14  	__u16 lport;
    15  	__u16 dport;
    16  	__u16 family;
    17  };
    18  
    19  struct traffic_t {
    20  	size_t sent;
    21  	size_t received;
    22  };
    23  
    24  #endif /* __TCPTOP_H */