#include <linux/tcp.h>
#include <linux/random.h>
#include <linux/siphash.h>
#include <linux/kernel.h>
#include <net/secure_seq.h>
#include <net/ipv6.h>
#include <net/tcp.h>
#define COOKIEBITS …
#define COOKIEMASK …
static siphash_aligned_key_t syncookie6_secret[2];
static __u16 const msstab[] = …;
static u32 cookie_hash(const struct in6_addr *saddr,
const struct in6_addr *daddr,
__be16 sport, __be16 dport, u32 count, int c)
{ … }
static __u32 secure_tcp_syn_cookie(const struct in6_addr *saddr,
const struct in6_addr *daddr,
__be16 sport, __be16 dport, __u32 sseq,
__u32 data)
{ … }
static __u32 check_tcp_syn_cookie(__u32 cookie, const struct in6_addr *saddr,
const struct in6_addr *daddr, __be16 sport,
__be16 dport, __u32 sseq)
{ … }
u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
const struct tcphdr *th, __u16 *mssp)
{ … }
EXPORT_SYMBOL_GPL(…);
__u32 cookie_v6_init_sequence(const struct sk_buff *skb, __u16 *mssp)
{ … }
int __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct request_sock *cookie_tcp_check(struct net *net, struct sock *sk,
struct sk_buff *skb)
{ … }
struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
{ … }