diff options
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index d516f00c8e0..4fff432aead 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -8,9 +8,6 @@ | |||
8 | 8 | ||
9 | #include <linux/ip_vs.h> /* definitions shared with userland */ | 9 | #include <linux/ip_vs.h> /* definitions shared with userland */ |
10 | 10 | ||
11 | /* old ipvsadm versions still include this file directly */ | ||
12 | #ifdef __KERNEL__ | ||
13 | |||
14 | #include <asm/types.h> /* for __uXX types */ | 11 | #include <asm/types.h> /* for __uXX types */ |
15 | 12 | ||
16 | #include <linux/sysctl.h> /* for ctl_path */ | 13 | #include <linux/sysctl.h> /* for ctl_path */ |
@@ -668,9 +665,7 @@ struct ip_vs_dest { | |||
668 | struct dst_entry *dst_cache; /* destination cache entry */ | 665 | struct dst_entry *dst_cache; /* destination cache entry */ |
669 | u32 dst_rtos; /* RT_TOS(tos) for dst */ | 666 | u32 dst_rtos; /* RT_TOS(tos) for dst */ |
670 | u32 dst_cookie; | 667 | u32 dst_cookie; |
671 | #ifdef CONFIG_IP_VS_IPV6 | 668 | union nf_inet_addr dst_saddr; |
672 | struct in6_addr dst_saddr; | ||
673 | #endif | ||
674 | 669 | ||
675 | /* for virtual service */ | 670 | /* for virtual service */ |
676 | struct ip_vs_service *svc; /* service it belongs to */ | 671 | struct ip_vs_service *svc; /* service it belongs to */ |
@@ -791,6 +786,7 @@ struct ip_vs_app { | |||
791 | /* IPVS in network namespace */ | 786 | /* IPVS in network namespace */ |
792 | struct netns_ipvs { | 787 | struct netns_ipvs { |
793 | int gen; /* Generation */ | 788 | int gen; /* Generation */ |
789 | int enable; /* enable like nf_hooks do */ | ||
794 | /* | 790 | /* |
795 | * Hash table: for real service lookups | 791 | * Hash table: for real service lookups |
796 | */ | 792 | */ |
@@ -1089,6 +1085,22 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) | |||
1089 | atomic_inc(&ctl_cp->n_control); | 1085 | atomic_inc(&ctl_cp->n_control); |
1090 | } | 1086 | } |
1091 | 1087 | ||
1088 | /* | ||
1089 | * IPVS netns init & cleanup functions | ||
1090 | */ | ||
1091 | extern int __ip_vs_estimator_init(struct net *net); | ||
1092 | extern int __ip_vs_control_init(struct net *net); | ||
1093 | extern int __ip_vs_protocol_init(struct net *net); | ||
1094 | extern int __ip_vs_app_init(struct net *net); | ||
1095 | extern int __ip_vs_conn_init(struct net *net); | ||
1096 | extern int __ip_vs_sync_init(struct net *net); | ||
1097 | extern void __ip_vs_conn_cleanup(struct net *net); | ||
1098 | extern void __ip_vs_app_cleanup(struct net *net); | ||
1099 | extern void __ip_vs_protocol_cleanup(struct net *net); | ||
1100 | extern void __ip_vs_control_cleanup(struct net *net); | ||
1101 | extern void __ip_vs_estimator_cleanup(struct net *net); | ||
1102 | extern void __ip_vs_sync_cleanup(struct net *net); | ||
1103 | extern void __ip_vs_service_cleanup(struct net *net); | ||
1092 | 1104 | ||
1093 | /* | 1105 | /* |
1094 | * IPVS application functions | 1106 | * IPVS application functions |
@@ -1239,7 +1251,8 @@ extern int ip_vs_tunnel_xmit | |||
1239 | extern int ip_vs_dr_xmit | 1251 | extern int ip_vs_dr_xmit |
1240 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); | 1252 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); |
1241 | extern int ip_vs_icmp_xmit | 1253 | extern int ip_vs_icmp_xmit |
1242 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, int offset); | 1254 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, |
1255 | int offset, unsigned int hooknum); | ||
1243 | extern void ip_vs_dst_reset(struct ip_vs_dest *dest); | 1256 | extern void ip_vs_dst_reset(struct ip_vs_dest *dest); |
1244 | 1257 | ||
1245 | #ifdef CONFIG_IP_VS_IPV6 | 1258 | #ifdef CONFIG_IP_VS_IPV6 |
@@ -1253,7 +1266,7 @@ extern int ip_vs_dr_xmit_v6 | |||
1253 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); | 1266 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp); |
1254 | extern int ip_vs_icmp_xmit_v6 | 1267 | extern int ip_vs_icmp_xmit_v6 |
1255 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, | 1268 | (struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, |
1256 | int offset); | 1269 | int offset, unsigned int hooknum); |
1257 | #endif | 1270 | #endif |
1258 | 1271 | ||
1259 | #ifdef CONFIG_SYSCTL | 1272 | #ifdef CONFIG_SYSCTL |
@@ -1415,6 +1428,4 @@ ip_vs_dest_conn_overhead(struct ip_vs_dest *dest) | |||
1415 | atomic_read(&dest->inactconns); | 1428 | atomic_read(&dest->inactconns); |
1416 | } | 1429 | } |
1417 | 1430 | ||
1418 | #endif /* __KERNEL__ */ | ||
1419 | |||
1420 | #endif /* _NET_IP_VS_H */ | 1431 | #endif /* _NET_IP_VS_H */ |