Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ip_vs_ctl.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/capability.h>
#include <linux/fs.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <linux/workqueue.h>
#include <linux/swap.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>
#include <linux/mutex.h>
#include <net/net_namespace.h>
#include <linux/nsproxy.h>
#include <net/ip.h>
#include <net/route.h>
#include <net/sock.h>
#include <net/genetlink.h>
#include <asm/uaccess.h>
#include <net/ip_vs.h>

Go to the source code of this file.

Macros

#define KMSG_COMPONENT   "IPVS"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 
#define IP_VS_SVC_TAB_BITS   8
 
#define IP_VS_SVC_TAB_SIZE   (1 << IP_VS_SVC_TAB_BITS)
 
#define IP_VS_SVC_TAB_MASK   (IP_VS_SVC_TAB_SIZE - 1)
 
#define IP_VS_SHOW_STATS_COUNTER(c)   dst->c = src->ustats.c - src->ustats0.c
 
#define IP_VS_ZERO_STATS_COUNTER(c)   stats->ustats0.c = stats->ustats.c
 
#define SET_CMDID(cmd)   (cmd - IP_VS_BASE_CTL)
 
#define SERVICE_ARG_LEN   (sizeof(struct ip_vs_service_user))
 
#define SVCDEST_ARG_LEN
 
#define TIMEOUT_ARG_LEN   (sizeof(struct ip_vs_timeout_user))
 
#define DAEMON_ARG_LEN   (sizeof(struct ip_vs_daemon_user))
 
#define MAX_ARG_LEN   SVCDEST_ARG_LEN
 
#define GET_CMDID(cmd)   (cmd - IP_VS_BASE_CTL)
 
#define GET_INFO_ARG_LEN   (sizeof(struct ip_vs_getinfo))
 
#define GET_SERVICES_ARG_LEN   (sizeof(struct ip_vs_get_services))
 
#define GET_SERVICE_ARG_LEN   (sizeof(struct ip_vs_service_entry))
 
#define GET_DESTS_ARG_LEN   (sizeof(struct ip_vs_get_dests))
 
#define GET_TIMEOUT_ARG_LEN   (sizeof(struct ip_vs_timeout_user))
 
#define GET_DAEMON_ARG_LEN   (sizeof(struct ip_vs_daemon_user) * 2)
 

Functions

int ip_vs_use_count_inc (void)
 
void ip_vs_use_count_dec (void)
 
struct ip_vs_serviceip_vs_service_get (struct net *net, int af, __u32 fwmark, __u16 protocol, const union nf_inet_addr *vaddr, __be16 vport)
 
struct ip_vs_destip_vs_lookup_real_service (struct net *net, int af, __u16 protocol, const union nf_inet_addr *daddr, __be16 dport)
 
struct ip_vs_destip_vs_find_dest (struct net *net, int af, const union nf_inet_addr *daddr, __be16 dport, const union nf_inet_addr *vaddr, __be16 vport, __u16 protocol, __u32 fwmark, __u32 flags)
 
void ip_vs_service_net_cleanup (struct net *net)
 
int __net_init ip_vs_control_net_init (struct net *net)
 
void __net_exit ip_vs_control_net_cleanup (struct net *net)
 
int __init ip_vs_register_nl_ioctl (void)
 
void ip_vs_unregister_nl_ioctl (void)
 
int __init ip_vs_control_init (void)
 
void ip_vs_control_cleanup (void)
 

Macro Definition Documentation

#define DAEMON_ARG_LEN   (sizeof(struct ip_vs_daemon_user))

Definition at line 2280 of file ip_vs_ctl.c.

#define GET_CMDID (   cmd)    (cmd - IP_VS_BASE_CTL)

Definition at line 2607 of file ip_vs_ctl.c.

#define GET_DAEMON_ARG_LEN   (sizeof(struct ip_vs_daemon_user) * 2)

Definition at line 2613 of file ip_vs_ctl.c.

#define GET_DESTS_ARG_LEN   (sizeof(struct ip_vs_get_dests))

Definition at line 2611 of file ip_vs_ctl.c.

#define GET_INFO_ARG_LEN   (sizeof(struct ip_vs_getinfo))

Definition at line 2608 of file ip_vs_ctl.c.

#define GET_SERVICE_ARG_LEN   (sizeof(struct ip_vs_service_entry))

Definition at line 2610 of file ip_vs_ctl.c.

#define GET_SERVICES_ARG_LEN   (sizeof(struct ip_vs_get_services))

Definition at line 2609 of file ip_vs_ctl.c.

#define GET_TIMEOUT_ARG_LEN   (sizeof(struct ip_vs_timeout_user))

Definition at line 2612 of file ip_vs_ctl.c.

#define IP_VS_SHOW_STATS_COUNTER (   c)    dst->c = src->ustats.c - src->ustats0.c
#define IP_VS_SVC_TAB_BITS   8

Definition at line 255 of file ip_vs_ctl.c.

#define IP_VS_SVC_TAB_MASK   (IP_VS_SVC_TAB_SIZE - 1)

Definition at line 257 of file ip_vs_ctl.c.

#define IP_VS_SVC_TAB_SIZE   (1 << IP_VS_SVC_TAB_BITS)

Definition at line 256 of file ip_vs_ctl.c.

#define IP_VS_ZERO_STATS_COUNTER (   c)    stats->ustats0.c = stats->ustats.c
#define KMSG_COMPONENT   "IPVS"

Definition at line 21 of file ip_vs_ctl.c.

#define MAX_ARG_LEN   SVCDEST_ARG_LEN

Definition at line 2281 of file ip_vs_ctl.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 22 of file ip_vs_ctl.c.

#define SERVICE_ARG_LEN   (sizeof(struct ip_vs_service_user))

Definition at line 2276 of file ip_vs_ctl.c.

#define SET_CMDID (   cmd)    (cmd - IP_VS_BASE_CTL)

Definition at line 2275 of file ip_vs_ctl.c.

#define SVCDEST_ARG_LEN
Value:

Definition at line 2277 of file ip_vs_ctl.c.

#define TIMEOUT_ARG_LEN   (sizeof(struct ip_vs_timeout_user))

Definition at line 2279 of file ip_vs_ctl.c.

Function Documentation

void ip_vs_control_cleanup ( void  )

Definition at line 3880 of file ip_vs_ctl.c.

int __init ip_vs_control_init ( void  )

Definition at line 3856 of file ip_vs_ctl.c.

void __net_exit ip_vs_control_net_cleanup ( struct net net)

Definition at line 3814 of file ip_vs_ctl.c.

int __net_init ip_vs_control_net_init ( struct net net)

Definition at line 3777 of file ip_vs_ctl.c.

struct ip_vs_dest* ip_vs_find_dest ( struct net net,
int  af,
const union nf_inet_addr daddr,
__be16  dport,
const union nf_inet_addr vaddr,
__be16  vport,
__u16  protocol,
__u32  fwmark,
__u32  flags 
)
read

Definition at line 617 of file ip_vs_ctl.c.

struct ip_vs_dest* ip_vs_lookup_real_service ( struct net net,
int  af,
__u16  protocol,
const union nf_inet_addr daddr,
__be16  dport 
)
read

Definition at line 552 of file ip_vs_ctl.c.

int __init ip_vs_register_nl_ioctl ( void  )

Definition at line 3827 of file ip_vs_ctl.c.

struct ip_vs_service* ip_vs_service_get ( struct net net,
int  af,
__u32  fwmark,
__u16  protocol,
const union nf_inet_addr vaddr,
__be16  vport 
)
read

Definition at line 409 of file ip_vs_ctl.c.

void ip_vs_service_net_cleanup ( struct net net)

Definition at line 1488 of file ip_vs_ctl.c.

void ip_vs_unregister_nl_ioctl ( void  )

Definition at line 3850 of file ip_vs_ctl.c.

void ip_vs_use_count_dec ( void  )

Definition at line 246 of file ip_vs_ctl.c.

int ip_vs_use_count_inc ( void  )

Definition at line 240 of file ip_vs_ctl.c.