1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* internal file - do not include directly */
5 BPF_PROG_TYPE(BPF_PROG_TYPE_SOCKET_FILTER
, sk_filter
,
6 struct __sk_buff
, struct sk_buff
)
7 BPF_PROG_TYPE(BPF_PROG_TYPE_SCHED_CLS
, tc_cls_act
,
8 struct __sk_buff
, struct sk_buff
)
9 BPF_PROG_TYPE(BPF_PROG_TYPE_SCHED_ACT
, tc_cls_act
,
10 struct __sk_buff
, struct sk_buff
)
11 BPF_PROG_TYPE(BPF_PROG_TYPE_XDP
, xdp
,
12 struct xdp_md
, struct xdp_buff
)
13 #ifdef CONFIG_CGROUP_BPF
14 BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SKB
, cg_skb
,
15 struct __sk_buff
, struct sk_buff
)
16 BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCK
, cg_sock
,
17 struct bpf_sock
, struct sock
)
18 BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCK_ADDR
, cg_sock_addr
,
19 struct bpf_sock_addr
, struct bpf_sock_addr_kern
)
21 BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_IN
, lwt_in
,
22 struct __sk_buff
, struct sk_buff
)
23 BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_OUT
, lwt_out
,
24 struct __sk_buff
, struct sk_buff
)
25 BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_XMIT
, lwt_xmit
,
26 struct __sk_buff
, struct sk_buff
)
27 BPF_PROG_TYPE(BPF_PROG_TYPE_LWT_SEG6LOCAL
, lwt_seg6local
,
28 struct __sk_buff
, struct sk_buff
)
29 BPF_PROG_TYPE(BPF_PROG_TYPE_SOCK_OPS
, sock_ops
,
30 struct bpf_sock_ops
, struct bpf_sock_ops_kern
)
31 BPF_PROG_TYPE(BPF_PROG_TYPE_SK_SKB
, sk_skb
,
32 struct __sk_buff
, struct sk_buff
)
33 BPF_PROG_TYPE(BPF_PROG_TYPE_SK_MSG
, sk_msg
,
34 struct sk_msg_md
, struct sk_msg
)
35 BPF_PROG_TYPE(BPF_PROG_TYPE_FLOW_DISSECTOR
, flow_dissector
,
36 struct __sk_buff
, struct bpf_flow_dissector
)
38 #ifdef CONFIG_BPF_EVENTS
39 BPF_PROG_TYPE(BPF_PROG_TYPE_KPROBE
, kprobe
,
40 bpf_user_pt_regs_t
, struct pt_regs
)
41 BPF_PROG_TYPE(BPF_PROG_TYPE_TRACEPOINT
, tracepoint
,
43 BPF_PROG_TYPE(BPF_PROG_TYPE_PERF_EVENT
, perf_event
,
44 struct bpf_perf_event_data
, struct bpf_perf_event_data_kern
)
45 BPF_PROG_TYPE(BPF_PROG_TYPE_RAW_TRACEPOINT
, raw_tracepoint
,
46 struct bpf_raw_tracepoint_args
, u64
)
47 BPF_PROG_TYPE(BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE
, raw_tracepoint_writable
,
48 struct bpf_raw_tracepoint_args
, u64
)
49 BPF_PROG_TYPE(BPF_PROG_TYPE_TRACING
, tracing
,
52 #ifdef CONFIG_CGROUP_BPF
53 BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_DEVICE
, cg_dev
,
54 struct bpf_cgroup_dev_ctx
, struct bpf_cgroup_dev_ctx
)
55 BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SYSCTL
, cg_sysctl
,
56 struct bpf_sysctl
, struct bpf_sysctl_kern
)
57 BPF_PROG_TYPE(BPF_PROG_TYPE_CGROUP_SOCKOPT
, cg_sockopt
,
58 struct bpf_sockopt
, struct bpf_sockopt_kern
)
60 #ifdef CONFIG_BPF_LIRC_MODE2
61 BPF_PROG_TYPE(BPF_PROG_TYPE_LIRC_MODE2
, lirc_mode2
,
65 BPF_PROG_TYPE(BPF_PROG_TYPE_SK_REUSEPORT
, sk_reuseport
,
66 struct sk_reuseport_md
, struct sk_reuseport_kern
)
67 BPF_PROG_TYPE(BPF_PROG_TYPE_SK_LOOKUP
, sk_lookup
,
68 struct bpf_sk_lookup
, struct bpf_sk_lookup_kern
)
70 #if defined(CONFIG_BPF_JIT)
71 BPF_PROG_TYPE(BPF_PROG_TYPE_STRUCT_OPS
, bpf_struct_ops
,
73 BPF_PROG_TYPE(BPF_PROG_TYPE_EXT
, bpf_extension
,
76 BPF_PROG_TYPE(BPF_PROG_TYPE_LSM
, lsm
,
78 #endif /* CONFIG_BPF_LSM */
80 BPF_PROG_TYPE(BPF_PROG_TYPE_SYSCALL
, bpf_syscall
,
82 #ifdef CONFIG_NETFILTER_BPF_LINK
83 BPF_PROG_TYPE(BPF_PROG_TYPE_NETFILTER
, netfilter
,
84 struct bpf_nf_ctx
, struct bpf_nf_ctx
)
87 BPF_MAP_TYPE(BPF_MAP_TYPE_ARRAY
, array_map_ops
)
88 BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_ARRAY
, percpu_array_map_ops
)
89 BPF_MAP_TYPE(BPF_MAP_TYPE_PROG_ARRAY
, prog_array_map_ops
)
90 BPF_MAP_TYPE(BPF_MAP_TYPE_PERF_EVENT_ARRAY
, perf_event_array_map_ops
)
92 BPF_MAP_TYPE(BPF_MAP_TYPE_CGROUP_ARRAY
, cgroup_array_map_ops
)
93 BPF_MAP_TYPE(BPF_MAP_TYPE_CGRP_STORAGE
, cgrp_storage_map_ops
)
95 #ifdef CONFIG_CGROUP_BPF
96 BPF_MAP_TYPE(BPF_MAP_TYPE_CGROUP_STORAGE
, cgroup_storage_map_ops
)
97 BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE
, cgroup_storage_map_ops
)
99 BPF_MAP_TYPE(BPF_MAP_TYPE_HASH
, htab_map_ops
)
100 BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_HASH
, htab_percpu_map_ops
)
101 BPF_MAP_TYPE(BPF_MAP_TYPE_LRU_HASH
, htab_lru_map_ops
)
102 BPF_MAP_TYPE(BPF_MAP_TYPE_LRU_PERCPU_HASH
, htab_lru_percpu_map_ops
)
103 BPF_MAP_TYPE(BPF_MAP_TYPE_LPM_TRIE
, trie_map_ops
)
104 #ifdef CONFIG_PERF_EVENTS
105 BPF_MAP_TYPE(BPF_MAP_TYPE_STACK_TRACE
, stack_trace_map_ops
)
107 BPF_MAP_TYPE(BPF_MAP_TYPE_ARRAY_OF_MAPS
, array_of_maps_map_ops
)
108 BPF_MAP_TYPE(BPF_MAP_TYPE_HASH_OF_MAPS
, htab_of_maps_map_ops
)
109 #ifdef CONFIG_BPF_LSM
110 BPF_MAP_TYPE(BPF_MAP_TYPE_INODE_STORAGE
, inode_storage_map_ops
)
112 BPF_MAP_TYPE(BPF_MAP_TYPE_TASK_STORAGE
, task_storage_map_ops
)
114 BPF_MAP_TYPE(BPF_MAP_TYPE_DEVMAP
, dev_map_ops
)
115 BPF_MAP_TYPE(BPF_MAP_TYPE_DEVMAP_HASH
, dev_map_hash_ops
)
116 BPF_MAP_TYPE(BPF_MAP_TYPE_SK_STORAGE
, sk_storage_map_ops
)
117 BPF_MAP_TYPE(BPF_MAP_TYPE_CPUMAP
, cpu_map_ops
)
118 #if defined(CONFIG_XDP_SOCKETS)
119 BPF_MAP_TYPE(BPF_MAP_TYPE_XSKMAP
, xsk_map_ops
)
122 BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKMAP
, sock_map_ops
)
123 BPF_MAP_TYPE(BPF_MAP_TYPE_SOCKHASH
, sock_hash_ops
)
124 BPF_MAP_TYPE(BPF_MAP_TYPE_REUSEPORT_SOCKARRAY
, reuseport_array_ops
)
127 BPF_MAP_TYPE(BPF_MAP_TYPE_QUEUE
, queue_map_ops
)
128 BPF_MAP_TYPE(BPF_MAP_TYPE_STACK
, stack_map_ops
)
129 #if defined(CONFIG_BPF_JIT)
130 BPF_MAP_TYPE(BPF_MAP_TYPE_STRUCT_OPS
, bpf_struct_ops_map_ops
)
132 BPF_MAP_TYPE(BPF_MAP_TYPE_RINGBUF
, ringbuf_map_ops
)
133 BPF_MAP_TYPE(BPF_MAP_TYPE_BLOOM_FILTER
, bloom_filter_map_ops
)
134 BPF_MAP_TYPE(BPF_MAP_TYPE_USER_RINGBUF
, user_ringbuf_map_ops
)
135 BPF_MAP_TYPE(BPF_MAP_TYPE_ARENA
, arena_map_ops
)
137 BPF_LINK_TYPE(BPF_LINK_TYPE_RAW_TRACEPOINT
, raw_tracepoint
)
138 BPF_LINK_TYPE(BPF_LINK_TYPE_TRACING
, tracing
)
139 #ifdef CONFIG_CGROUP_BPF
140 BPF_LINK_TYPE(BPF_LINK_TYPE_CGROUP
, cgroup
)
142 BPF_LINK_TYPE(BPF_LINK_TYPE_ITER
, iter
)
144 BPF_LINK_TYPE(BPF_LINK_TYPE_NETNS
, netns
)
145 BPF_LINK_TYPE(BPF_LINK_TYPE_XDP
, xdp
)
146 BPF_LINK_TYPE(BPF_LINK_TYPE_NETFILTER
, netfilter
)
147 BPF_LINK_TYPE(BPF_LINK_TYPE_TCX
, tcx
)
148 BPF_LINK_TYPE(BPF_LINK_TYPE_NETKIT
, netkit
)
149 BPF_LINK_TYPE(BPF_LINK_TYPE_SOCKMAP
, sockmap
)
151 #ifdef CONFIG_PERF_EVENTS
152 BPF_LINK_TYPE(BPF_LINK_TYPE_PERF_EVENT
, perf
)
154 BPF_LINK_TYPE(BPF_LINK_TYPE_KPROBE_MULTI
, kprobe_multi
)
155 BPF_LINK_TYPE(BPF_LINK_TYPE_STRUCT_OPS
, struct_ops
)
156 BPF_LINK_TYPE(BPF_LINK_TYPE_UPROBE_MULTI
, uprobe_multi
)