github.com/looshlee/beatles@v0.0.0-20220727174639-742810ab631c/bpf/probes/raw_sock_cookie.t (about)

     1  /* Tests for availability of kernel commits (4.19+):
     2   *
     3   * d692f1138a4b ("bpf: Support bpf_get_socket_cookie in more prog types")
     4   */
     5  	{
     6  		.emits		= "HAVE_GET_SOCK_COOKIE",
     7  		.type		= BPF_PROG_TYPE_CGROUP_SOCK_ADDR,
     8  		.attach_type	= BPF_CGROUP_INET4_CONNECT,
     9  		.insns		= {
    10  			BPF_EMIT_CALL(BPF_FUNC_get_socket_cookie),
    11  			BPF_MOV64_IMM(BPF_REG_0, 1),
    12  			BPF_EXIT_INSN(),
    13  		},
    14  		/* No warning required to the user. */
    15  	},