aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorHans Schillstrom <hans.schillstrom@ericsson.com>2011-01-03 08:44:46 -0500
committerSimon Horman <horms@verge.net.au>2011-01-12 20:30:27 -0500
commit252c64103237f1841088f0f29b4f084b1c774546 (patch)
tree81de130280300698260ca35fe4dde8a92fdebac5 /include/net/ip_vs.h
parentb6e885ddb903e681b7cbb4e68ad775154660e1f4 (diff)
IPVS: netns, prepare protocol
Add support for protocol data per name-space. in struct ip_vs_protocol, appcnt will be removed when all protos are modified for network name-space. This patch causes warnings of unused functions, they will be used when next patch will be applied. Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index d551e0d8fd9..88d4e40b538 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -352,6 +352,7 @@ struct iphdr;
352struct ip_vs_conn; 352struct ip_vs_conn;
353struct ip_vs_app; 353struct ip_vs_app;
354struct sk_buff; 354struct sk_buff;
355struct ip_vs_proto_data;
355 356
356struct ip_vs_protocol { 357struct ip_vs_protocol {
357 struct ip_vs_protocol *next; 358 struct ip_vs_protocol *next;
@@ -366,6 +367,10 @@ struct ip_vs_protocol {
366 367
367 void (*exit)(struct ip_vs_protocol *pp); 368 void (*exit)(struct ip_vs_protocol *pp);
368 369
370 void (*init_netns)(struct net *net, struct ip_vs_proto_data *pd);
371
372 void (*exit_netns)(struct net *net, struct ip_vs_proto_data *pd);
373
369 int (*conn_schedule)(int af, struct sk_buff *skb, 374 int (*conn_schedule)(int af, struct sk_buff *skb,
370 struct ip_vs_protocol *pp, 375 struct ip_vs_protocol *pp,
371 int *verdict, struct ip_vs_conn **cpp); 376 int *verdict, struct ip_vs_conn **cpp);
@@ -417,7 +422,20 @@ struct ip_vs_protocol {
417 int (*set_state_timeout)(struct ip_vs_protocol *pp, char *sname, int to); 422 int (*set_state_timeout)(struct ip_vs_protocol *pp, char *sname, int to);
418}; 423};
419 424
420extern struct ip_vs_protocol * ip_vs_proto_get(unsigned short proto); 425/*
426 * protocol data per netns
427 */
428struct ip_vs_proto_data {
429 struct ip_vs_proto_data *next;
430 struct ip_vs_protocol *pp;
431 int *timeout_table; /* protocol timeout table */
432 atomic_t appcnt; /* counter of proto app incs. */
433 struct tcp_states_t *tcp_state_table;
434};
435
436extern struct ip_vs_protocol *ip_vs_proto_get(unsigned short proto);
437extern struct ip_vs_proto_data *ip_vs_proto_data_get(struct net *net,
438 unsigned short proto);
421 439
422struct ip_vs_conn_param { 440struct ip_vs_conn_param {
423 const union nf_inet_addr *caddr; 441 const union nf_inet_addr *caddr;