1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */
3 
4 #include <linux/types.h>
5 #include <linux/bpf.h>
6 #include <bpf/bpf_helpers.h>
7 #include "bpf_tracing_net.h"
8 
9 struct bpf_fib_lookup fib_params = {};
10 int fib_lookup_ret = 0;
11 int lookup_flags = 0;
12 
13 SEC("tc")
fib_lookup(struct __sk_buff * skb)14 int 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 
22 char _license[] SEC("license") = "GPL";
23