Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
syncookies.c File Reference
#include <linux/tcp.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/cryptohash.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <net/tcp.h>
#include <net/route.h>

Go to the source code of this file.

Macros

#define TSBITS   6
 
#define TSMASK   (((__u32)1 << TSBITS) - 1)
 
#define COOKIEBITS   24 /* Upper bits store count */
 
#define COOKIEMASK   (((__u32)1 << COOKIEBITS) - 1)
 
#define COUNTER_TRIES   4
 

Functions

 EXPORT_SYMBOL (syncookie_secret)
 
 __initcall (init_syncookies)
 
__u32 cookie_init_timestamp (struct request_sock *req)
 
__u32 cookie_v4_init_sequence (struct sock *sk, struct sk_buff *skb, __u16 *mssp)
 
bool cookie_check_timestamp (struct tcp_options_received *tcp_opt, bool *ecn_ok)
 
 EXPORT_SYMBOL (cookie_check_timestamp)
 
struct sockcookie_v4_check (struct sock *sk, struct sk_buff *skb, struct ip_options *opt)
 

Variables

int sysctl_tcp_syncookies
 
__u32 syncookie_secret [2][16-4+SHA_DIGEST_WORDS]
 

Macro Definition Documentation

#define COOKIEBITS   24 /* Upper bits store count */

Definition at line 38 of file syncookies.c.

#define COOKIEMASK   (((__u32)1 << COOKIEBITS) - 1)

Definition at line 39 of file syncookies.c.

#define COUNTER_TRIES   4

Definition at line 190 of file syncookies.c.

#define TSBITS   6

Definition at line 23 of file syncookies.c.

#define TSMASK   (((__u32)1 << TSBITS) - 1)

Definition at line 24 of file syncookies.c.

Function Documentation

__initcall ( init_syncookies  )
bool cookie_check_timestamp ( struct tcp_options_received tcp_opt,
bool ecn_ok 
)

Definition at line 235 of file syncookies.c.

__u32 cookie_init_timestamp ( struct request_sock req)

Definition at line 67 of file syncookies.c.

struct sock* cookie_v4_check ( struct sock sk,
struct sk_buff skb,
struct ip_options opt 
)
read

Definition at line 265 of file syncookies.c.

__u32 cookie_v4_init_sequence ( struct sock sk,
struct sk_buff skb,
__u16 mssp 
)

Definition at line 163 of file syncookies.c.

EXPORT_SYMBOL ( syncookie_secret  )
EXPORT_SYMBOL ( cookie_check_timestamp  )

Variable Documentation

__u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]

Definition at line 28 of file syncookies.c.

int sysctl_tcp_syncookies