1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef _NF_CONNTRACK_BPF_H 4#define _NF_CONNTRACK_BPF_H 5 6#include <linux/kconfig.h> 7#include <net/netfilter/nf_conntrack.h> 8 9struct nf_conn___init { 10 struct nf_conn ct; 11}; 12 13#if (IS_BUILTIN(CONFIG_NF_CONNTRACK) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) || \ 14 (IS_MODULE(CONFIG_NF_CONNTRACK) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES)) 15 16extern int register_nf_conntrack_bpf(void); 17extern void cleanup_nf_conntrack_bpf(void); 18 19#else 20 21static inline int register_nf_conntrack_bpf(void) 22{ 23 return 0; 24} 25 26static inline void cleanup_nf_conntrack_bpf(void) 27{ 28} 29 30#endif 31 32#if (IS_BUILTIN(CONFIG_NF_NAT) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) || \ 33 (IS_MODULE(CONFIG_NF_NAT) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES)) 34 35extern int register_nf_nat_bpf(void); 36 37#else 38 39static inline int register_nf_nat_bpf(void) 40{ 41 return 0; 42} 43 44#endif 45 46#endif /* _NF_CONNTRACK_BPF_H */ 47