api

file: /proc/sys/kernel/api
variable: kernel.api
Official reference

In its context, an instance of struct bpf_sk_lookup, BPF sk_lookup program receives information about the packet that triggered the socket lookup. Namely:

  • IP version (AF_INET or AF_INET6),
  • L4 protocol identifier (IPPROTO_TCP or IPPROTO_UDP),
  • source and destination IP address,
  • source and destination L4 port,
  • the socket that has been selected with bpf_sk_assign().

Refer to struct bpf_sk_lookup declaration in linux/bpf.h user API header, and bpf-helpers(7) <https://man7.org/linux/man-pages/man7/bpf-helpers.7.html> man-page section for bpf_sk_assign() for details.