linux/include/linux/ipv6.h

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

#include <uapi/linux/ipv6.h>
#include <linux/cache.h>

#define ipv6_optlen(p)
#define ipv6_authlen(p)
/*
 * This structure contains configuration options per IPv6 link.
 */
struct ipv6_devconf {};

struct ipv6_params {};
extern struct ipv6_params ipv6_defaults;
#include <linux/tcp.h>
#include <linux/udp.h>

#include <net/inet_sock.h>

static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb)
{}

static inline struct ipv6hdr *inner_ipv6_hdr(const struct sk_buff *skb)
{}

static inline struct ipv6hdr *ipipv6_hdr(const struct sk_buff *skb)
{}

static inline unsigned int ipv6_transport_len(const struct sk_buff *skb)
{}

/* 
   This structure contains results of exthdrs parsing
   as offsets from skb->nh.
 */

struct inet6_skb_parm {};

#if defined(CONFIG_NET_L3_MASTER_DEV)
static inline bool ipv6_l3mdev_skb(__u16 flags)
{}
#else
static inline bool ipv6_l3mdev_skb(__u16 flags)
{
	return false;
}
#endif

#define IP6CB(skb)
#define IP6CBMTU(skb)

static inline int inet6_iif(const struct sk_buff *skb)
{}

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

/* can not be used in TCP layer after tcp_v6_fill_cb */
static inline int inet6_sdif(const struct sk_buff *skb)
{}

struct tcp6_request_sock {};

struct ipv6_mc_socklist;
struct ipv6_ac_socklist;
struct ipv6_fl_socklist;

struct inet6_cork {};

/* struct ipv6_pinfo - ipv6 private area */
struct ipv6_pinfo {};

/* We currently use available bits from inet_sk(sk)->inet_flags,
 * this could change in the future.
 */
#define inet6_test_bit(nr, sk)
#define inet6_set_bit(nr, sk)
#define inet6_clear_bit(nr, sk)
#define inet6_assign_bit(nr, sk, val)

/* WARNING: don't change the layout of the members in {raw,udp,tcp}6_sock! */
struct raw6_sock {};

struct udp6_sock {};

struct tcp6_sock {};

extern int inet6_sk_rebuild_header(struct sock *sk);

struct tcp6_timewait_sock {};

#if IS_ENABLED(CONFIG_IPV6)
bool ipv6_mod_enabled(void);

static inline struct ipv6_pinfo *inet6_sk(const struct sock *__sk)
{}

#define raw6_sk(ptr)

#define ipv6_only_sock(sk)
#define ipv6_sk_rxinfo(sk)

static inline const struct in6_addr *inet6_rcv_saddr(const struct sock *sk)
{}

static inline int inet_v6_ipv6only(const struct sock *sk)
{}
#else
#define ipv6_only_sock
#define ipv6_sk_rxinfo

static inline bool ipv6_mod_enabled(void)
{
	return false;
}

static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
{
	return NULL;
}

static inline struct raw6_sock *raw6_sk(const struct sock *sk)
{
	return NULL;
}

#define inet6_rcv_saddr
#define inet_v6_ipv6only
#endif /* IS_ENABLED(CONFIG_IPV6) */
#endif /* _IPV6_H */