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 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