linux/net/ipv6/seg6_iptunnel.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  SR-IPv6 implementation
 *
 *  Author:
 *  David Lebrun <[email protected]>
 */

#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/net.h>
#include <linux/module.h>
#include <net/ip.h>
#include <net/ip_tunnels.h>
#include <net/lwtunnel.h>
#include <net/netevent.h>
#include <net/netns/generic.h>
#include <net/ip6_fib.h>
#include <net/route.h>
#include <net/seg6.h>
#include <linux/seg6.h>
#include <linux/seg6_iptunnel.h>
#include <net/addrconf.h>
#include <net/ip6_route.h>
#include <net/dst_cache.h>
#ifdef CONFIG_IPV6_SEG6_HMAC
#include <net/seg6_hmac.h>
#endif
#include <linux/netfilter.h>

static size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo)
{}

struct seg6_lwt {};

static inline struct seg6_lwt *seg6_lwt_lwtunnel(struct lwtunnel_state *lwt)
{}

static inline struct seg6_iptunnel_encap *
seg6_encap_lwtunnel(struct lwtunnel_state *lwt)
{}

static const struct nla_policy seg6_iptunnel_policy[SEG6_IPTUNNEL_MAX + 1] =;

static int nla_put_srh(struct sk_buff *skb, int attrtype,
		       struct seg6_iptunnel_encap *tuninfo)
{}

static void set_tun_src(struct net *net, struct net_device *dev,
			struct in6_addr *daddr, struct in6_addr *saddr)
{}

/* Compute flowlabel for outer IPv6 header */
static __be32 seg6_make_flowlabel(struct net *net, struct sk_buff *skb,
				  struct ipv6hdr *inner_hdr)
{}

/* encapsulate an IPv6 packet within an outer IPv6 header with a given SRH */
int seg6_do_srh_encap(struct sk_buff *skb, struct ipv6_sr_hdr *osrh, int proto)
{}
EXPORT_SYMBOL_GPL();

/* encapsulate an IPv6 packet within an outer IPv6 header with reduced SRH */
static int seg6_do_srh_encap_red(struct sk_buff *skb,
				 struct ipv6_sr_hdr *osrh, int proto)
{}

/* insert an SRH within an IPv6 packet, just after the IPv6 header */
int seg6_do_srh_inline(struct sk_buff *skb, struct ipv6_sr_hdr *osrh)
{}
EXPORT_SYMBOL_GPL();

static int seg6_do_srh(struct sk_buff *skb)
{}

static int seg6_input_finish(struct net *net, struct sock *sk,
			     struct sk_buff *skb)
{}

static int seg6_input_core(struct net *net, struct sock *sk,
			   struct sk_buff *skb)
{}

static int seg6_input_nf(struct sk_buff *skb)
{}

static int seg6_input(struct sk_buff *skb)
{}

static int seg6_output_core(struct net *net, struct sock *sk,
			    struct sk_buff *skb)
{}

static int seg6_output_nf(struct net *net, struct sock *sk, struct sk_buff *skb)
{}

static int seg6_output(struct net *net, struct sock *sk, struct sk_buff *skb)
{}

static int seg6_build_state(struct net *net, struct nlattr *nla,
			    unsigned int family, const void *cfg,
			    struct lwtunnel_state **ts,
			    struct netlink_ext_ack *extack)
{}

static void seg6_destroy_state(struct lwtunnel_state *lwt)
{}

static int seg6_fill_encap_info(struct sk_buff *skb,
				struct lwtunnel_state *lwtstate)
{}

static int seg6_encap_nlsize(struct lwtunnel_state *lwtstate)
{}

static int seg6_encap_cmp(struct lwtunnel_state *a, struct lwtunnel_state *b)
{}

static const struct lwtunnel_encap_ops seg6_iptun_ops =;

int __init seg6_iptunnel_init(void)
{}

void seg6_iptunnel_exit(void)
{}