Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
ip_vs_xmit.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/tcp.h>
#include <net/ip.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/icmp.h>
#include <net/route.h>
#include <net/ipv6.h>
#include <net/ip6_route.h>
#include <net/addrconf.h>
#include <linux/icmpv6.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.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_XMIT_TUNNEL(skb, cp)
 
#define IP_VS_XMIT_NAT(pf, skb, cp, local)
 
#define IP_VS_XMIT(pf, skb, cp, local)
 

Enumerations

enum  {
  IP_VS_RT_MODE_LOCAL = 1, IP_VS_RT_MODE_NON_LOCAL = 2, IP_VS_RT_MODE_RDR = 4, IP_VS_RT_MODE_CONNECT = 8,
  IP_VS_RT_MODE_KNOWN_NH = 16
}
 

Functions

void ip_vs_dst_reset (struct ip_vs_dest *dest)
 
int ip_vs_null_xmit (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp)
 
int ip_vs_bypass_xmit (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp)
 
int ip_vs_nat_xmit (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp)
 
int ip_vs_tunnel_xmit (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp)
 
int ip_vs_dr_xmit (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp)
 
int ip_vs_icmp_xmit (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, int offset, unsigned int hooknum)
 

Macro Definition Documentation

#define IP_VS_XMIT (   pf,
  skb,
  cp,
  local 
)
Value:
do { \
(skb)->ipvs_property = 1; \
if (likely(!((cp)->flags & IP_VS_CONN_F_NFCT))) \
ip_vs_notrack(skb); \
if (local) \
return NF_ACCEPT; \
skb_forward_csum(skb); \
NF_HOOK(pf, NF_INET_LOCAL_OUT, (skb), NULL, \
skb_dst(skb)->dev, dst_output); \
} while (0)

Definition at line 412 of file ip_vs_xmit.c.

#define IP_VS_XMIT_NAT (   pf,
  skb,
  cp,
  local 
)
Value:
do { \
(skb)->ipvs_property = 1; \
if (likely(!((cp)->flags & IP_VS_CONN_F_NFCT))) \
ip_vs_notrack(skb); \
if (local) \
return NF_ACCEPT; \
skb_forward_csum(skb); \
NF_HOOK(pf, NF_INET_LOCAL_OUT, (skb), NULL, \
skb_dst(skb)->dev, dst_output); \
} while (0)

Definition at line 398 of file ip_vs_xmit.c.

#define IP_VS_XMIT_TUNNEL (   skb,
  cp 
)
Value:
({ \
int __ret = NF_ACCEPT; \
\
(skb)->ipvs_property = 1; \
if (__ret == NF_ACCEPT) { \
nf_reset(skb); \
skb_forward_csum(skb); \
} \
__ret; \
})

Definition at line 384 of file ip_vs_xmit.c.

#define KMSG_COMPONENT   "IPVS"

Definition at line 26 of file ip_vs_xmit.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 27 of file ip_vs_xmit.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
IP_VS_RT_MODE_LOCAL 
IP_VS_RT_MODE_NON_LOCAL 
IP_VS_RT_MODE_RDR 
IP_VS_RT_MODE_CONNECT 
IP_VS_RT_MODE_KNOWN_NH 

Definition at line 46 of file ip_vs_xmit.c.

Function Documentation

int ip_vs_bypass_xmit ( struct sk_buff skb,
struct ip_vs_conn cp,
struct ip_vs_protocol pp 
)

Definition at line 443 of file ip_vs_xmit.c.

int ip_vs_dr_xmit ( struct sk_buff skb,
struct ip_vs_conn cp,
struct ip_vs_protocol pp 
)

Definition at line 1055 of file ip_vs_xmit.c.

void ip_vs_dst_reset ( struct ip_vs_dest dest)

Definition at line 374 of file ip_vs_xmit.c.

int ip_vs_icmp_xmit ( struct sk_buff skb,
struct ip_vs_conn cp,
struct ip_vs_protocol pp,
int  offset,
unsigned int  hooknum 
)

Definition at line 1185 of file ip_vs_xmit.c.

int ip_vs_nat_xmit ( struct sk_buff skb,
struct ip_vs_conn cp,
struct ip_vs_protocol pp 
)

Definition at line 561 of file ip_vs_xmit.c.

int ip_vs_null_xmit ( struct sk_buff skb,
struct ip_vs_conn cp,
struct ip_vs_protocol pp 
)

Definition at line 429 of file ip_vs_xmit.c.

int ip_vs_tunnel_xmit ( struct sk_buff skb,
struct ip_vs_conn cp,
struct ip_vs_protocol pp 
)

Definition at line 814 of file ip_vs_xmit.c.