| 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 |
|
| 9 |
struct 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 |
|
| 16 |
extern int register_nf_conntrack_bpf(void); |
| 17 |
extern void cleanup_nf_conntrack_bpf(void); |
| 18 |
|
| 19 |
#else |
| 20 |
|
| 21 |
static inline int register_nf_conntrack_bpf(void) |
| 22 |
{ |
| 23 |
return 0; |
| 24 |
} |
| 25 |
|
| 26 |
static 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 |
|
| 35 |
extern int register_nf_nat_bpf(void); |
| 36 |
|
| 37 |
#else |
| 38 |
|
| 39 |
static inline int register_nf_nat_bpf(void) |
| 40 |
{ |
| 41 |
return 0; |
| 42 |
} |
| 43 |
|
| 44 |
#endif |
| 45 |
|
| 46 |
#endif /* _NF_CONNTRACK_BPF_H */ |