linux/include/net/dst_metadata.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __NET_DST_METADATA_H
#define __NET_DST_METADATA_H

#include <linux/skbuff.h>
#include <net/ip_tunnels.h>
#include <net/macsec.h>
#include <net/dst.h>

enum metadata_type {};

struct hw_port_info {};

struct macsec_info {};

struct xfrm_md_info {};

struct metadata_dst {};

static inline struct metadata_dst *skb_metadata_dst(const struct sk_buff *skb)
{}

static inline struct ip_tunnel_info *
skb_tunnel_info(const struct sk_buff *skb)
{}

static inline struct xfrm_md_info *lwt_xfrm_info(struct lwtunnel_state *lwt)
{}

static inline struct xfrm_md_info *skb_xfrm_md_info(const struct sk_buff *skb)
{}

static inline bool skb_valid_dst(const struct sk_buff *skb)
{}

static inline int skb_metadata_dst_cmp(const struct sk_buff *skb_a,
				       const struct sk_buff *skb_b)
{}

void metadata_dst_free(struct metadata_dst *);
struct metadata_dst *metadata_dst_alloc(u8 optslen, enum metadata_type type,
					gfp_t flags);
void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst);
struct metadata_dst __percpu *
metadata_dst_alloc_percpu(u8 optslen, enum metadata_type type, gfp_t flags);

static inline struct metadata_dst *tun_rx_dst(int md_size)
{}

static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb)
{}

static inline struct ip_tunnel_info *skb_tunnel_info_unclone(struct sk_buff *skb)
{}

static inline struct metadata_dst *__ip_tun_set_dst(__be32 saddr,
						    __be32 daddr,
						    __u8 tos, __u8 ttl,
						    __be16 tp_dst,
						    const unsigned long *flags,
						    __be64 tunnel_id,
						    int md_size)
{}

static inline struct metadata_dst *ip_tun_rx_dst(struct sk_buff *skb,
						 const unsigned long *flags,
						 __be64 tunnel_id,
						 int md_size)
{}

static inline struct metadata_dst *__ipv6_tun_set_dst(const struct in6_addr *saddr,
						      const struct in6_addr *daddr,
						      __u8 tos, __u8 ttl,
						      __be16 tp_dst,
						      __be32 label,
						      const unsigned long *flags,
						      __be64 tunnel_id,
						      int md_size)
{}

static inline struct metadata_dst *ipv6_tun_rx_dst(struct sk_buff *skb,
						   const unsigned long *flags,
						   __be64 tunnel_id,
						   int md_size)
{}
#endif /* __NET_DST_METADATA_H */