Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ip_vs_conn.c File Reference
#include <linux/interrupt.h>
#include <linux/in.h>
#include <linux/net.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/proc_fs.h>
#include <linux/slab.h>
#include <linux/seq_file.h>
#include <linux/jhash.h>
#include <linux/random.h>
#include <net/net_namespace.h>
#include <net/ip_vs.h>

Go to the source code of this file.

Data Structures

struct  ip_vs_aligned_lock
 

Macros

#define KMSG_COMPONENT   "IPVS"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 
#define CONFIG_IP_VS_TAB_BITS   12
 
#define CT_LOCKARRAY_BITS   5
 
#define CT_LOCKARRAY_SIZE   (1<<CT_LOCKARRAY_BITS)
 
#define CT_LOCKARRAY_MASK   (CT_LOCKARRAY_SIZE-1)
 

Functions

 module_param_named (conn_tab_bits, ip_vs_conn_tab_bits, int, 0444)
 
 MODULE_PARM_DESC (conn_tab_bits,"Set connections' hash size")
 
struct ip_vs_aligned_lock __attribute__ ((__aligned__(SMP_CACHE_BYTES)))
 
struct ip_vs_connip_vs_conn_in_get (const struct ip_vs_conn_param *p)
 
struct ip_vs_connip_vs_conn_in_get_proto (int af, const struct sk_buff *skb, const struct ip_vs_iphdr *iph, unsigned int proto_off, int inverse)
 
 EXPORT_SYMBOL_GPL (ip_vs_conn_in_get_proto)
 
struct ip_vs_connip_vs_ct_in_get (const struct ip_vs_conn_param *p)
 
struct ip_vs_connip_vs_conn_out_get (const struct ip_vs_conn_param *p)
 
struct ip_vs_connip_vs_conn_out_get_proto (int af, const struct sk_buff *skb, const struct ip_vs_iphdr *iph, unsigned int proto_off, int inverse)
 
 EXPORT_SYMBOL_GPL (ip_vs_conn_out_get_proto)
 
void ip_vs_conn_put (struct ip_vs_conn *cp)
 
void ip_vs_conn_fill_cport (struct ip_vs_conn *cp, __be16 cport)
 
struct ip_vs_destip_vs_try_bind_dest (struct ip_vs_conn *cp)
 
int ip_vs_check_template (struct ip_vs_conn *ct)
 
void ip_vs_conn_expire_now (struct ip_vs_conn *cp)
 
struct ip_vs_connip_vs_conn_new (const struct ip_vs_conn_param *p, const union nf_inet_addr *daddr, __be16 dport, unsigned int flags, struct ip_vs_dest *dest, __u32 fwmark)
 
void ip_vs_random_dropentry (struct net *net)
 
int __net_init ip_vs_conn_net_init (struct net *net)
 
void __net_exit ip_vs_conn_net_cleanup (struct net *net)
 
int __init ip_vs_conn_init (void)
 
void ip_vs_conn_cleanup (void)
 

Variables

int ip_vs_conn_tab_size __read_mostly
 
rwlock_t l
 

Macro Definition Documentation

#define CONFIG_IP_VS_TAB_BITS   12

Definition at line 45 of file ip_vs_conn.c.

#define CT_LOCKARRAY_BITS   5

Definition at line 76 of file ip_vs_conn.c.

#define CT_LOCKARRAY_MASK   (CT_LOCKARRAY_SIZE-1)

Definition at line 78 of file ip_vs_conn.c.

#define CT_LOCKARRAY_SIZE   (1<<CT_LOCKARRAY_BITS)

Definition at line 77 of file ip_vs_conn.c.

#define KMSG_COMPONENT   "IPVS"

Definition at line 25 of file ip_vs_conn.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 26 of file ip_vs_conn.c.

Function Documentation

EXPORT_SYMBOL_GPL ( ip_vs_conn_in_get_proto  )
EXPORT_SYMBOL_GPL ( ip_vs_conn_out_get_proto  )
int ip_vs_check_template ( struct ip_vs_conn ct)

Definition at line 728 of file ip_vs_conn.c.

void ip_vs_conn_cleanup ( void  )

Definition at line 1355 of file ip_vs_conn.c.

void ip_vs_conn_expire_now ( struct ip_vs_conn cp)

Definition at line 848 of file ip_vs_conn.c.

void ip_vs_conn_fill_cport ( struct ip_vs_conn cp,
__be16  cport 
)

Definition at line 463 of file ip_vs_conn.c.

struct ip_vs_conn* ip_vs_conn_in_get ( const struct ip_vs_conn_param p)
read

Definition at line 288 of file ip_vs_conn.c.

struct ip_vs_conn* ip_vs_conn_in_get_proto ( int  af,
const struct sk_buff skb,
const struct ip_vs_iphdr iph,
unsigned int  proto_off,
int  inverse 
)
read

Definition at line 331 of file ip_vs_conn.c.

int __init ip_vs_conn_init ( void  )

Definition at line 1311 of file ip_vs_conn.c.

void __net_exit ip_vs_conn_net_cleanup ( struct net net)

Definition at line 1303 of file ip_vs_conn.c.

int __net_init ip_vs_conn_net_init ( struct net net)

Definition at line 1292 of file ip_vs_conn.c.

struct ip_vs_conn* ip_vs_conn_new ( const struct ip_vs_conn_param p,
const union nf_inet_addr daddr,
__be16  dport,
unsigned int  flags,
struct ip_vs_dest dest,
__u32  fwmark 
)
read

Definition at line 859 of file ip_vs_conn.c.

struct ip_vs_conn* ip_vs_conn_out_get ( const struct ip_vs_conn_param p)
read

Definition at line 395 of file ip_vs_conn.c.

struct ip_vs_conn* ip_vs_conn_out_get_proto ( int  af,
const struct sk_buff skb,
const struct ip_vs_iphdr iph,
unsigned int  proto_off,
int  inverse 
)
read

Definition at line 434 of file ip_vs_conn.c.

void ip_vs_conn_put ( struct ip_vs_conn cp)

Definition at line 450 of file ip_vs_conn.c.

struct ip_vs_conn* ip_vs_ct_in_get ( const struct ip_vs_conn_param p)
read

Definition at line 345 of file ip_vs_conn.c.

void ip_vs_random_dropentry ( struct net net)

Definition at line 1197 of file ip_vs_conn.c.

struct ip_vs_dest* ip_vs_try_bind_dest ( struct ip_vs_conn cp)
read

Definition at line 615 of file ip_vs_conn.c.

module_param_named ( conn_tab_bits  ,
ip_vs_conn_tab_bits  ,
int  ,
0444   
)
MODULE_PARM_DESC ( conn_tab_bits  ,
"Set connections' hash size  
)

Variable Documentation

unsigned int ip_vs_conn_rnd __read_mostly

Definition at line 56 of file ip_vs_conn.c.

Definition at line 84 of file ip_vs_conn.c.