The helper is used in tracing programs to cast a socket pointer to a udp6_sock pointer. The return value could be NULL if the casting is illegal.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -3279,6 +3279,12 @@ union bpf_attr { · 3278 unmodified lines | ||
| 3279 | 3279 | * Dynamically cast a *sk* pointer to a *tcp_request_sock* pointer. |
| 3280 | 3280 | * Return |
| 3281 | 3281 | * *sk* if casting is valid, or NULL otherwise. |
| 3282 | + * | |
| 3283 | + * struct udp6_sock *bpf_skc_to_udp6_sock(void *sk) | |
| 3284 | + * Description | |
| 3285 | + * Dynamically cast a *sk* pointer to a *udp6_sock* pointer. | |
| 3286 | + * Return | |
| 3287 | + * *sk* if casting is valid, or NULL otherwise. | |
| 3282 | 3288 | */ |
| 3283 | 3289 | #define __BPF_FUNC_MAPPER(FN) \ |
| 3284 | 3290 | FN(unspec), \ |
| @@ -3420,7 +3426,8 @@ union bpf_attr { · 135 unmodified lines | ||
| 3420 | 3426 | FN(skc_to_tcp6_sock), \ |
| 3421 | 3427 | FN(skc_to_tcp_sock), \ |
| 3422 | 3428 | FN(skc_to_tcp_timewait_sock), \ |
| 3423 | − FN(skc_to_tcp_request_sock), | |
| 3429 | + FN(skc_to_tcp_request_sock), \ | |
| 3430 | + FN(skc_to_udp6_sock), | |
| 3424 | 3431 | |
| 3425 | 3432 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 3426 | 3433 | * function eBPF program intends to call |