1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * IPv6 IOAM implementation
6 * Justin Iurman <justin.iurman@uliege.be>
12 #include <linux/net.h>
13 #include <linux/ipv6.h>
14 #include <linux/ioam6.h>
15 #include <linux/ioam6_genl.h>
16 #include <linux/rhashtable-types.h>
18 struct ioam6_namespace {
19 struct rhash_head head;
22 struct ioam6_schema __rcu *schema;
30 struct rhash_head head;
33 struct ioam6_namespace __rcu *ns;
42 struct ioam6_pernet_data {
44 struct rhashtable namespaces;
45 struct rhashtable schemas;
48 static inline struct ioam6_pernet_data *ioam6_pernet(struct net *net)
50 #if IS_ENABLED(CONFIG_IPV6)
51 return net->ipv6.ioam6_data;
57 struct ioam6_namespace *ioam6_namespace(struct net *net, __be16 id);
58 void ioam6_fill_trace_data(struct sk_buff *skb,
59 struct ioam6_namespace *ns,
60 struct ioam6_trace_hdr *trace,
64 void ioam6_exit(void);
66 int ioam6_iptunnel_init(void);
67 void ioam6_iptunnel_exit(void);
69 void ioam6_event(enum ioam6_event_type type, struct net *net, gfp_t gfp,
70 void *opt, unsigned int opt_len);
72 #endif /* _NET_IOAM6_H */