| 1 |
|
| 2 |
|
| 3 |
package sys |
| 4 |
|
| 5 |
import ( |
| 6 |
"structs" |
| 7 |
"unsafe" |
| 8 |
) |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
const ( |
| 13 |
BPF_ADJ_ROOM_ENCAP_L2_MASK = 255 |
| 14 |
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56 |
| 15 |
BPF_ANY = 0 |
| 16 |
BPF_CSUM_LEVEL_DEC = 2 |
| 17 |
BPF_CSUM_LEVEL_INC = 1 |
| 18 |
BPF_CSUM_LEVEL_QUERY = 0 |
| 19 |
BPF_CSUM_LEVEL_RESET = 3 |
| 20 |
BPF_EXIST = 2 |
| 21 |
BPF_FIB_LKUP_RET_BLACKHOLE = 1 |
| 22 |
BPF_FIB_LKUP_RET_FRAG_NEEDED = 8 |
| 23 |
BPF_FIB_LKUP_RET_FWD_DISABLED = 5 |
| 24 |
BPF_FIB_LKUP_RET_NOT_FWDED = 4 |
| 25 |
BPF_FIB_LKUP_RET_NO_NEIGH = 7 |
| 26 |
BPF_FIB_LKUP_RET_NO_SRC_ADDR = 9 |
| 27 |
BPF_FIB_LKUP_RET_PROHIBIT = 3 |
| 28 |
BPF_FIB_LKUP_RET_SUCCESS = 0 |
| 29 |
BPF_FIB_LKUP_RET_UNREACHABLE = 2 |
| 30 |
BPF_FIB_LKUP_RET_UNSUPP_LWT = 6 |
| 31 |
BPF_FIB_LOOKUP_DIRECT = 1 |
| 32 |
BPF_FIB_LOOKUP_MARK = 32 |
| 33 |
BPF_FIB_LOOKUP_OUTPUT = 2 |
| 34 |
BPF_FIB_LOOKUP_SKIP_NEIGH = 4 |
| 35 |
BPF_FIB_LOOKUP_SRC = 16 |
| 36 |
BPF_FIB_LOOKUP_TBID = 8 |
| 37 |
BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1 |
| 38 |
BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4 |
| 39 |
BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2 |
| 40 |
BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = 128 |
| 41 |
BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = 256 |
| 42 |
BPF_F_ADJ_ROOM_ENCAP_L2_ETH = 64 |
| 43 |
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 2 |
| 44 |
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 4 |
| 45 |
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 8 |
| 46 |
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 16 |
| 47 |
BPF_F_ADJ_ROOM_FIXED_GSO = 1 |
| 48 |
BPF_F_ADJ_ROOM_NO_CSUM_RESET = 32 |
| 49 |
BPF_F_ALL_CPUS = 16 |
| 50 |
BPF_F_BPRM_SECUREEXEC = 1 |
| 51 |
BPF_F_BROADCAST = 8 |
| 52 |
BPF_F_CLONE = 512 |
| 53 |
BPF_F_CPU = 8 |
| 54 |
BPF_F_CTXLEN_MASK = 4503595332403200 |
| 55 |
BPF_F_CURRENT_CPU = 4294967295 |
| 56 |
BPF_F_CURRENT_NETNS = 18446744073709551615 |
| 57 |
BPF_F_DONT_FRAGMENT = 4 |
| 58 |
BPF_F_EXCLUDE_INGRESS = 16 |
| 59 |
BPF_F_FAST_STACK_CMP = 512 |
| 60 |
BPF_F_GET_BRANCH_RECORDS_SIZE = 1 |
| 61 |
BPF_F_HDR_FIELD_MASK = 15 |
| 62 |
BPF_F_INDEX_MASK = 4294967295 |
| 63 |
BPF_F_INGRESS = 1 |
| 64 |
BPF_F_INNER_MAP = 4096 |
| 65 |
BPF_F_INVALIDATE_HASH = 2 |
| 66 |
BPF_F_IPV6 = 128 |
| 67 |
BPF_F_KPROBE_MULTI_RETURN = 1 |
| 68 |
BPF_F_LINK = 8192 |
| 69 |
BPF_F_LOCK = 4 |
| 70 |
BPF_F_MARK_ENFORCE = 64 |
| 71 |
BPF_F_MARK_MANGLED_0 = 32 |
| 72 |
BPF_F_MMAPABLE = 1024 |
| 73 |
BPF_F_NEIGH = 65536 |
| 74 |
BPF_F_NEXTHOP = 262144 |
| 75 |
BPF_F_NO_COMMON_LRU = 2 |
| 76 |
BPF_F_NO_PREALLOC = 1 |
| 77 |
BPF_F_NO_TUNNEL_KEY = 16 |
| 78 |
BPF_F_NO_USER_CONV = 262144 |
| 79 |
BPF_F_NUMA_NODE = 4 |
| 80 |
BPF_F_PATH_FD = 16384 |
| 81 |
BPF_F_PEER = 131072 |
| 82 |
BPF_F_PRESERVE_ELEMS = 2048 |
| 83 |
BPF_F_PSEUDO_HDR = 16 |
| 84 |
BPF_F_RB_OVERWRITE = 524288 |
| 85 |
BPF_F_RDONLY = 8 |
| 86 |
BPF_F_RDONLY_PROG = 128 |
| 87 |
BPF_F_RECOMPUTE_CSUM = 1 |
| 88 |
BPF_F_REUSE_STACKID = 1024 |
| 89 |
BPF_F_SEGV_ON_FAULT = 131072 |
| 90 |
BPF_F_SEQ_NUMBER = 8 |
| 91 |
BPF_F_SKIP_FIELD_MASK = 255 |
| 92 |
BPF_F_STACK_BUILD_ID = 32 |
| 93 |
BPF_F_SYSCTL_BASE_NAME = 1 |
| 94 |
BPF_F_TIMER_ABS = 1 |
| 95 |
BPF_F_TIMER_CPU_PIN = 2 |
| 96 |
BPF_F_TOKEN_FD = 65536 |
| 97 |
BPF_F_TUNINFO_FLAGS = 16 |
| 98 |
BPF_F_TUNINFO_IPV6 = 1 |
| 99 |
BPF_F_UPROBE_MULTI_RETURN = 1 |
| 100 |
BPF_F_USER_BUILD_ID = 2048 |
| 101 |
BPF_F_USER_STACK = 256 |
| 102 |
BPF_F_VTYPE_BTF_OBJ_FD = 32768 |
| 103 |
BPF_F_WRONLY = 16 |
| 104 |
BPF_F_WRONLY_PROG = 256 |
| 105 |
BPF_F_ZERO_CSUM_TX = 2 |
| 106 |
BPF_F_ZERO_SEED = 64 |
| 107 |
BPF_LOAD_HDR_OPT_TCP_SYN = 1 |
| 108 |
BPF_LOCAL_STORAGE_GET_F_CREATE = 1 |
| 109 |
BPF_MAX_LOOPS = 8388608 |
| 110 |
BPF_MAX_TIMED_LOOPS = 65535 |
| 111 |
BPF_MAX_TRAMP_LINKS = 38 |
| 112 |
BPF_NOEXIST = 1 |
| 113 |
BPF_RB_AVAIL_DATA = 0 |
| 114 |
BPF_RB_CONS_POS = 2 |
| 115 |
BPF_RB_FORCE_WAKEUP = 2 |
| 116 |
BPF_RB_NO_WAKEUP = 1 |
| 117 |
BPF_RB_OVERWRITE_POS = 4 |
| 118 |
BPF_RB_PROD_POS = 3 |
| 119 |
BPF_RB_RING_SIZE = 1 |
| 120 |
BPF_REG_0 = 0 |
| 121 |
BPF_REG_1 = 1 |
| 122 |
BPF_REG_10 = 10 |
| 123 |
BPF_REG_2 = 2 |
| 124 |
BPF_REG_3 = 3 |
| 125 |
BPF_REG_4 = 4 |
| 126 |
BPF_REG_5 = 5 |
| 127 |
BPF_REG_6 = 6 |
| 128 |
BPF_REG_7 = 7 |
| 129 |
BPF_REG_8 = 8 |
| 130 |
BPF_REG_9 = 9 |
| 131 |
BPF_RINGBUF_BUSY_BIT = 2147483648 |
| 132 |
BPF_RINGBUF_DISCARD_BIT = 1073741824 |
| 133 |
BPF_RINGBUF_HDR_SZ = 8 |
| 134 |
BPF_SKB_CLOCK_MONOTONIC = 1 |
| 135 |
BPF_SKB_CLOCK_REALTIME = 0 |
| 136 |
BPF_SKB_CLOCK_TAI = 2 |
| 137 |
BPF_SKB_TSTAMP_DELIVERY_MONO = 1 |
| 138 |
BPF_SKB_TSTAMP_UNSPEC = 0 |
| 139 |
BPF_SK_LOOKUP_F_NO_REUSEPORT = 2 |
| 140 |
BPF_SK_LOOKUP_F_REPLACE = 1 |
| 141 |
BPF_SK_STORAGE_GET_F_CREATE = 1 |
| 142 |
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4 |
| 143 |
BPF_SOCK_OPS_ALL_CB_FLAGS = 127 |
| 144 |
BPF_SOCK_OPS_BASE_RTT = 7 |
| 145 |
BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14 |
| 146 |
BPF_SOCK_OPS_NEEDS_ECN = 6 |
| 147 |
BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16 |
| 148 |
BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13 |
| 149 |
BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32 |
| 150 |
BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5 |
| 151 |
BPF_SOCK_OPS_RETRANS_CB = 9 |
| 152 |
BPF_SOCK_OPS_RETRANS_CB_FLAG = 2 |
| 153 |
BPF_SOCK_OPS_RTO_CB = 8 |
| 154 |
BPF_SOCK_OPS_RTO_CB_FLAG = 1 |
| 155 |
BPF_SOCK_OPS_RTT_CB = 12 |
| 156 |
BPF_SOCK_OPS_RTT_CB_FLAG = 8 |
| 157 |
BPF_SOCK_OPS_RWND_INIT = 2 |
| 158 |
BPF_SOCK_OPS_STATE_CB = 10 |
| 159 |
BPF_SOCK_OPS_STATE_CB_FLAG = 4 |
| 160 |
BPF_SOCK_OPS_TCP_CONNECT_CB = 3 |
| 161 |
BPF_SOCK_OPS_TCP_LISTEN_CB = 11 |
| 162 |
BPF_SOCK_OPS_TIMEOUT_INIT = 1 |
| 163 |
BPF_SOCK_OPS_TSTAMP_ACK_CB = 19 |
| 164 |
BPF_SOCK_OPS_TSTAMP_SCHED_CB = 16 |
| 165 |
BPF_SOCK_OPS_TSTAMP_SENDMSG_CB = 20 |
| 166 |
BPF_SOCK_OPS_TSTAMP_SND_HW_CB = 18 |
| 167 |
BPF_SOCK_OPS_TSTAMP_SND_SW_CB = 17 |
| 168 |
BPF_SOCK_OPS_VOID = 0 |
| 169 |
BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15 |
| 170 |
BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64 |
| 171 |
BPF_STREAM_MAX_CAPACITY = 100000 |
| 172 |
BPF_TASK_ITER_ALL_PROCS = 0 |
| 173 |
BPF_TASK_ITER_ALL_THREADS = 1 |
| 174 |
BPF_TASK_ITER_PROC_THREADS = 2 |
| 175 |
BPF_TCP_BOUND_INACTIVE = 13 |
| 176 |
BPF_TCP_CLOSE = 7 |
| 177 |
BPF_TCP_CLOSE_WAIT = 8 |
| 178 |
BPF_TCP_CLOSING = 11 |
| 179 |
BPF_TCP_ESTABLISHED = 1 |
| 180 |
BPF_TCP_FIN_WAIT1 = 4 |
| 181 |
BPF_TCP_FIN_WAIT2 = 5 |
| 182 |
BPF_TCP_LAST_ACK = 9 |
| 183 |
BPF_TCP_LISTEN = 10 |
| 184 |
BPF_TCP_MAX_STATES = 14 |
| 185 |
BPF_TCP_NEW_SYN_RECV = 12 |
| 186 |
BPF_TCP_SYN_RECV = 3 |
| 187 |
BPF_TCP_SYN_SENT = 2 |
| 188 |
BPF_TCP_TIME_WAIT = 6 |
| 189 |
BPF_WRITE_HDR_TCP_CURRENT_MSS = 1 |
| 190 |
BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2 |
| 191 |
BPF_XFRM_STATE_OPTS_SZ = 36 |
| 192 |
) |
| 193 |
|
| 194 |
type AdjRoomMode uint32 |
| 195 |
|
| 196 |
const ( |
| 197 |
BPF_ADJ_ROOM_NET AdjRoomMode = 0 |
| 198 |
BPF_ADJ_ROOM_MAC AdjRoomMode = 1 |
| 199 |
) |
| 200 |
|
| 201 |
type AttachType uint32 |
| 202 |
|
| 203 |
const ( |
| 204 |
BPF_CGROUP_INET_INGRESS AttachType = 0 |
| 205 |
BPF_CGROUP_INET_EGRESS AttachType = 1 |
| 206 |
BPF_CGROUP_INET_SOCK_CREATE AttachType = 2 |
| 207 |
BPF_CGROUP_SOCK_OPS AttachType = 3 |
| 208 |
BPF_SK_SKB_STREAM_PARSER AttachType = 4 |
| 209 |
BPF_SK_SKB_STREAM_VERDICT AttachType = 5 |
| 210 |
BPF_CGROUP_DEVICE AttachType = 6 |
| 211 |
BPF_SK_MSG_VERDICT AttachType = 7 |
| 212 |
BPF_CGROUP_INET4_BIND AttachType = 8 |
| 213 |
BPF_CGROUP_INET6_BIND AttachType = 9 |
| 214 |
BPF_CGROUP_INET4_CONNECT AttachType = 10 |
| 215 |
BPF_CGROUP_INET6_CONNECT AttachType = 11 |
| 216 |
BPF_CGROUP_INET4_POST_BIND AttachType = 12 |
| 217 |
BPF_CGROUP_INET6_POST_BIND AttachType = 13 |
| 218 |
BPF_CGROUP_UDP4_SENDMSG AttachType = 14 |
| 219 |
BPF_CGROUP_UDP6_SENDMSG AttachType = 15 |
| 220 |
BPF_LIRC_MODE2 AttachType = 16 |
| 221 |
BPF_FLOW_DISSECTOR AttachType = 17 |
| 222 |
BPF_CGROUP_SYSCTL AttachType = 18 |
| 223 |
BPF_CGROUP_UDP4_RECVMSG AttachType = 19 |
| 224 |
BPF_CGROUP_UDP6_RECVMSG AttachType = 20 |
| 225 |
BPF_CGROUP_GETSOCKOPT AttachType = 21 |
| 226 |
BPF_CGROUP_SETSOCKOPT AttachType = 22 |
| 227 |
BPF_TRACE_RAW_TP AttachType = 23 |
| 228 |
BPF_TRACE_FENTRY AttachType = 24 |
| 229 |
BPF_TRACE_FEXIT AttachType = 25 |
| 230 |
BPF_MODIFY_RETURN AttachType = 26 |
| 231 |
BPF_LSM_MAC AttachType = 27 |
| 232 |
BPF_TRACE_ITER AttachType = 28 |
| 233 |
BPF_CGROUP_INET4_GETPEERNAME AttachType = 29 |
| 234 |
BPF_CGROUP_INET6_GETPEERNAME AttachType = 30 |
| 235 |
BPF_CGROUP_INET4_GETSOCKNAME AttachType = 31 |
| 236 |
BPF_CGROUP_INET6_GETSOCKNAME AttachType = 32 |
| 237 |
BPF_XDP_DEVMAP AttachType = 33 |
| 238 |
BPF_CGROUP_INET_SOCK_RELEASE AttachType = 34 |
| 239 |
BPF_XDP_CPUMAP AttachType = 35 |
| 240 |
BPF_SK_LOOKUP AttachType = 36 |
| 241 |
BPF_XDP AttachType = 37 |
| 242 |
BPF_SK_SKB_VERDICT AttachType = 38 |
| 243 |
BPF_SK_REUSEPORT_SELECT AttachType = 39 |
| 244 |
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE AttachType = 40 |
| 245 |
BPF_PERF_EVENT AttachType = 41 |
| 246 |
BPF_TRACE_KPROBE_MULTI AttachType = 42 |
| 247 |
BPF_LSM_CGROUP AttachType = 43 |
| 248 |
BPF_STRUCT_OPS AttachType = 44 |
| 249 |
BPF_NETFILTER AttachType = 45 |
| 250 |
BPF_TCX_INGRESS AttachType = 46 |
| 251 |
BPF_TCX_EGRESS AttachType = 47 |
| 252 |
BPF_TRACE_UPROBE_MULTI AttachType = 48 |
| 253 |
BPF_CGROUP_UNIX_CONNECT AttachType = 49 |
| 254 |
BPF_CGROUP_UNIX_SENDMSG AttachType = 50 |
| 255 |
BPF_CGROUP_UNIX_RECVMSG AttachType = 51 |
| 256 |
BPF_CGROUP_UNIX_GETPEERNAME AttachType = 52 |
| 257 |
BPF_CGROUP_UNIX_GETSOCKNAME AttachType = 53 |
| 258 |
BPF_NETKIT_PRIMARY AttachType = 54 |
| 259 |
BPF_NETKIT_PEER AttachType = 55 |
| 260 |
BPF_TRACE_KPROBE_SESSION AttachType = 56 |
| 261 |
BPF_TRACE_UPROBE_SESSION AttachType = 57 |
| 262 |
BPF_TRACE_FSESSION AttachType = 58 |
| 263 |
__MAX_BPF_ATTACH_TYPE AttachType = 59 |
| 264 |
) |
| 265 |
|
| 266 |
type Cmd uint32 |
| 267 |
|
| 268 |
const ( |
| 269 |
BPF_MAP_CREATE Cmd = 0 |
| 270 |
BPF_MAP_LOOKUP_ELEM Cmd = 1 |
| 271 |
BPF_MAP_UPDATE_ELEM Cmd = 2 |
| 272 |
BPF_MAP_DELETE_ELEM Cmd = 3 |
| 273 |
BPF_MAP_GET_NEXT_KEY Cmd = 4 |
| 274 |
BPF_PROG_LOAD Cmd = 5 |
| 275 |
BPF_OBJ_PIN Cmd = 6 |
| 276 |
BPF_OBJ_GET Cmd = 7 |
| 277 |
BPF_PROG_ATTACH Cmd = 8 |
| 278 |
BPF_PROG_DETACH Cmd = 9 |
| 279 |
BPF_PROG_TEST_RUN Cmd = 10 |
| 280 |
BPF_PROG_RUN Cmd = 10 |
| 281 |
BPF_PROG_GET_NEXT_ID Cmd = 11 |
| 282 |
BPF_MAP_GET_NEXT_ID Cmd = 12 |
| 283 |
BPF_PROG_GET_FD_BY_ID Cmd = 13 |
| 284 |
BPF_MAP_GET_FD_BY_ID Cmd = 14 |
| 285 |
BPF_OBJ_GET_INFO_BY_FD Cmd = 15 |
| 286 |
BPF_PROG_QUERY Cmd = 16 |
| 287 |
BPF_RAW_TRACEPOINT_OPEN Cmd = 17 |
| 288 |
BPF_BTF_LOAD Cmd = 18 |
| 289 |
BPF_BTF_GET_FD_BY_ID Cmd = 19 |
| 290 |
BPF_TASK_FD_QUERY Cmd = 20 |
| 291 |
BPF_MAP_LOOKUP_AND_DELETE_ELEM Cmd = 21 |
| 292 |
BPF_MAP_FREEZE Cmd = 22 |
| 293 |
BPF_BTF_GET_NEXT_ID Cmd = 23 |
| 294 |
BPF_MAP_LOOKUP_BATCH Cmd = 24 |
| 295 |
BPF_MAP_LOOKUP_AND_DELETE_BATCH Cmd = 25 |
| 296 |
BPF_MAP_UPDATE_BATCH Cmd = 26 |
| 297 |
BPF_MAP_DELETE_BATCH Cmd = 27 |
| 298 |
BPF_LINK_CREATE Cmd = 28 |
| 299 |
BPF_LINK_UPDATE Cmd = 29 |
| 300 |
BPF_LINK_GET_FD_BY_ID Cmd = 30 |
| 301 |
BPF_LINK_GET_NEXT_ID Cmd = 31 |
| 302 |
BPF_ENABLE_STATS Cmd = 32 |
| 303 |
BPF_ITER_CREATE Cmd = 33 |
| 304 |
BPF_LINK_DETACH Cmd = 34 |
| 305 |
BPF_PROG_BIND_MAP Cmd = 35 |
| 306 |
BPF_TOKEN_CREATE Cmd = 36 |
| 307 |
BPF_PROG_STREAM_READ_BY_FD Cmd = 37 |
| 308 |
BPF_PROG_ASSOC_STRUCT_OPS Cmd = 38 |
| 309 |
__MAX_BPF_CMD Cmd = 39 |
| 310 |
) |
| 311 |
|
| 312 |
type FunctionId uint32 |
| 313 |
|
| 314 |
const ( |
| 315 |
BPF_FUNC_unspec FunctionId = 0 |
| 316 |
BPF_FUNC_map_lookup_elem FunctionId = 1 |
| 317 |
BPF_FUNC_map_update_elem FunctionId = 2 |
| 318 |
BPF_FUNC_map_delete_elem FunctionId = 3 |
| 319 |
BPF_FUNC_probe_read FunctionId = 4 |
| 320 |
BPF_FUNC_ktime_get_ns FunctionId = 5 |
| 321 |
BPF_FUNC_trace_printk FunctionId = 6 |
| 322 |
BPF_FUNC_get_prandom_u32 FunctionId = 7 |
| 323 |
BPF_FUNC_get_smp_processor_id FunctionId = 8 |
| 324 |
BPF_FUNC_skb_store_bytes FunctionId = 9 |
| 325 |
BPF_FUNC_l3_csum_replace FunctionId = 10 |
| 326 |
BPF_FUNC_l4_csum_replace FunctionId = 11 |
| 327 |
BPF_FUNC_tail_call FunctionId = 12 |
| 328 |
BPF_FUNC_clone_redirect FunctionId = 13 |
| 329 |
BPF_FUNC_get_current_pid_tgid FunctionId = 14 |
| 330 |
BPF_FUNC_get_current_uid_gid FunctionId = 15 |
| 331 |
BPF_FUNC_get_current_comm FunctionId = 16 |
| 332 |
BPF_FUNC_get_cgroup_classid FunctionId = 17 |
| 333 |
BPF_FUNC_skb_vlan_push FunctionId = 18 |
| 334 |
BPF_FUNC_skb_vlan_pop FunctionId = 19 |
| 335 |
BPF_FUNC_skb_get_tunnel_key FunctionId = 20 |
| 336 |
BPF_FUNC_skb_set_tunnel_key FunctionId = 21 |
| 337 |
BPF_FUNC_perf_event_read FunctionId = 22 |
| 338 |
BPF_FUNC_redirect FunctionId = 23 |
| 339 |
BPF_FUNC_get_route_realm FunctionId = 24 |
| 340 |
BPF_FUNC_perf_event_output FunctionId = 25 |
| 341 |
BPF_FUNC_skb_load_bytes FunctionId = 26 |
| 342 |
BPF_FUNC_get_stackid FunctionId = 27 |
| 343 |
BPF_FUNC_csum_diff FunctionId = 28 |
| 344 |
BPF_FUNC_skb_get_tunnel_opt FunctionId = 29 |
| 345 |
BPF_FUNC_skb_set_tunnel_opt FunctionId = 30 |
| 346 |
BPF_FUNC_skb_change_proto FunctionId = 31 |
| 347 |
BPF_FUNC_skb_change_type FunctionId = 32 |
| 348 |
BPF_FUNC_skb_under_cgroup FunctionId = 33 |
| 349 |
BPF_FUNC_get_hash_recalc FunctionId = 34 |
| 350 |
BPF_FUNC_get_current_task FunctionId = 35 |
| 351 |
BPF_FUNC_probe_write_user FunctionId = 36 |
| 352 |
BPF_FUNC_current_task_under_cgroup FunctionId = 37 |
| 353 |
BPF_FUNC_skb_change_tail FunctionId = 38 |
| 354 |
BPF_FUNC_skb_pull_data FunctionId = 39 |
| 355 |
BPF_FUNC_csum_update FunctionId = 40 |
| 356 |
BPF_FUNC_set_hash_invalid FunctionId = 41 |
| 357 |
BPF_FUNC_get_numa_node_id FunctionId = 42 |
| 358 |
BPF_FUNC_skb_change_head FunctionId = 43 |
| 359 |
BPF_FUNC_xdp_adjust_head FunctionId = 44 |
| 360 |
BPF_FUNC_probe_read_str FunctionId = 45 |
| 361 |
BPF_FUNC_get_socket_cookie FunctionId = 46 |
| 362 |
BPF_FUNC_get_socket_uid FunctionId = 47 |
| 363 |
BPF_FUNC_set_hash FunctionId = 48 |
| 364 |
BPF_FUNC_setsockopt FunctionId = 49 |
| 365 |
BPF_FUNC_skb_adjust_room FunctionId = 50 |
| 366 |
BPF_FUNC_redirect_map FunctionId = 51 |
| 367 |
BPF_FUNC_sk_redirect_map FunctionId = 52 |
| 368 |
BPF_FUNC_sock_map_update FunctionId = 53 |
| 369 |
BPF_FUNC_xdp_adjust_meta FunctionId = 54 |
| 370 |
BPF_FUNC_perf_event_read_value FunctionId = 55 |
| 371 |
BPF_FUNC_perf_prog_read_value FunctionId = 56 |
| 372 |
BPF_FUNC_getsockopt FunctionId = 57 |
| 373 |
BPF_FUNC_override_return FunctionId = 58 |
| 374 |
BPF_FUNC_sock_ops_cb_flags_set FunctionId = 59 |
| 375 |
BPF_FUNC_msg_redirect_map FunctionId = 60 |
| 376 |
BPF_FUNC_msg_apply_bytes FunctionId = 61 |
| 377 |
BPF_FUNC_msg_cork_bytes FunctionId = 62 |
| 378 |
BPF_FUNC_msg_pull_data FunctionId = 63 |
| 379 |
BPF_FUNC_bind FunctionId = 64 |
| 380 |
BPF_FUNC_xdp_adjust_tail FunctionId = 65 |
| 381 |
BPF_FUNC_skb_get_xfrm_state FunctionId = 66 |
| 382 |
BPF_FUNC_get_stack FunctionId = 67 |
| 383 |
BPF_FUNC_skb_load_bytes_relative FunctionId = 68 |
| 384 |
BPF_FUNC_fib_lookup FunctionId = 69 |
| 385 |
BPF_FUNC_sock_hash_update FunctionId = 70 |
| 386 |
BPF_FUNC_msg_redirect_hash FunctionId = 71 |
| 387 |
BPF_FUNC_sk_redirect_hash FunctionId = 72 |
| 388 |
BPF_FUNC_lwt_push_encap FunctionId = 73 |
| 389 |
BPF_FUNC_lwt_seg6_store_bytes FunctionId = 74 |
| 390 |
BPF_FUNC_lwt_seg6_adjust_srh FunctionId = 75 |
| 391 |
BPF_FUNC_lwt_seg6_action FunctionId = 76 |
| 392 |
BPF_FUNC_rc_repeat FunctionId = 77 |
| 393 |
BPF_FUNC_rc_keydown FunctionId = 78 |
| 394 |
BPF_FUNC_skb_cgroup_id FunctionId = 79 |
| 395 |
BPF_FUNC_get_current_cgroup_id FunctionId = 80 |
| 396 |
BPF_FUNC_get_local_storage FunctionId = 81 |
| 397 |
BPF_FUNC_sk_select_reuseport FunctionId = 82 |
| 398 |
BPF_FUNC_skb_ancestor_cgroup_id FunctionId = 83 |
| 399 |
BPF_FUNC_sk_lookup_tcp FunctionId = 84 |
| 400 |
BPF_FUNC_sk_lookup_udp FunctionId = 85 |
| 401 |
BPF_FUNC_sk_release FunctionId = 86 |
| 402 |
BPF_FUNC_map_push_elem FunctionId = 87 |
| 403 |
BPF_FUNC_map_pop_elem FunctionId = 88 |
| 404 |
BPF_FUNC_map_peek_elem FunctionId = 89 |
| 405 |
BPF_FUNC_msg_push_data FunctionId = 90 |
| 406 |
BPF_FUNC_msg_pop_data FunctionId = 91 |
| 407 |
BPF_FUNC_rc_pointer_rel FunctionId = 92 |
| 408 |
BPF_FUNC_spin_lock FunctionId = 93 |
| 409 |
BPF_FUNC_spin_unlock FunctionId = 94 |
| 410 |
BPF_FUNC_sk_fullsock FunctionId = 95 |
| 411 |
BPF_FUNC_tcp_sock FunctionId = 96 |
| 412 |
BPF_FUNC_skb_ecn_set_ce FunctionId = 97 |
| 413 |
BPF_FUNC_get_listener_sock FunctionId = 98 |
| 414 |
BPF_FUNC_skc_lookup_tcp FunctionId = 99 |
| 415 |
BPF_FUNC_tcp_check_syncookie FunctionId = 100 |
| 416 |
BPF_FUNC_sysctl_get_name FunctionId = 101 |
| 417 |
BPF_FUNC_sysctl_get_current_value FunctionId = 102 |
| 418 |
BPF_FUNC_sysctl_get_new_value FunctionId = 103 |
| 419 |
BPF_FUNC_sysctl_set_new_value FunctionId = 104 |
| 420 |
BPF_FUNC_strtol FunctionId = 105 |
| 421 |
BPF_FUNC_strtoul FunctionId = 106 |
| 422 |
BPF_FUNC_sk_storage_get FunctionId = 107 |
| 423 |
BPF_FUNC_sk_storage_delete FunctionId = 108 |
| 424 |
BPF_FUNC_send_signal FunctionId = 109 |
| 425 |
BPF_FUNC_tcp_gen_syncookie FunctionId = 110 |
| 426 |
BPF_FUNC_skb_output FunctionId = 111 |
| 427 |
BPF_FUNC_probe_read_user FunctionId = 112 |
| 428 |
BPF_FUNC_probe_read_kernel FunctionId = 113 |
| 429 |
BPF_FUNC_probe_read_user_str FunctionId = 114 |
| 430 |
BPF_FUNC_probe_read_kernel_str FunctionId = 115 |
| 431 |
BPF_FUNC_tcp_send_ack FunctionId = 116 |
| 432 |
BPF_FUNC_send_signal_thread FunctionId = 117 |
| 433 |
BPF_FUNC_jiffies64 FunctionId = 118 |
| 434 |
BPF_FUNC_read_branch_records FunctionId = 119 |
| 435 |
BPF_FUNC_get_ns_current_pid_tgid FunctionId = 120 |
| 436 |
BPF_FUNC_xdp_output FunctionId = 121 |
| 437 |
BPF_FUNC_get_netns_cookie FunctionId = 122 |
| 438 |
BPF_FUNC_get_current_ancestor_cgroup_id FunctionId = 123 |
| 439 |
BPF_FUNC_sk_assign FunctionId = 124 |
| 440 |
BPF_FUNC_ktime_get_boot_ns FunctionId = 125 |
| 441 |
BPF_FUNC_seq_printf FunctionId = 126 |
| 442 |
BPF_FUNC_seq_write FunctionId = 127 |
| 443 |
BPF_FUNC_sk_cgroup_id FunctionId = 128 |
| 444 |
BPF_FUNC_sk_ancestor_cgroup_id FunctionId = 129 |
| 445 |
BPF_FUNC_ringbuf_output FunctionId = 130 |
| 446 |
BPF_FUNC_ringbuf_reserve FunctionId = 131 |
| 447 |
BPF_FUNC_ringbuf_submit FunctionId = 132 |
| 448 |
BPF_FUNC_ringbuf_discard FunctionId = 133 |
| 449 |
BPF_FUNC_ringbuf_query FunctionId = 134 |
| 450 |
BPF_FUNC_csum_level FunctionId = 135 |
| 451 |
BPF_FUNC_skc_to_tcp6_sock FunctionId = 136 |
| 452 |
BPF_FUNC_skc_to_tcp_sock FunctionId = 137 |
| 453 |
BPF_FUNC_skc_to_tcp_timewait_sock FunctionId = 138 |
| 454 |
BPF_FUNC_skc_to_tcp_request_sock FunctionId = 139 |
| 455 |
BPF_FUNC_skc_to_udp6_sock FunctionId = 140 |
| 456 |
BPF_FUNC_get_task_stack FunctionId = 141 |
| 457 |
BPF_FUNC_load_hdr_opt FunctionId = 142 |
| 458 |
BPF_FUNC_store_hdr_opt FunctionId = 143 |
| 459 |
BPF_FUNC_reserve_hdr_opt FunctionId = 144 |
| 460 |
BPF_FUNC_inode_storage_get FunctionId = 145 |
| 461 |
BPF_FUNC_inode_storage_delete FunctionId = 146 |
| 462 |
BPF_FUNC_d_path FunctionId = 147 |
| 463 |
BPF_FUNC_copy_from_user FunctionId = 148 |
| 464 |
BPF_FUNC_snprintf_btf FunctionId = 149 |
| 465 |
BPF_FUNC_seq_printf_btf FunctionId = 150 |
| 466 |
BPF_FUNC_skb_cgroup_classid FunctionId = 151 |
| 467 |
BPF_FUNC_redirect_neigh FunctionId = 152 |
| 468 |
BPF_FUNC_per_cpu_ptr FunctionId = 153 |
| 469 |
BPF_FUNC_this_cpu_ptr FunctionId = 154 |
| 470 |
BPF_FUNC_redirect_peer FunctionId = 155 |
| 471 |
BPF_FUNC_task_storage_get FunctionId = 156 |
| 472 |
BPF_FUNC_task_storage_delete FunctionId = 157 |
| 473 |
BPF_FUNC_get_current_task_btf FunctionId = 158 |
| 474 |
BPF_FUNC_bprm_opts_set FunctionId = 159 |
| 475 |
BPF_FUNC_ktime_get_coarse_ns FunctionId = 160 |
| 476 |
BPF_FUNC_ima_inode_hash FunctionId = 161 |
| 477 |
BPF_FUNC_sock_from_file FunctionId = 162 |
| 478 |
BPF_FUNC_check_mtu FunctionId = 163 |
| 479 |
BPF_FUNC_for_each_map_elem FunctionId = 164 |
| 480 |
BPF_FUNC_snprintf FunctionId = 165 |
| 481 |
BPF_FUNC_sys_bpf FunctionId = 166 |
| 482 |
BPF_FUNC_btf_find_by_name_kind FunctionId = 167 |
| 483 |
BPF_FUNC_sys_close FunctionId = 168 |
| 484 |
BPF_FUNC_timer_init FunctionId = 169 |
| 485 |
BPF_FUNC_timer_set_callback FunctionId = 170 |
| 486 |
BPF_FUNC_timer_start FunctionId = 171 |
| 487 |
BPF_FUNC_timer_cancel FunctionId = 172 |
| 488 |
BPF_FUNC_get_func_ip FunctionId = 173 |
| 489 |
BPF_FUNC_get_attach_cookie FunctionId = 174 |
| 490 |
BPF_FUNC_task_pt_regs FunctionId = 175 |
| 491 |
BPF_FUNC_get_branch_snapshot FunctionId = 176 |
| 492 |
BPF_FUNC_trace_vprintk FunctionId = 177 |
| 493 |
BPF_FUNC_skc_to_unix_sock FunctionId = 178 |
| 494 |
BPF_FUNC_kallsyms_lookup_name FunctionId = 179 |
| 495 |
BPF_FUNC_find_vma FunctionId = 180 |
| 496 |
BPF_FUNC_loop FunctionId = 181 |
| 497 |
BPF_FUNC_strncmp FunctionId = 182 |
| 498 |
BPF_FUNC_get_func_arg FunctionId = 183 |
| 499 |
BPF_FUNC_get_func_ret FunctionId = 184 |
| 500 |
BPF_FUNC_get_func_arg_cnt FunctionId = 185 |
| 501 |
BPF_FUNC_get_retval FunctionId = 186 |
| 502 |
BPF_FUNC_set_retval FunctionId = 187 |
| 503 |
BPF_FUNC_xdp_get_buff_len FunctionId = 188 |
| 504 |
BPF_FUNC_xdp_load_bytes FunctionId = 189 |
| 505 |
BPF_FUNC_xdp_store_bytes FunctionId = 190 |
| 506 |
BPF_FUNC_copy_from_user_task FunctionId = 191 |
| 507 |
BPF_FUNC_skb_set_tstamp FunctionId = 192 |
| 508 |
BPF_FUNC_ima_file_hash FunctionId = 193 |
| 509 |
BPF_FUNC_kptr_xchg FunctionId = 194 |
| 510 |
BPF_FUNC_map_lookup_percpu_elem FunctionId = 195 |
| 511 |
BPF_FUNC_skc_to_mptcp_sock FunctionId = 196 |
| 512 |
BPF_FUNC_dynptr_from_mem FunctionId = 197 |
| 513 |
BPF_FUNC_ringbuf_reserve_dynptr FunctionId = 198 |
| 514 |
BPF_FUNC_ringbuf_submit_dynptr FunctionId = 199 |
| 515 |
BPF_FUNC_ringbuf_discard_dynptr FunctionId = 200 |
| 516 |
BPF_FUNC_dynptr_read FunctionId = 201 |
| 517 |
BPF_FUNC_dynptr_write FunctionId = 202 |
| 518 |
BPF_FUNC_dynptr_data FunctionId = 203 |
| 519 |
BPF_FUNC_tcp_raw_gen_syncookie_ipv4 FunctionId = 204 |
| 520 |
BPF_FUNC_tcp_raw_gen_syncookie_ipv6 FunctionId = 205 |
| 521 |
BPF_FUNC_tcp_raw_check_syncookie_ipv4 FunctionId = 206 |
| 522 |
BPF_FUNC_tcp_raw_check_syncookie_ipv6 FunctionId = 207 |
| 523 |
BPF_FUNC_ktime_get_tai_ns FunctionId = 208 |
| 524 |
BPF_FUNC_user_ringbuf_drain FunctionId = 209 |
| 525 |
BPF_FUNC_cgrp_storage_get FunctionId = 210 |
| 526 |
BPF_FUNC_cgrp_storage_delete FunctionId = 211 |
| 527 |
__BPF_FUNC_MAX_ID FunctionId = 212 |
| 528 |
) |
| 529 |
|
| 530 |
type HdrStartOff uint32 |
| 531 |
|
| 532 |
const ( |
| 533 |
BPF_HDR_START_MAC HdrStartOff = 0 |
| 534 |
BPF_HDR_START_NET HdrStartOff = 1 |
| 535 |
) |
| 536 |
|
| 537 |
type LinkType uint32 |
| 538 |
|
| 539 |
const ( |
| 540 |
BPF_LINK_TYPE_UNSPEC LinkType = 0 |
| 541 |
BPF_LINK_TYPE_RAW_TRACEPOINT LinkType = 1 |
| 542 |
BPF_LINK_TYPE_TRACING LinkType = 2 |
| 543 |
BPF_LINK_TYPE_CGROUP LinkType = 3 |
| 544 |
BPF_LINK_TYPE_ITER LinkType = 4 |
| 545 |
BPF_LINK_TYPE_NETNS LinkType = 5 |
| 546 |
BPF_LINK_TYPE_XDP LinkType = 6 |
| 547 |
BPF_LINK_TYPE_PERF_EVENT LinkType = 7 |
| 548 |
BPF_LINK_TYPE_KPROBE_MULTI LinkType = 8 |
| 549 |
BPF_LINK_TYPE_STRUCT_OPS LinkType = 9 |
| 550 |
BPF_LINK_TYPE_NETFILTER LinkType = 10 |
| 551 |
BPF_LINK_TYPE_TCX LinkType = 11 |
| 552 |
BPF_LINK_TYPE_UPROBE_MULTI LinkType = 12 |
| 553 |
BPF_LINK_TYPE_NETKIT LinkType = 13 |
| 554 |
BPF_LINK_TYPE_SOCKMAP LinkType = 14 |
| 555 |
__MAX_BPF_LINK_TYPE LinkType = 15 |
| 556 |
) |
| 557 |
|
| 558 |
type MapType uint32 |
| 559 |
|
| 560 |
const ( |
| 561 |
BPF_MAP_TYPE_UNSPEC MapType = 0 |
| 562 |
BPF_MAP_TYPE_HASH MapType = 1 |
| 563 |
BPF_MAP_TYPE_ARRAY MapType = 2 |
| 564 |
BPF_MAP_TYPE_PROG_ARRAY MapType = 3 |
| 565 |
BPF_MAP_TYPE_PERF_EVENT_ARRAY MapType = 4 |
| 566 |
BPF_MAP_TYPE_PERCPU_HASH MapType = 5 |
| 567 |
BPF_MAP_TYPE_PERCPU_ARRAY MapType = 6 |
| 568 |
BPF_MAP_TYPE_STACK_TRACE MapType = 7 |
| 569 |
BPF_MAP_TYPE_CGROUP_ARRAY MapType = 8 |
| 570 |
BPF_MAP_TYPE_LRU_HASH MapType = 9 |
| 571 |
BPF_MAP_TYPE_LRU_PERCPU_HASH MapType = 10 |
| 572 |
BPF_MAP_TYPE_LPM_TRIE MapType = 11 |
| 573 |
BPF_MAP_TYPE_ARRAY_OF_MAPS MapType = 12 |
| 574 |
BPF_MAP_TYPE_HASH_OF_MAPS MapType = 13 |
| 575 |
BPF_MAP_TYPE_DEVMAP MapType = 14 |
| 576 |
BPF_MAP_TYPE_SOCKMAP MapType = 15 |
| 577 |
BPF_MAP_TYPE_CPUMAP MapType = 16 |
| 578 |
BPF_MAP_TYPE_XSKMAP MapType = 17 |
| 579 |
BPF_MAP_TYPE_SOCKHASH MapType = 18 |
| 580 |
BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED MapType = 19 |
| 581 |
BPF_MAP_TYPE_CGROUP_STORAGE MapType = 19 |
| 582 |
BPF_MAP_TYPE_REUSEPORT_SOCKARRAY MapType = 20 |
| 583 |
BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED MapType = 21 |
| 584 |
BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE MapType = 21 |
| 585 |
BPF_MAP_TYPE_QUEUE MapType = 22 |
| 586 |
BPF_MAP_TYPE_STACK MapType = 23 |
| 587 |
BPF_MAP_TYPE_SK_STORAGE MapType = 24 |
| 588 |
BPF_MAP_TYPE_DEVMAP_HASH MapType = 25 |
| 589 |
BPF_MAP_TYPE_STRUCT_OPS MapType = 26 |
| 590 |
BPF_MAP_TYPE_RINGBUF MapType = 27 |
| 591 |
BPF_MAP_TYPE_INODE_STORAGE MapType = 28 |
| 592 |
BPF_MAP_TYPE_TASK_STORAGE MapType = 29 |
| 593 |
BPF_MAP_TYPE_BLOOM_FILTER MapType = 30 |
| 594 |
BPF_MAP_TYPE_USER_RINGBUF MapType = 31 |
| 595 |
BPF_MAP_TYPE_CGRP_STORAGE MapType = 32 |
| 596 |
BPF_MAP_TYPE_ARENA MapType = 33 |
| 597 |
BPF_MAP_TYPE_INSN_ARRAY MapType = 34 |
| 598 |
__MAX_BPF_MAP_TYPE MapType = 35 |
| 599 |
) |
| 600 |
|
| 601 |
type NetfilterInetHook uint32 |
| 602 |
|
| 603 |
const ( |
| 604 |
NF_INET_PRE_ROUTING NetfilterInetHook = 0 |
| 605 |
NF_INET_LOCAL_IN NetfilterInetHook = 1 |
| 606 |
NF_INET_FORWARD NetfilterInetHook = 2 |
| 607 |
NF_INET_LOCAL_OUT NetfilterInetHook = 3 |
| 608 |
NF_INET_POST_ROUTING NetfilterInetHook = 4 |
| 609 |
NF_INET_NUMHOOKS NetfilterInetHook = 5 |
| 610 |
NF_INET_INGRESS NetfilterInetHook = 5 |
| 611 |
) |
| 612 |
|
| 613 |
type ObjType uint32 |
| 614 |
|
| 615 |
const ( |
| 616 |
BPF_TYPE_UNSPEC ObjType = 0 |
| 617 |
BPF_TYPE_PROG ObjType = 1 |
| 618 |
BPF_TYPE_MAP ObjType = 2 |
| 619 |
BPF_TYPE_LINK ObjType = 3 |
| 620 |
) |
| 621 |
|
| 622 |
type PerfEventType uint32 |
| 623 |
|
| 624 |
const ( |
| 625 |
BPF_PERF_EVENT_UNSPEC PerfEventType = 0 |
| 626 |
BPF_PERF_EVENT_UPROBE PerfEventType = 1 |
| 627 |
BPF_PERF_EVENT_URETPROBE PerfEventType = 2 |
| 628 |
BPF_PERF_EVENT_KPROBE PerfEventType = 3 |
| 629 |
BPF_PERF_EVENT_KRETPROBE PerfEventType = 4 |
| 630 |
BPF_PERF_EVENT_TRACEPOINT PerfEventType = 5 |
| 631 |
BPF_PERF_EVENT_EVENT PerfEventType = 6 |
| 632 |
) |
| 633 |
|
| 634 |
type ProgType uint32 |
| 635 |
|
| 636 |
const ( |
| 637 |
BPF_PROG_TYPE_UNSPEC ProgType = 0 |
| 638 |
BPF_PROG_TYPE_SOCKET_FILTER ProgType = 1 |
| 639 |
BPF_PROG_TYPE_KPROBE ProgType = 2 |
| 640 |
BPF_PROG_TYPE_SCHED_CLS ProgType = 3 |
| 641 |
BPF_PROG_TYPE_SCHED_ACT ProgType = 4 |
| 642 |
BPF_PROG_TYPE_TRACEPOINT ProgType = 5 |
| 643 |
BPF_PROG_TYPE_XDP ProgType = 6 |
| 644 |
BPF_PROG_TYPE_PERF_EVENT ProgType = 7 |
| 645 |
BPF_PROG_TYPE_CGROUP_SKB ProgType = 8 |
| 646 |
BPF_PROG_TYPE_CGROUP_SOCK ProgType = 9 |
| 647 |
BPF_PROG_TYPE_LWT_IN ProgType = 10 |
| 648 |
BPF_PROG_TYPE_LWT_OUT ProgType = 11 |
| 649 |
BPF_PROG_TYPE_LWT_XMIT ProgType = 12 |
| 650 |
BPF_PROG_TYPE_SOCK_OPS ProgType = 13 |
| 651 |
BPF_PROG_TYPE_SK_SKB ProgType = 14 |
| 652 |
BPF_PROG_TYPE_CGROUP_DEVICE ProgType = 15 |
| 653 |
BPF_PROG_TYPE_SK_MSG ProgType = 16 |
| 654 |
BPF_PROG_TYPE_RAW_TRACEPOINT ProgType = 17 |
| 655 |
BPF_PROG_TYPE_CGROUP_SOCK_ADDR ProgType = 18 |
| 656 |
BPF_PROG_TYPE_LWT_SEG6LOCAL ProgType = 19 |
| 657 |
BPF_PROG_TYPE_LIRC_MODE2 ProgType = 20 |
| 658 |
BPF_PROG_TYPE_SK_REUSEPORT ProgType = 21 |
| 659 |
BPF_PROG_TYPE_FLOW_DISSECTOR ProgType = 22 |
| 660 |
BPF_PROG_TYPE_CGROUP_SYSCTL ProgType = 23 |
| 661 |
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE ProgType = 24 |
| 662 |
BPF_PROG_TYPE_CGROUP_SOCKOPT ProgType = 25 |
| 663 |
BPF_PROG_TYPE_TRACING ProgType = 26 |
| 664 |
BPF_PROG_TYPE_STRUCT_OPS ProgType = 27 |
| 665 |
BPF_PROG_TYPE_EXT ProgType = 28 |
| 666 |
BPF_PROG_TYPE_LSM ProgType = 29 |
| 667 |
BPF_PROG_TYPE_SK_LOOKUP ProgType = 30 |
| 668 |
BPF_PROG_TYPE_SYSCALL ProgType = 31 |
| 669 |
BPF_PROG_TYPE_NETFILTER ProgType = 32 |
| 670 |
__MAX_BPF_PROG_TYPE ProgType = 33 |
| 671 |
) |
| 672 |
|
| 673 |
type RetCode uint32 |
| 674 |
|
| 675 |
const ( |
| 676 |
BPF_OK RetCode = 0 |
| 677 |
BPF_DROP RetCode = 2 |
| 678 |
BPF_REDIRECT RetCode = 7 |
| 679 |
BPF_LWT_REROUTE RetCode = 128 |
| 680 |
BPF_FLOW_DISSECTOR_CONTINUE RetCode = 129 |
| 681 |
) |
| 682 |
|
| 683 |
type SkAction uint32 |
| 684 |
|
| 685 |
const ( |
| 686 |
SK_DROP SkAction = 0 |
| 687 |
SK_PASS SkAction = 1 |
| 688 |
) |
| 689 |
|
| 690 |
type StackBuildIdStatus uint32 |
| 691 |
|
| 692 |
const ( |
| 693 |
BPF_STACK_BUILD_ID_EMPTY StackBuildIdStatus = 0 |
| 694 |
BPF_STACK_BUILD_ID_VALID StackBuildIdStatus = 1 |
| 695 |
BPF_STACK_BUILD_ID_IP StackBuildIdStatus = 2 |
| 696 |
) |
| 697 |
|
| 698 |
type StatsType uint32 |
| 699 |
|
| 700 |
const ( |
| 701 |
BPF_STATS_RUN_TIME StatsType = 0 |
| 702 |
) |
| 703 |
|
| 704 |
type TcxActionBase int32 |
| 705 |
|
| 706 |
const ( |
| 707 |
TCX_NEXT TcxActionBase = -1 |
| 708 |
TCX_PASS TcxActionBase = 0 |
| 709 |
TCX_DROP TcxActionBase = 2 |
| 710 |
TCX_REDIRECT TcxActionBase = 7 |
| 711 |
) |
| 712 |
|
| 713 |
type XdpAction uint32 |
| 714 |
|
| 715 |
const ( |
| 716 |
XDP_ABORTED XdpAction = 0 |
| 717 |
XDP_DROP XdpAction = 1 |
| 718 |
XDP_PASS XdpAction = 2 |
| 719 |
XDP_TX XdpAction = 3 |
| 720 |
XDP_REDIRECT XdpAction = 4 |
| 721 |
) |
| 722 |
|
| 723 |
type NetfilterProtocolFamily uint32 |
| 724 |
|
| 725 |
const ( |
| 726 |
NFPROTO_UNSPEC NetfilterProtocolFamily = 0 |
| 727 |
NFPROTO_INET NetfilterProtocolFamily = 1 |
| 728 |
NFPROTO_IPV4 NetfilterProtocolFamily = 2 |
| 729 |
NFPROTO_ARP NetfilterProtocolFamily = 3 |
| 730 |
NFPROTO_NETDEV NetfilterProtocolFamily = 5 |
| 731 |
NFPROTO_BRIDGE NetfilterProtocolFamily = 7 |
| 732 |
NFPROTO_IPV6 NetfilterProtocolFamily = 10 |
| 733 |
NFPROTO_NUMPROTO NetfilterProtocolFamily = 11 |
| 734 |
) |
| 735 |
|
| 736 |
type BtfInfo struct { |
| 737 |
_ structs.HostLayout |
| 738 |
Btf TypedPointer[uint8] |
| 739 |
BtfSize uint32 |
| 740 |
Id BTFID |
| 741 |
Name TypedPointer[uint8] |
| 742 |
NameLen uint32 |
| 743 |
KernelBtf uint32 |
| 744 |
} |
| 745 |
|
| 746 |
type FuncInfo struct { |
| 747 |
_ structs.HostLayout |
| 748 |
InsnOff uint32 |
| 749 |
TypeId uint32 |
| 750 |
} |
| 751 |
|
| 752 |
type LineInfo struct { |
| 753 |
_ structs.HostLayout |
| 754 |
InsnOff uint32 |
| 755 |
FileNameOff uint32 |
| 756 |
LineOff uint32 |
| 757 |
LineCol uint32 |
| 758 |
} |
| 759 |
|
| 760 |
type LinkInfo struct { |
| 761 |
_ structs.HostLayout |
| 762 |
Type LinkType |
| 763 |
Id LinkID |
| 764 |
ProgId uint32 |
| 765 |
_ [4]byte |
| 766 |
Extra [48]uint8 |
| 767 |
} |
| 768 |
|
| 769 |
type MapInfo struct { |
| 770 |
_ structs.HostLayout |
| 771 |
Type uint32 |
| 772 |
Id MapID |
| 773 |
KeySize uint32 |
| 774 |
ValueSize uint32 |
| 775 |
MaxEntries uint32 |
| 776 |
MapFlags uint32 |
| 777 |
Name ObjName |
| 778 |
Ifindex uint32 |
| 779 |
BtfVmlinuxValueTypeId TypeID |
| 780 |
NetnsDev uint64 |
| 781 |
NetnsIno uint64 |
| 782 |
BtfId uint32 |
| 783 |
BtfKeyTypeId TypeID |
| 784 |
BtfValueTypeId TypeID |
| 785 |
BtfVmlinuxId uint32 |
| 786 |
MapExtra uint64 |
| 787 |
Hash uint64 |
| 788 |
HashSize uint32 |
| 789 |
_ [4]byte |
| 790 |
} |
| 791 |
|
| 792 |
type ProgInfo struct { |
| 793 |
_ structs.HostLayout |
| 794 |
Type uint32 |
| 795 |
Id uint32 |
| 796 |
Tag [8]uint8 |
| 797 |
JitedProgLen uint32 |
| 798 |
XlatedProgLen uint32 |
| 799 |
JitedProgInsns TypedPointer[uint8] |
| 800 |
XlatedProgInsns TypedPointer[uint8] |
| 801 |
LoadTime uint64 |
| 802 |
CreatedByUid uint32 |
| 803 |
NrMapIds uint32 |
| 804 |
MapIds TypedPointer[MapID] |
| 805 |
Name ObjName |
| 806 |
Ifindex uint32 |
| 807 |
_ [4]byte |
| 808 |
NetnsDev uint64 |
| 809 |
NetnsIno uint64 |
| 810 |
NrJitedKsyms uint32 |
| 811 |
NrJitedFuncLens uint32 |
| 812 |
JitedKsyms TypedPointer[uint64] |
| 813 |
JitedFuncLens TypedPointer[uint32] |
| 814 |
BtfId BTFID |
| 815 |
FuncInfoRecSize uint32 |
| 816 |
FuncInfo TypedPointer[uint8] |
| 817 |
NrFuncInfo uint32 |
| 818 |
NrLineInfo uint32 |
| 819 |
LineInfo TypedPointer[uint8] |
| 820 |
JitedLineInfo TypedPointer[uint64] |
| 821 |
NrJitedLineInfo uint32 |
| 822 |
LineInfoRecSize uint32 |
| 823 |
JitedLineInfoRecSize uint32 |
| 824 |
NrProgTags uint32 |
| 825 |
ProgTags uint64 |
| 826 |
RunTimeNs uint64 |
| 827 |
RunCnt uint64 |
| 828 |
RecursionMisses uint64 |
| 829 |
VerifiedInsns uint32 |
| 830 |
AttachBtfObjId BTFID |
| 831 |
AttachBtfId TypeID |
| 832 |
_ [4]byte |
| 833 |
} |
| 834 |
|
| 835 |
type SkLookup struct { |
| 836 |
_ structs.HostLayout |
| 837 |
Cookie uint64 |
| 838 |
Family uint32 |
| 839 |
Protocol uint32 |
| 840 |
RemoteIp4 [4]uint8 |
| 841 |
RemoteIp6 [16]uint8 |
| 842 |
RemotePort uint16 |
| 843 |
_ [2]byte |
| 844 |
LocalIp4 [4]uint8 |
| 845 |
LocalIp6 [16]uint8 |
| 846 |
LocalPort uint32 |
| 847 |
IngressIfindex uint32 |
| 848 |
_ [4]byte |
| 849 |
} |
| 850 |
|
| 851 |
type TokenInfo struct { |
| 852 |
_ structs.HostLayout |
| 853 |
AllowedCmds uint64 |
| 854 |
AllowedMaps uint64 |
| 855 |
AllowedProgs uint64 |
| 856 |
AllowedAttachs uint64 |
| 857 |
} |
| 858 |
|
| 859 |
type XdpMd struct { |
| 860 |
_ structs.HostLayout |
| 861 |
Data uint32 |
| 862 |
DataEnd uint32 |
| 863 |
DataMeta uint32 |
| 864 |
IngressIfindex uint32 |
| 865 |
RxQueueIndex uint32 |
| 866 |
EgressIfindex uint32 |
| 867 |
} |
| 868 |
|
| 869 |
type BtfGetFdByIdAttr struct { |
| 870 |
_ structs.HostLayout |
| 871 |
Id uint32 |
| 872 |
} |
| 873 |
|
| 874 |
func BtfGetFdById(attr *BtfGetFdByIdAttr) (*FD, error) { |
| 875 |
fd, err := BPF(BPF_BTF_GET_FD_BY_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 876 |
if err != nil { |
| 877 |
return nil, err |
| 878 |
} |
| 879 |
return NewFD(int(fd)) |
| 880 |
} |
| 881 |
|
| 882 |
type BtfGetNextIdAttr struct { |
| 883 |
_ structs.HostLayout |
| 884 |
Id BTFID |
| 885 |
NextId BTFID |
| 886 |
} |
| 887 |
|
| 888 |
func BtfGetNextId(attr *BtfGetNextIdAttr) error { |
| 889 |
_, err := BPF(BPF_BTF_GET_NEXT_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 890 |
return err |
| 891 |
} |
| 892 |
|
| 893 |
type BtfLoadAttr struct { |
| 894 |
_ structs.HostLayout |
| 895 |
Btf TypedPointer[uint8] |
| 896 |
BtfLogBuf TypedPointer[uint8] |
| 897 |
BtfSize uint32 |
| 898 |
BtfLogSize uint32 |
| 899 |
BtfLogLevel uint32 |
| 900 |
BtfLogTrueSize uint32 |
| 901 |
BtfFlags uint32 |
| 902 |
BtfTokenFd int32 |
| 903 |
} |
| 904 |
|
| 905 |
func BtfLoad(attr *BtfLoadAttr) (*FD, error) { |
| 906 |
fd, err := BPF(BPF_BTF_LOAD, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 907 |
if err != nil { |
| 908 |
return nil, err |
| 909 |
} |
| 910 |
return NewFD(int(fd)) |
| 911 |
} |
| 912 |
|
| 913 |
type EnableStatsAttr struct { |
| 914 |
_ structs.HostLayout |
| 915 |
Type uint32 |
| 916 |
} |
| 917 |
|
| 918 |
func EnableStats(attr *EnableStatsAttr) (*FD, error) { |
| 919 |
fd, err := BPF(BPF_ENABLE_STATS, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 920 |
if err != nil { |
| 921 |
return nil, err |
| 922 |
} |
| 923 |
return NewFD(int(fd)) |
| 924 |
} |
| 925 |
|
| 926 |
type IterCreateAttr struct { |
| 927 |
_ structs.HostLayout |
| 928 |
LinkFd uint32 |
| 929 |
Flags uint32 |
| 930 |
} |
| 931 |
|
| 932 |
func IterCreate(attr *IterCreateAttr) (*FD, error) { |
| 933 |
fd, err := BPF(BPF_ITER_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 934 |
if err != nil { |
| 935 |
return nil, err |
| 936 |
} |
| 937 |
return NewFD(int(fd)) |
| 938 |
} |
| 939 |
|
| 940 |
type LinkCreateAttr struct { |
| 941 |
_ structs.HostLayout |
| 942 |
ProgFd uint32 |
| 943 |
TargetFd uint32 |
| 944 |
AttachType AttachType |
| 945 |
Flags uint32 |
| 946 |
TargetBtfId TypeID |
| 947 |
_ [44]byte |
| 948 |
} |
| 949 |
|
| 950 |
func LinkCreate(attr *LinkCreateAttr) (*FD, error) { |
| 951 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 952 |
if err != nil { |
| 953 |
return nil, err |
| 954 |
} |
| 955 |
return NewFD(int(fd)) |
| 956 |
} |
| 957 |
|
| 958 |
type LinkCreateIterAttr struct { |
| 959 |
_ structs.HostLayout |
| 960 |
ProgFd uint32 |
| 961 |
TargetFd uint32 |
| 962 |
AttachType AttachType |
| 963 |
Flags uint32 |
| 964 |
IterInfo Pointer |
| 965 |
IterInfoLen uint32 |
| 966 |
_ [36]byte |
| 967 |
} |
| 968 |
|
| 969 |
func LinkCreateIter(attr *LinkCreateIterAttr) (*FD, error) { |
| 970 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 971 |
if err != nil { |
| 972 |
return nil, err |
| 973 |
} |
| 974 |
return NewFD(int(fd)) |
| 975 |
} |
| 976 |
|
| 977 |
type LinkCreateKprobeMultiAttr struct { |
| 978 |
_ structs.HostLayout |
| 979 |
ProgFd uint32 |
| 980 |
TargetFd uint32 |
| 981 |
AttachType AttachType |
| 982 |
Flags uint32 |
| 983 |
KprobeMultiFlags uint32 |
| 984 |
Count uint32 |
| 985 |
Syms StringSlicePointer |
| 986 |
Addrs TypedPointer[uintptr] |
| 987 |
Cookies TypedPointer[uint64] |
| 988 |
_ [16]byte |
| 989 |
} |
| 990 |
|
| 991 |
func LinkCreateKprobeMulti(attr *LinkCreateKprobeMultiAttr) (*FD, error) { |
| 992 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 993 |
if err != nil { |
| 994 |
return nil, err |
| 995 |
} |
| 996 |
return NewFD(int(fd)) |
| 997 |
} |
| 998 |
|
| 999 |
type LinkCreateNetfilterAttr struct { |
| 1000 |
_ structs.HostLayout |
| 1001 |
ProgFd uint32 |
| 1002 |
TargetFd uint32 |
| 1003 |
AttachType AttachType |
| 1004 |
Flags uint32 |
| 1005 |
Pf NetfilterProtocolFamily |
| 1006 |
Hooknum NetfilterInetHook |
| 1007 |
Priority int32 |
| 1008 |
NetfilterFlags uint32 |
| 1009 |
_ [32]byte |
| 1010 |
} |
| 1011 |
|
| 1012 |
func LinkCreateNetfilter(attr *LinkCreateNetfilterAttr) (*FD, error) { |
| 1013 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1014 |
if err != nil { |
| 1015 |
return nil, err |
| 1016 |
} |
| 1017 |
return NewFD(int(fd)) |
| 1018 |
} |
| 1019 |
|
| 1020 |
type LinkCreateNetkitAttr struct { |
| 1021 |
_ structs.HostLayout |
| 1022 |
ProgFd uint32 |
| 1023 |
TargetIfindex uint32 |
| 1024 |
AttachType AttachType |
| 1025 |
Flags uint32 |
| 1026 |
RelativeFdOrId uint32 |
| 1027 |
_ [4]byte |
| 1028 |
ExpectedRevision uint64 |
| 1029 |
_ [32]byte |
| 1030 |
} |
| 1031 |
|
| 1032 |
func LinkCreateNetkit(attr *LinkCreateNetkitAttr) (*FD, error) { |
| 1033 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1034 |
if err != nil { |
| 1035 |
return nil, err |
| 1036 |
} |
| 1037 |
return NewFD(int(fd)) |
| 1038 |
} |
| 1039 |
|
| 1040 |
type LinkCreatePerfEventAttr struct { |
| 1041 |
_ structs.HostLayout |
| 1042 |
ProgFd uint32 |
| 1043 |
TargetFd uint32 |
| 1044 |
AttachType AttachType |
| 1045 |
Flags uint32 |
| 1046 |
BpfCookie uint64 |
| 1047 |
_ [40]byte |
| 1048 |
} |
| 1049 |
|
| 1050 |
func LinkCreatePerfEvent(attr *LinkCreatePerfEventAttr) (*FD, error) { |
| 1051 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1052 |
if err != nil { |
| 1053 |
return nil, err |
| 1054 |
} |
| 1055 |
return NewFD(int(fd)) |
| 1056 |
} |
| 1057 |
|
| 1058 |
type LinkCreateTcxAttr struct { |
| 1059 |
_ structs.HostLayout |
| 1060 |
ProgFd uint32 |
| 1061 |
TargetIfindex uint32 |
| 1062 |
AttachType AttachType |
| 1063 |
Flags uint32 |
| 1064 |
RelativeFdOrId uint32 |
| 1065 |
_ [4]byte |
| 1066 |
ExpectedRevision uint64 |
| 1067 |
_ [32]byte |
| 1068 |
} |
| 1069 |
|
| 1070 |
func LinkCreateTcx(attr *LinkCreateTcxAttr) (*FD, error) { |
| 1071 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1072 |
if err != nil { |
| 1073 |
return nil, err |
| 1074 |
} |
| 1075 |
return NewFD(int(fd)) |
| 1076 |
} |
| 1077 |
|
| 1078 |
type LinkCreateTracingAttr struct { |
| 1079 |
_ structs.HostLayout |
| 1080 |
ProgFd uint32 |
| 1081 |
TargetFd uint32 |
| 1082 |
AttachType AttachType |
| 1083 |
Flags uint32 |
| 1084 |
TargetBtfId BTFID |
| 1085 |
_ [4]byte |
| 1086 |
Cookie uint64 |
| 1087 |
_ [32]byte |
| 1088 |
} |
| 1089 |
|
| 1090 |
func LinkCreateTracing(attr *LinkCreateTracingAttr) (*FD, error) { |
| 1091 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1092 |
if err != nil { |
| 1093 |
return nil, err |
| 1094 |
} |
| 1095 |
return NewFD(int(fd)) |
| 1096 |
} |
| 1097 |
|
| 1098 |
type LinkCreateUprobeMultiAttr struct { |
| 1099 |
_ structs.HostLayout |
| 1100 |
ProgFd uint32 |
| 1101 |
TargetFd uint32 |
| 1102 |
AttachType AttachType |
| 1103 |
Flags uint32 |
| 1104 |
Path StringPointer |
| 1105 |
Offsets TypedPointer[uint64] |
| 1106 |
RefCtrOffsets TypedPointer[uint64] |
| 1107 |
Cookies TypedPointer[uint64] |
| 1108 |
Count uint32 |
| 1109 |
UprobeMultiFlags uint32 |
| 1110 |
Pid uint32 |
| 1111 |
_ [4]byte |
| 1112 |
} |
| 1113 |
|
| 1114 |
func LinkCreateUprobeMulti(attr *LinkCreateUprobeMultiAttr) (*FD, error) { |
| 1115 |
fd, err := BPF(BPF_LINK_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1116 |
if err != nil { |
| 1117 |
return nil, err |
| 1118 |
} |
| 1119 |
return NewFD(int(fd)) |
| 1120 |
} |
| 1121 |
|
| 1122 |
type LinkDetachAttr struct { |
| 1123 |
_ structs.HostLayout |
| 1124 |
LinkFd uint32 |
| 1125 |
} |
| 1126 |
|
| 1127 |
func LinkDetach(attr *LinkDetachAttr) error { |
| 1128 |
_, err := BPF(BPF_LINK_DETACH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1129 |
return err |
| 1130 |
} |
| 1131 |
|
| 1132 |
type LinkGetFdByIdAttr struct { |
| 1133 |
_ structs.HostLayout |
| 1134 |
Id LinkID |
| 1135 |
} |
| 1136 |
|
| 1137 |
func LinkGetFdById(attr *LinkGetFdByIdAttr) (*FD, error) { |
| 1138 |
fd, err := BPF(BPF_LINK_GET_FD_BY_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1139 |
if err != nil { |
| 1140 |
return nil, err |
| 1141 |
} |
| 1142 |
return NewFD(int(fd)) |
| 1143 |
} |
| 1144 |
|
| 1145 |
type LinkGetNextIdAttr struct { |
| 1146 |
_ structs.HostLayout |
| 1147 |
Id LinkID |
| 1148 |
NextId LinkID |
| 1149 |
} |
| 1150 |
|
| 1151 |
func LinkGetNextId(attr *LinkGetNextIdAttr) error { |
| 1152 |
_, err := BPF(BPF_LINK_GET_NEXT_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1153 |
return err |
| 1154 |
} |
| 1155 |
|
| 1156 |
type LinkUpdateAttr struct { |
| 1157 |
_ structs.HostLayout |
| 1158 |
LinkFd uint32 |
| 1159 |
NewProgFd uint32 |
| 1160 |
Flags uint32 |
| 1161 |
OldProgFd uint32 |
| 1162 |
} |
| 1163 |
|
| 1164 |
func LinkUpdate(attr *LinkUpdateAttr) error { |
| 1165 |
_, err := BPF(BPF_LINK_UPDATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1166 |
return err |
| 1167 |
} |
| 1168 |
|
| 1169 |
type MapCreateAttr struct { |
| 1170 |
_ structs.HostLayout |
| 1171 |
MapType MapType |
| 1172 |
KeySize uint32 |
| 1173 |
ValueSize uint32 |
| 1174 |
MaxEntries uint32 |
| 1175 |
MapFlags uint32 |
| 1176 |
InnerMapFd uint32 |
| 1177 |
NumaNode uint32 |
| 1178 |
MapName ObjName |
| 1179 |
MapIfindex uint32 |
| 1180 |
BtfFd uint32 |
| 1181 |
BtfKeyTypeId TypeID |
| 1182 |
BtfValueTypeId TypeID |
| 1183 |
BtfVmlinuxValueTypeId TypeID |
| 1184 |
MapExtra uint64 |
| 1185 |
ValueTypeBtfObjFd int32 |
| 1186 |
MapTokenFd int32 |
| 1187 |
ExclProgHash uint64 |
| 1188 |
ExclProgHashSize uint32 |
| 1189 |
_ [4]byte |
| 1190 |
} |
| 1191 |
|
| 1192 |
func MapCreate(attr *MapCreateAttr) (*FD, error) { |
| 1193 |
fd, err := BPF(BPF_MAP_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1194 |
if err != nil { |
| 1195 |
return nil, err |
| 1196 |
} |
| 1197 |
return NewFD(int(fd)) |
| 1198 |
} |
| 1199 |
|
| 1200 |
type MapDeleteBatchAttr struct { |
| 1201 |
_ structs.HostLayout |
| 1202 |
InBatch Pointer |
| 1203 |
OutBatch Pointer |
| 1204 |
Keys Pointer |
| 1205 |
Values Pointer |
| 1206 |
Count uint32 |
| 1207 |
MapFd uint32 |
| 1208 |
ElemFlags uint64 |
| 1209 |
Flags uint64 |
| 1210 |
} |
| 1211 |
|
| 1212 |
func MapDeleteBatch(attr *MapDeleteBatchAttr) error { |
| 1213 |
_, err := BPF(BPF_MAP_DELETE_BATCH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1214 |
return err |
| 1215 |
} |
| 1216 |
|
| 1217 |
type MapDeleteElemAttr struct { |
| 1218 |
_ structs.HostLayout |
| 1219 |
MapFd uint32 |
| 1220 |
_ [4]byte |
| 1221 |
Key Pointer |
| 1222 |
Value Pointer |
| 1223 |
Flags uint64 |
| 1224 |
} |
| 1225 |
|
| 1226 |
func MapDeleteElem(attr *MapDeleteElemAttr) error { |
| 1227 |
_, err := BPF(BPF_MAP_DELETE_ELEM, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1228 |
return err |
| 1229 |
} |
| 1230 |
|
| 1231 |
type MapFreezeAttr struct { |
| 1232 |
_ structs.HostLayout |
| 1233 |
MapFd uint32 |
| 1234 |
} |
| 1235 |
|
| 1236 |
func MapFreeze(attr *MapFreezeAttr) error { |
| 1237 |
_, err := BPF(BPF_MAP_FREEZE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1238 |
return err |
| 1239 |
} |
| 1240 |
|
| 1241 |
type MapGetFdByIdAttr struct { |
| 1242 |
_ structs.HostLayout |
| 1243 |
Id uint32 |
| 1244 |
} |
| 1245 |
|
| 1246 |
func MapGetFdById(attr *MapGetFdByIdAttr) (*FD, error) { |
| 1247 |
fd, err := BPF(BPF_MAP_GET_FD_BY_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1248 |
if err != nil { |
| 1249 |
return nil, err |
| 1250 |
} |
| 1251 |
return NewFD(int(fd)) |
| 1252 |
} |
| 1253 |
|
| 1254 |
type MapGetNextIdAttr struct { |
| 1255 |
_ structs.HostLayout |
| 1256 |
Id uint32 |
| 1257 |
NextId uint32 |
| 1258 |
} |
| 1259 |
|
| 1260 |
func MapGetNextId(attr *MapGetNextIdAttr) error { |
| 1261 |
_, err := BPF(BPF_MAP_GET_NEXT_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1262 |
return err |
| 1263 |
} |
| 1264 |
|
| 1265 |
type MapGetNextKeyAttr struct { |
| 1266 |
_ structs.HostLayout |
| 1267 |
MapFd uint32 |
| 1268 |
_ [4]byte |
| 1269 |
Key Pointer |
| 1270 |
NextKey Pointer |
| 1271 |
} |
| 1272 |
|
| 1273 |
func MapGetNextKey(attr *MapGetNextKeyAttr) error { |
| 1274 |
_, err := BPF(BPF_MAP_GET_NEXT_KEY, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1275 |
return err |
| 1276 |
} |
| 1277 |
|
| 1278 |
type MapLookupAndDeleteBatchAttr struct { |
| 1279 |
_ structs.HostLayout |
| 1280 |
InBatch Pointer |
| 1281 |
OutBatch Pointer |
| 1282 |
Keys Pointer |
| 1283 |
Values Pointer |
| 1284 |
Count uint32 |
| 1285 |
MapFd uint32 |
| 1286 |
ElemFlags uint64 |
| 1287 |
Flags uint64 |
| 1288 |
} |
| 1289 |
|
| 1290 |
func MapLookupAndDeleteBatch(attr *MapLookupAndDeleteBatchAttr) error { |
| 1291 |
_, err := BPF(BPF_MAP_LOOKUP_AND_DELETE_BATCH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1292 |
return err |
| 1293 |
} |
| 1294 |
|
| 1295 |
type MapLookupAndDeleteElemAttr struct { |
| 1296 |
_ structs.HostLayout |
| 1297 |
MapFd uint32 |
| 1298 |
_ [4]byte |
| 1299 |
Key Pointer |
| 1300 |
Value Pointer |
| 1301 |
Flags uint64 |
| 1302 |
} |
| 1303 |
|
| 1304 |
func MapLookupAndDeleteElem(attr *MapLookupAndDeleteElemAttr) error { |
| 1305 |
_, err := BPF(BPF_MAP_LOOKUP_AND_DELETE_ELEM, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1306 |
return err |
| 1307 |
} |
| 1308 |
|
| 1309 |
type MapLookupBatchAttr struct { |
| 1310 |
_ structs.HostLayout |
| 1311 |
InBatch Pointer |
| 1312 |
OutBatch Pointer |
| 1313 |
Keys Pointer |
| 1314 |
Values Pointer |
| 1315 |
Count uint32 |
| 1316 |
MapFd uint32 |
| 1317 |
ElemFlags uint64 |
| 1318 |
Flags uint64 |
| 1319 |
} |
| 1320 |
|
| 1321 |
func MapLookupBatch(attr *MapLookupBatchAttr) error { |
| 1322 |
_, err := BPF(BPF_MAP_LOOKUP_BATCH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1323 |
return err |
| 1324 |
} |
| 1325 |
|
| 1326 |
type MapLookupElemAttr struct { |
| 1327 |
_ structs.HostLayout |
| 1328 |
MapFd uint32 |
| 1329 |
_ [4]byte |
| 1330 |
Key Pointer |
| 1331 |
Value Pointer |
| 1332 |
Flags uint64 |
| 1333 |
} |
| 1334 |
|
| 1335 |
func MapLookupElem(attr *MapLookupElemAttr) error { |
| 1336 |
_, err := BPF(BPF_MAP_LOOKUP_ELEM, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1337 |
return err |
| 1338 |
} |
| 1339 |
|
| 1340 |
type MapUpdateBatchAttr struct { |
| 1341 |
_ structs.HostLayout |
| 1342 |
InBatch Pointer |
| 1343 |
OutBatch Pointer |
| 1344 |
Keys Pointer |
| 1345 |
Values Pointer |
| 1346 |
Count uint32 |
| 1347 |
MapFd uint32 |
| 1348 |
ElemFlags uint64 |
| 1349 |
Flags uint64 |
| 1350 |
} |
| 1351 |
|
| 1352 |
func MapUpdateBatch(attr *MapUpdateBatchAttr) error { |
| 1353 |
_, err := BPF(BPF_MAP_UPDATE_BATCH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1354 |
return err |
| 1355 |
} |
| 1356 |
|
| 1357 |
type MapUpdateElemAttr struct { |
| 1358 |
_ structs.HostLayout |
| 1359 |
MapFd uint32 |
| 1360 |
_ [4]byte |
| 1361 |
Key Pointer |
| 1362 |
Value Pointer |
| 1363 |
Flags uint64 |
| 1364 |
} |
| 1365 |
|
| 1366 |
func MapUpdateElem(attr *MapUpdateElemAttr) error { |
| 1367 |
_, err := BPF(BPF_MAP_UPDATE_ELEM, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1368 |
return err |
| 1369 |
} |
| 1370 |
|
| 1371 |
type ObjGetAttr struct { |
| 1372 |
_ structs.HostLayout |
| 1373 |
Pathname StringPointer |
| 1374 |
BpfFd uint32 |
| 1375 |
FileFlags uint32 |
| 1376 |
PathFd int32 |
| 1377 |
_ [4]byte |
| 1378 |
} |
| 1379 |
|
| 1380 |
func ObjGet(attr *ObjGetAttr) (*FD, error) { |
| 1381 |
fd, err := BPF(BPF_OBJ_GET, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1382 |
if err != nil { |
| 1383 |
return nil, err |
| 1384 |
} |
| 1385 |
return NewFD(int(fd)) |
| 1386 |
} |
| 1387 |
|
| 1388 |
type ObjGetInfoByFdAttr struct { |
| 1389 |
_ structs.HostLayout |
| 1390 |
BpfFd uint32 |
| 1391 |
InfoLen uint32 |
| 1392 |
Info Pointer |
| 1393 |
} |
| 1394 |
|
| 1395 |
func ObjGetInfoByFd(attr *ObjGetInfoByFdAttr) error { |
| 1396 |
_, err := BPF(BPF_OBJ_GET_INFO_BY_FD, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1397 |
return err |
| 1398 |
} |
| 1399 |
|
| 1400 |
type ObjPinAttr struct { |
| 1401 |
_ structs.HostLayout |
| 1402 |
Pathname StringPointer |
| 1403 |
BpfFd uint32 |
| 1404 |
FileFlags uint32 |
| 1405 |
PathFd int32 |
| 1406 |
_ [4]byte |
| 1407 |
} |
| 1408 |
|
| 1409 |
func ObjPin(attr *ObjPinAttr) error { |
| 1410 |
_, err := BPF(BPF_OBJ_PIN, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1411 |
return err |
| 1412 |
} |
| 1413 |
|
| 1414 |
type ProgAttachAttr struct { |
| 1415 |
_ structs.HostLayout |
| 1416 |
TargetFdOrIfindex uint32 |
| 1417 |
AttachBpfFd uint32 |
| 1418 |
AttachType uint32 |
| 1419 |
AttachFlags uint32 |
| 1420 |
ReplaceBpfFd uint32 |
| 1421 |
RelativeFdOrId uint32 |
| 1422 |
ExpectedRevision uint64 |
| 1423 |
} |
| 1424 |
|
| 1425 |
func ProgAttach(attr *ProgAttachAttr) error { |
| 1426 |
_, err := BPF(BPF_PROG_ATTACH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1427 |
return err |
| 1428 |
} |
| 1429 |
|
| 1430 |
type ProgBindMapAttr struct { |
| 1431 |
_ structs.HostLayout |
| 1432 |
ProgFd uint32 |
| 1433 |
MapFd uint32 |
| 1434 |
Flags uint32 |
| 1435 |
} |
| 1436 |
|
| 1437 |
func ProgBindMap(attr *ProgBindMapAttr) error { |
| 1438 |
_, err := BPF(BPF_PROG_BIND_MAP, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1439 |
return err |
| 1440 |
} |
| 1441 |
|
| 1442 |
type ProgDetachAttr struct { |
| 1443 |
_ structs.HostLayout |
| 1444 |
TargetFdOrIfindex uint32 |
| 1445 |
AttachBpfFd uint32 |
| 1446 |
AttachType uint32 |
| 1447 |
AttachFlags uint32 |
| 1448 |
_ [4]byte |
| 1449 |
RelativeFdOrId uint32 |
| 1450 |
ExpectedRevision uint64 |
| 1451 |
} |
| 1452 |
|
| 1453 |
func ProgDetach(attr *ProgDetachAttr) error { |
| 1454 |
_, err := BPF(BPF_PROG_DETACH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1455 |
return err |
| 1456 |
} |
| 1457 |
|
| 1458 |
type ProgGetFdByIdAttr struct { |
| 1459 |
_ structs.HostLayout |
| 1460 |
Id uint32 |
| 1461 |
} |
| 1462 |
|
| 1463 |
func ProgGetFdById(attr *ProgGetFdByIdAttr) (*FD, error) { |
| 1464 |
fd, err := BPF(BPF_PROG_GET_FD_BY_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1465 |
if err != nil { |
| 1466 |
return nil, err |
| 1467 |
} |
| 1468 |
return NewFD(int(fd)) |
| 1469 |
} |
| 1470 |
|
| 1471 |
type ProgGetNextIdAttr struct { |
| 1472 |
_ structs.HostLayout |
| 1473 |
Id uint32 |
| 1474 |
NextId uint32 |
| 1475 |
} |
| 1476 |
|
| 1477 |
func ProgGetNextId(attr *ProgGetNextIdAttr) error { |
| 1478 |
_, err := BPF(BPF_PROG_GET_NEXT_ID, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1479 |
return err |
| 1480 |
} |
| 1481 |
|
| 1482 |
type ProgLoadAttr struct { |
| 1483 |
_ structs.HostLayout |
| 1484 |
ProgType ProgType |
| 1485 |
InsnCnt uint32 |
| 1486 |
Insns TypedPointer[uint8] |
| 1487 |
License StringPointer |
| 1488 |
LogLevel LogLevel |
| 1489 |
LogSize uint32 |
| 1490 |
LogBuf TypedPointer[uint8] |
| 1491 |
KernVersion uint32 |
| 1492 |
ProgFlags uint32 |
| 1493 |
ProgName ObjName |
| 1494 |
ProgIfindex uint32 |
| 1495 |
ExpectedAttachType AttachType |
| 1496 |
ProgBtfFd uint32 |
| 1497 |
FuncInfoRecSize uint32 |
| 1498 |
FuncInfo TypedPointer[uint8] |
| 1499 |
FuncInfoCnt uint32 |
| 1500 |
LineInfoRecSize uint32 |
| 1501 |
LineInfo TypedPointer[uint8] |
| 1502 |
LineInfoCnt uint32 |
| 1503 |
AttachBtfId TypeID |
| 1504 |
AttachBtfObjFd uint32 |
| 1505 |
CoreReloCnt uint32 |
| 1506 |
FdArray TypedPointer[int32] |
| 1507 |
CoreRelos TypedPointer[uint8] |
| 1508 |
CoreReloRecSize uint32 |
| 1509 |
LogTrueSize uint32 |
| 1510 |
ProgTokenFd int32 |
| 1511 |
FdArrayCnt uint32 |
| 1512 |
Signature uint64 |
| 1513 |
SignatureSize uint32 |
| 1514 |
KeyringId int32 |
| 1515 |
} |
| 1516 |
|
| 1517 |
func ProgLoad(attr *ProgLoadAttr) (*FD, error) { |
| 1518 |
fd, err := BPF(BPF_PROG_LOAD, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1519 |
if err != nil { |
| 1520 |
return nil, err |
| 1521 |
} |
| 1522 |
return NewFD(int(fd)) |
| 1523 |
} |
| 1524 |
|
| 1525 |
type ProgQueryAttr struct { |
| 1526 |
_ structs.HostLayout |
| 1527 |
TargetFdOrIfindex uint32 |
| 1528 |
AttachType AttachType |
| 1529 |
QueryFlags uint32 |
| 1530 |
AttachFlags uint32 |
| 1531 |
ProgIds TypedPointer[ProgramID] |
| 1532 |
Count uint32 |
| 1533 |
_ [4]byte |
| 1534 |
ProgAttachFlags TypedPointer[ProgramID] |
| 1535 |
LinkIds TypedPointer[LinkID] |
| 1536 |
LinkAttachFlags TypedPointer[LinkID] |
| 1537 |
Revision uint64 |
| 1538 |
} |
| 1539 |
|
| 1540 |
func ProgQuery(attr *ProgQueryAttr) error { |
| 1541 |
_, err := BPF(BPF_PROG_QUERY, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1542 |
return err |
| 1543 |
} |
| 1544 |
|
| 1545 |
type ProgRunAttr struct { |
| 1546 |
_ structs.HostLayout |
| 1547 |
ProgFd uint32 |
| 1548 |
Retval uint32 |
| 1549 |
DataSizeIn uint32 |
| 1550 |
DataSizeOut uint32 |
| 1551 |
DataIn TypedPointer[uint8] |
| 1552 |
DataOut TypedPointer[uint8] |
| 1553 |
Repeat uint32 |
| 1554 |
Duration uint32 |
| 1555 |
CtxSizeIn uint32 |
| 1556 |
CtxSizeOut uint32 |
| 1557 |
CtxIn TypedPointer[uint8] |
| 1558 |
CtxOut TypedPointer[uint8] |
| 1559 |
Flags uint32 |
| 1560 |
Cpu uint32 |
| 1561 |
BatchSize uint32 |
| 1562 |
_ [4]byte |
| 1563 |
} |
| 1564 |
|
| 1565 |
func ProgRun(attr *ProgRunAttr) error { |
| 1566 |
_, err := BPF(BPF_PROG_TEST_RUN, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1567 |
return err |
| 1568 |
} |
| 1569 |
|
| 1570 |
type RawTracepointOpenAttr struct { |
| 1571 |
_ structs.HostLayout |
| 1572 |
Name StringPointer |
| 1573 |
ProgFd uint32 |
| 1574 |
_ [4]byte |
| 1575 |
Cookie uint64 |
| 1576 |
} |
| 1577 |
|
| 1578 |
func RawTracepointOpen(attr *RawTracepointOpenAttr) (*FD, error) { |
| 1579 |
fd, err := BPF(BPF_RAW_TRACEPOINT_OPEN, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1580 |
if err != nil { |
| 1581 |
return nil, err |
| 1582 |
} |
| 1583 |
return NewFD(int(fd)) |
| 1584 |
} |
| 1585 |
|
| 1586 |
type TokenCreateAttr struct { |
| 1587 |
_ structs.HostLayout |
| 1588 |
Flags uint32 |
| 1589 |
BpffsFd uint32 |
| 1590 |
} |
| 1591 |
|
| 1592 |
func TokenCreate(attr *TokenCreateAttr) (*FD, error) { |
| 1593 |
fd, err := BPF(BPF_TOKEN_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) |
| 1594 |
if err != nil { |
| 1595 |
return nil, err |
| 1596 |
} |
| 1597 |
return NewFD(int(fd)) |
| 1598 |
} |
| 1599 |
|
| 1600 |
type CgroupLinkInfo struct { |
| 1601 |
_ structs.HostLayout |
| 1602 |
Type LinkType |
| 1603 |
Id LinkID |
| 1604 |
ProgId uint32 |
| 1605 |
_ [4]byte |
| 1606 |
CgroupId uint64 |
| 1607 |
AttachType AttachType |
| 1608 |
_ [36]byte |
| 1609 |
} |
| 1610 |
|
| 1611 |
type EventLinkInfo struct { |
| 1612 |
_ structs.HostLayout |
| 1613 |
Type LinkType |
| 1614 |
Id LinkID |
| 1615 |
ProgId uint32 |
| 1616 |
_ [4]byte |
| 1617 |
PerfEventType PerfEventType |
| 1618 |
_ [4]byte |
| 1619 |
Config uint64 |
| 1620 |
EventType uint32 |
| 1621 |
_ [4]byte |
| 1622 |
Cookie uint64 |
| 1623 |
_ [16]byte |
| 1624 |
} |
| 1625 |
|
| 1626 |
type IterLinkInfo struct { |
| 1627 |
_ structs.HostLayout |
| 1628 |
Type LinkType |
| 1629 |
Id LinkID |
| 1630 |
ProgId uint32 |
| 1631 |
_ [4]byte |
| 1632 |
TargetName TypedPointer[uint8] |
| 1633 |
TargetNameLen uint32 |
| 1634 |
} |
| 1635 |
|
| 1636 |
type KprobeLinkInfo struct { |
| 1637 |
_ structs.HostLayout |
| 1638 |
Type LinkType |
| 1639 |
Id LinkID |
| 1640 |
ProgId uint32 |
| 1641 |
_ [4]byte |
| 1642 |
PerfEventType PerfEventType |
| 1643 |
_ [4]byte |
| 1644 |
FuncName TypedPointer[uint8] |
| 1645 |
NameLen uint32 |
| 1646 |
Offset uint32 |
| 1647 |
Addr uint64 |
| 1648 |
Missed uint64 |
| 1649 |
Cookie uint64 |
| 1650 |
} |
| 1651 |
|
| 1652 |
type KprobeMultiLinkInfo struct { |
| 1653 |
_ structs.HostLayout |
| 1654 |
Type LinkType |
| 1655 |
Id LinkID |
| 1656 |
ProgId uint32 |
| 1657 |
_ [4]byte |
| 1658 |
Addrs TypedPointer[uint64] |
| 1659 |
Count uint32 |
| 1660 |
Flags uint32 |
| 1661 |
Missed uint64 |
| 1662 |
Cookies TypedPointer[uint64] |
| 1663 |
_ [16]byte |
| 1664 |
} |
| 1665 |
|
| 1666 |
type NetNsLinkInfo struct { |
| 1667 |
_ structs.HostLayout |
| 1668 |
Type LinkType |
| 1669 |
Id LinkID |
| 1670 |
ProgId uint32 |
| 1671 |
_ [4]byte |
| 1672 |
NetnsIno uint32 |
| 1673 |
AttachType AttachType |
| 1674 |
_ [40]byte |
| 1675 |
} |
| 1676 |
|
| 1677 |
type NetfilterLinkInfo struct { |
| 1678 |
_ structs.HostLayout |
| 1679 |
Type LinkType |
| 1680 |
Id LinkID |
| 1681 |
ProgId uint32 |
| 1682 |
_ [4]byte |
| 1683 |
Pf NetfilterProtocolFamily |
| 1684 |
Hooknum NetfilterInetHook |
| 1685 |
Priority int32 |
| 1686 |
Flags uint32 |
| 1687 |
_ [32]byte |
| 1688 |
} |
| 1689 |
|
| 1690 |
type NetkitLinkInfo struct { |
| 1691 |
_ structs.HostLayout |
| 1692 |
Type LinkType |
| 1693 |
Id LinkID |
| 1694 |
ProgId uint32 |
| 1695 |
_ [4]byte |
| 1696 |
Ifindex uint32 |
| 1697 |
AttachType AttachType |
| 1698 |
_ [40]byte |
| 1699 |
} |
| 1700 |
|
| 1701 |
type PerfEventLinkInfo struct { |
| 1702 |
_ structs.HostLayout |
| 1703 |
Type LinkType |
| 1704 |
Id LinkID |
| 1705 |
ProgId uint32 |
| 1706 |
_ [4]byte |
| 1707 |
PerfEventType PerfEventType |
| 1708 |
} |
| 1709 |
|
| 1710 |
type RawTracepointLinkInfo struct { |
| 1711 |
_ structs.HostLayout |
| 1712 |
Type LinkType |
| 1713 |
Id LinkID |
| 1714 |
ProgId uint32 |
| 1715 |
_ [4]byte |
| 1716 |
TpName TypedPointer[uint8] |
| 1717 |
TpNameLen uint32 |
| 1718 |
_ [4]byte |
| 1719 |
Cookie uint64 |
| 1720 |
_ [24]byte |
| 1721 |
} |
| 1722 |
|
| 1723 |
type TcxLinkInfo struct { |
| 1724 |
_ structs.HostLayout |
| 1725 |
Type LinkType |
| 1726 |
Id LinkID |
| 1727 |
ProgId uint32 |
| 1728 |
_ [4]byte |
| 1729 |
Ifindex uint32 |
| 1730 |
AttachType AttachType |
| 1731 |
_ [40]byte |
| 1732 |
} |
| 1733 |
|
| 1734 |
type TracepointLinkInfo struct { |
| 1735 |
_ structs.HostLayout |
| 1736 |
Type LinkType |
| 1737 |
Id LinkID |
| 1738 |
ProgId uint32 |
| 1739 |
_ [4]byte |
| 1740 |
PerfEventType PerfEventType |
| 1741 |
_ [4]byte |
| 1742 |
TpName TypedPointer[uint8] |
| 1743 |
NameLen uint32 |
| 1744 |
_ [4]byte |
| 1745 |
Cookie uint64 |
| 1746 |
_ [16]byte |
| 1747 |
} |
| 1748 |
|
| 1749 |
type TracingLinkInfo struct { |
| 1750 |
_ structs.HostLayout |
| 1751 |
Type LinkType |
| 1752 |
Id LinkID |
| 1753 |
ProgId uint32 |
| 1754 |
_ [4]byte |
| 1755 |
AttachType AttachType |
| 1756 |
TargetObjId uint32 |
| 1757 |
TargetBtfId TypeID |
| 1758 |
_ [4]byte |
| 1759 |
Cookie uint64 |
| 1760 |
_ [24]byte |
| 1761 |
} |
| 1762 |
|
| 1763 |
type UprobeLinkInfo struct { |
| 1764 |
_ structs.HostLayout |
| 1765 |
Type LinkType |
| 1766 |
Id LinkID |
| 1767 |
ProgId uint32 |
| 1768 |
_ [4]byte |
| 1769 |
PerfEventType PerfEventType |
| 1770 |
_ [4]byte |
| 1771 |
FileName TypedPointer[uint8] |
| 1772 |
NameLen uint32 |
| 1773 |
Offset uint32 |
| 1774 |
Cookie uint64 |
| 1775 |
RefCtrOffset uint64 |
| 1776 |
_ [8]byte |
| 1777 |
} |
| 1778 |
|
| 1779 |
type UprobeMultiLinkInfo struct { |
| 1780 |
_ structs.HostLayout |
| 1781 |
Type LinkType |
| 1782 |
Id LinkID |
| 1783 |
ProgId uint32 |
| 1784 |
_ [4]byte |
| 1785 |
Path TypedPointer[uint8] |
| 1786 |
Offsets TypedPointer[uint64] |
| 1787 |
RefCtrOffsets TypedPointer[uint64] |
| 1788 |
Cookies TypedPointer[uint64] |
| 1789 |
PathSize uint32 |
| 1790 |
Count uint32 |
| 1791 |
Flags uint32 |
| 1792 |
Pid uint32 |
| 1793 |
} |
| 1794 |
|
| 1795 |
type XDPLinkInfo struct { |
| 1796 |
_ structs.HostLayout |
| 1797 |
Type LinkType |
| 1798 |
Id LinkID |
| 1799 |
ProgId uint32 |
| 1800 |
_ [4]byte |
| 1801 |
Ifindex uint32 |
| 1802 |
_ [44]byte |
| 1803 |
} |