brintos

brintos / linux-shallow public Read only

0
0
Text · 496 B · 7b5dd22 Raw
23 lines · c
1// SPDX-License-Identifier: GPL-2.02/* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */3 4#include <linux/types.h>5#include <linux/bpf.h>6#include <linux/pkt_cls.h>7#include <bpf/bpf_helpers.h>8 9struct bpf_fib_lookup fib_params = {};10int fib_lookup_ret = 0;11int lookup_flags = 0;12 13SEC("tc")14int fib_lookup(struct __sk_buff *skb)15{16	fib_lookup_ret = bpf_fib_lookup(skb, &fib_params, sizeof(fib_params),17					lookup_flags);18 19	return TC_ACT_SHOT;20}21 22char _license[] SEC("license") = "GPL";23