BPF_CGROUP_INET_EGRESS
case BPF_CGROUP_INET_EGRESS:
case BPF_CGROUP_INET_EGRESS:
case BPF_CGROUP_INET_EGRESS:
case BPF_CGROUP_INET_EGRESS:
case BPF_CGROUP_INET_EGRESS:
if (env->prog->expected_attach_type == BPF_CGROUP_INET_EGRESS) {
BPF_CGROUP_INET_EGRESS,
case BPF_CGROUP_INET_EGRESS: return "egress";
case BPF_CGROUP_INET_EGRESS:
[BPF_CGROUP_INET_EGRESS] = "cgroup_inet_egress",
SEC_DEF("cgroup_skb/egress", CGROUP_SKB, BPF_CGROUP_INET_EGRESS, SEC_ATTACHABLE_OPT),
key.attach_type = BPF_CGROUP_INET_EGRESS;
key.attach_type = BPF_CGROUP_INET_EGRESS;
key.attach_type = BPF_CGROUP_INET_EGRESS;
key.attach_type = BPF_CGROUP_INET_EGRESS;
key.attach_type = BPF_CGROUP_INET_EGRESS;
BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_query(cg, BPF_CGROUP_INET_EGRESS, 0, &attach_flags,
if (CHECK(bpf_prog_attach(allow_prog[0], cg1, BPF_CGROUP_INET_EGRESS,
if (CHECK(!bpf_prog_attach(allow_prog[0], cg1, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_attach(allow_prog[1], cg1, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_attach(allow_prog[2], cg2, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_attach(allow_prog[3], cg3, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_attach(allow_prog[4], cg4, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_attach(allow_prog[5], cg5, BPF_CGROUP_INET_EGRESS, 0),
CHECK_FAIL(bpf_prog_query(cg5, BPF_CGROUP_INET_EGRESS,
CHECK_FAIL(bpf_prog_query(cg5, BPF_CGROUP_INET_EGRESS,
CHECK_FAIL(bpf_prog_query(cg5, BPF_CGROUP_INET_EGRESS,
CHECK_FAIL(bpf_prog_query(cg5, BPF_CGROUP_INET_EGRESS, 0, NULL,
if (CHECK(bpf_prog_detach2(-1, cg5, BPF_CGROUP_INET_EGRESS),
BPF_CGROUP_INET_EGRESS, &attach_opts),
BPF_CGROUP_INET_EGRESS, &attach_opts),
BPF_CGROUP_INET_EGRESS, &attach_opts),
BPF_CGROUP_INET_EGRESS, &attach_opts),
BPF_CGROUP_INET_EGRESS, &attach_opts),
BPF_CGROUP_INET_EGRESS, &attach_opts),
if (CHECK(!bpf_prog_detach2(0, cg3, BPF_CGROUP_INET_EGRESS),
if (CHECK(bpf_prog_detach2(allow_prog[3], cg3, BPF_CGROUP_INET_EGRESS),
if (CHECK(bpf_prog_detach2(-1, cg4, BPF_CGROUP_INET_EGRESS),
CHECK_FAIL(bpf_prog_query(cg5, BPF_CGROUP_INET_EGRESS,
CHECK_FAIL(bpf_prog_query(cg5, BPF_CGROUP_INET_EGRESS, 0, NULL,
if (CHECK(!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, 0),
if (CHECK(bpf_prog_detach(bar, BPF_CGROUP_INET_EGRESS),
if (CHECK(!bpf_prog_detach(foo, BPF_CGROUP_INET_EGRESS),
if (CHECK(bpf_prog_attach(allow_prog, foo, BPF_CGROUP_INET_EGRESS, 0),
if (CHECK(!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, 0),
if (CHECK(!bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS,
if (CHECK(!bpf_prog_attach(allow_prog, foo, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_attach(drop_prog, foo, BPF_CGROUP_INET_EGRESS, 0),
if (CHECK(bpf_prog_attach(drop_prog, foo, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_detach(bar, BPF_CGROUP_INET_EGRESS),
if (CHECK(bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS,
if (CHECK(bpf_prog_detach(foo, BPF_CGROUP_INET_EGRESS),
if (CHECK(bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS,
BPF_CGROUP_INET_EGRESS, BPF_F_ALLOW_MULTI);
err = bpf_prog_detach2(prog_fd, cgs[last_cg].fd, BPF_CGROUP_INET_EGRESS);
BPF_CGROUP_INET_EGRESS, 0);
err = bpf_prog_detach2(prog_fd, cgs[last_cg].fd, BPF_CGROUP_INET_EGRESS);
BPF_CGROUP_INET_EGRESS, 0);
bpf_prog_detach2(prog_fd, cgs[last_cg].fd, BPF_CGROUP_INET_EGRESS);
BPF_CGROUP_INET_EGRESS);
err = bpf_prog_query(cgs[0].fd, BPF_CGROUP_INET_EGRESS,
err = bpf_prog_query(cgs[last_cg].fd, BPF_CGROUP_INET_EGRESS,
err = bpf_prog_query(cgs[last_cg].fd, BPF_CGROUP_INET_EGRESS,
err = bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_INET_EGRESS,
err = bpf_prog_attach(prog_fd, cgroup, BPF_CGROUP_INET_EGRESS, 0);
bpf_prog_detach2(-1, cgroup, BPF_CGROUP_INET_EGRESS);
{0, BPF_PROG_TYPE_CGROUP_SKB, BPF_CGROUP_INET_EGRESS},
{0, BPF_CGROUP_INET_EGRESS},