diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-28 17:29:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:03:04 -0400 |
commit | 014d730d56b559eacb11e91969a1f41c3feb36f9 (patch) | |
tree | d8c3a08108f435879b4d436c7b3c4a726d31c6af /include | |
parent | d4263cde88d3fee2af0aac8836bb785cdb6b06c0 (diff) |
[IPVS]: ipvs annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ip_vs.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 3b57b159b653..49c717e3b040 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -100,22 +100,22 @@ | |||
100 | struct ip_vs_service_user { | 100 | struct ip_vs_service_user { |
101 | /* virtual service addresses */ | 101 | /* virtual service addresses */ |
102 | u_int16_t protocol; | 102 | u_int16_t protocol; |
103 | u_int32_t addr; /* virtual ip address */ | 103 | __be32 addr; /* virtual ip address */ |
104 | u_int16_t port; | 104 | __be16 port; |
105 | u_int32_t fwmark; /* firwall mark of service */ | 105 | u_int32_t fwmark; /* firwall mark of service */ |
106 | 106 | ||
107 | /* virtual service options */ | 107 | /* virtual service options */ |
108 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; | 108 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; |
109 | unsigned flags; /* virtual service flags */ | 109 | unsigned flags; /* virtual service flags */ |
110 | unsigned timeout; /* persistent timeout in sec */ | 110 | unsigned timeout; /* persistent timeout in sec */ |
111 | u_int32_t netmask; /* persistent netmask */ | 111 | __be32 netmask; /* persistent netmask */ |
112 | }; | 112 | }; |
113 | 113 | ||
114 | 114 | ||
115 | struct ip_vs_dest_user { | 115 | struct ip_vs_dest_user { |
116 | /* destination server address */ | 116 | /* destination server address */ |
117 | u_int32_t addr; | 117 | __be32 addr; |
118 | u_int16_t port; | 118 | __be16 port; |
119 | 119 | ||
120 | /* real server options */ | 120 | /* real server options */ |
121 | unsigned conn_flags; /* connection flags */ | 121 | unsigned conn_flags; /* connection flags */ |
@@ -163,15 +163,15 @@ struct ip_vs_getinfo { | |||
163 | struct ip_vs_service_entry { | 163 | struct ip_vs_service_entry { |
164 | /* which service: user fills in these */ | 164 | /* which service: user fills in these */ |
165 | u_int16_t protocol; | 165 | u_int16_t protocol; |
166 | u_int32_t addr; /* virtual address */ | 166 | __be32 addr; /* virtual address */ |
167 | u_int16_t port; | 167 | __be16 port; |
168 | u_int32_t fwmark; /* firwall mark of service */ | 168 | u_int32_t fwmark; /* firwall mark of service */ |
169 | 169 | ||
170 | /* service options */ | 170 | /* service options */ |
171 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; | 171 | char sched_name[IP_VS_SCHEDNAME_MAXLEN]; |
172 | unsigned flags; /* virtual service flags */ | 172 | unsigned flags; /* virtual service flags */ |
173 | unsigned timeout; /* persistent timeout */ | 173 | unsigned timeout; /* persistent timeout */ |
174 | u_int32_t netmask; /* persistent netmask */ | 174 | __be32 netmask; /* persistent netmask */ |
175 | 175 | ||
176 | /* number of real servers */ | 176 | /* number of real servers */ |
177 | unsigned int num_dests; | 177 | unsigned int num_dests; |
@@ -182,8 +182,8 @@ struct ip_vs_service_entry { | |||
182 | 182 | ||
183 | 183 | ||
184 | struct ip_vs_dest_entry { | 184 | struct ip_vs_dest_entry { |
185 | u_int32_t addr; /* destination address */ | 185 | __be32 addr; /* destination address */ |
186 | u_int16_t port; | 186 | __be16 port; |
187 | unsigned conn_flags; /* connection flags */ | 187 | unsigned conn_flags; /* connection flags */ |
188 | int weight; /* destination weight */ | 188 | int weight; /* destination weight */ |
189 | 189 | ||
@@ -203,8 +203,8 @@ struct ip_vs_dest_entry { | |||
203 | struct ip_vs_get_dests { | 203 | struct ip_vs_get_dests { |
204 | /* which service: user fills in these */ | 204 | /* which service: user fills in these */ |
205 | u_int16_t protocol; | 205 | u_int16_t protocol; |
206 | u_int32_t addr; /* virtual address */ | 206 | __be32 addr; /* virtual address */ |
207 | u_int16_t port; | 207 | __be16 port; |
208 | u_int32_t fwmark; /* firwall mark of service */ | 208 | u_int32_t fwmark; /* firwall mark of service */ |
209 | 209 | ||
210 | /* number of real servers */ | 210 | /* number of real servers */ |
@@ -502,12 +502,12 @@ struct ip_vs_conn { | |||
502 | struct list_head c_list; /* hashed list heads */ | 502 | struct list_head c_list; /* hashed list heads */ |
503 | 503 | ||
504 | /* Protocol, addresses and port numbers */ | 504 | /* Protocol, addresses and port numbers */ |
505 | __u32 caddr; /* client address */ | 505 | __be32 caddr; /* client address */ |
506 | __u32 vaddr; /* virtual address */ | 506 | __be32 vaddr; /* virtual address */ |
507 | __u32 daddr; /* destination address */ | 507 | __be32 daddr; /* destination address */ |
508 | __u16 cport; | 508 | __be16 cport; |
509 | __u16 vport; | 509 | __be16 vport; |
510 | __u16 dport; | 510 | __be16 dport; |
511 | __u16 protocol; /* Which protocol (TCP/UDP) */ | 511 | __u16 protocol; /* Which protocol (TCP/UDP) */ |
512 | 512 | ||
513 | /* counter and timer */ | 513 | /* counter and timer */ |
@@ -554,12 +554,12 @@ struct ip_vs_service { | |||
554 | atomic_t usecnt; /* use counter */ | 554 | atomic_t usecnt; /* use counter */ |
555 | 555 | ||
556 | __u16 protocol; /* which protocol (TCP/UDP) */ | 556 | __u16 protocol; /* which protocol (TCP/UDP) */ |
557 | __u32 addr; /* IP address for virtual service */ | 557 | __be32 addr; /* IP address for virtual service */ |
558 | __u16 port; /* port number for the service */ | 558 | __be16 port; /* port number for the service */ |
559 | __u32 fwmark; /* firewall mark of the service */ | 559 | __u32 fwmark; /* firewall mark of the service */ |
560 | unsigned flags; /* service status flags */ | 560 | unsigned flags; /* service status flags */ |
561 | unsigned timeout; /* persistent timeout in ticks */ | 561 | unsigned timeout; /* persistent timeout in ticks */ |
562 | __u32 netmask; /* grouping granularity */ | 562 | __be32 netmask; /* grouping granularity */ |
563 | 563 | ||
564 | struct list_head destinations; /* real server d-linked list */ | 564 | struct list_head destinations; /* real server d-linked list */ |
565 | __u32 num_dests; /* number of servers */ | 565 | __u32 num_dests; /* number of servers */ |
@@ -581,8 +581,8 @@ struct ip_vs_dest { | |||
581 | struct list_head n_list; /* for the dests in the service */ | 581 | struct list_head n_list; /* for the dests in the service */ |
582 | struct list_head d_list; /* for table with all the dests */ | 582 | struct list_head d_list; /* for table with all the dests */ |
583 | 583 | ||
584 | __u32 addr; /* IP address of the server */ | 584 | __be32 addr; /* IP address of the server */ |
585 | __u16 port; /* port number of the server */ | 585 | __be16 port; /* port number of the server */ |
586 | volatile unsigned flags; /* dest status flags */ | 586 | volatile unsigned flags; /* dest status flags */ |
587 | atomic_t conn_flags; /* flags to copy to conn */ | 587 | atomic_t conn_flags; /* flags to copy to conn */ |
588 | atomic_t weight; /* server weight */ | 588 | atomic_t weight; /* server weight */ |
@@ -605,8 +605,8 @@ struct ip_vs_dest { | |||
605 | /* for virtual service */ | 605 | /* for virtual service */ |
606 | struct ip_vs_service *svc; /* service it belongs to */ | 606 | struct ip_vs_service *svc; /* service it belongs to */ |
607 | __u16 protocol; /* which protocol (TCP/UDP) */ | 607 | __u16 protocol; /* which protocol (TCP/UDP) */ |
608 | __u32 vaddr; /* virtual IP address */ | 608 | __be32 vaddr; /* virtual IP address */ |
609 | __u16 vport; /* virtual port number */ | 609 | __be16 vport; /* virtual port number */ |
610 | __u32 vfwmark; /* firewall mark of service */ | 610 | __u32 vfwmark; /* firewall mark of service */ |
611 | }; | 611 | }; |
612 | 612 | ||
@@ -648,7 +648,7 @@ struct ip_vs_app | |||
648 | /* members for application incarnations */ | 648 | /* members for application incarnations */ |
649 | struct list_head p_list; /* member in proto app list */ | 649 | struct list_head p_list; /* member in proto app list */ |
650 | struct ip_vs_app *app; /* its real application */ | 650 | struct ip_vs_app *app; /* its real application */ |
651 | __u16 port; /* port number in net order */ | 651 | __be16 port; /* port number in net order */ |
652 | atomic_t usecnt; /* usage counter */ | 652 | atomic_t usecnt; /* usage counter */ |
653 | 653 | ||
654 | /* output hook: return false if can't linearize. diff set for TCP. */ | 654 | /* output hook: return false if can't linearize. diff set for TCP. */ |
@@ -740,11 +740,11 @@ enum { | |||
740 | }; | 740 | }; |
741 | 741 | ||
742 | extern struct ip_vs_conn *ip_vs_conn_in_get | 742 | extern struct ip_vs_conn *ip_vs_conn_in_get |
743 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); | 743 | (int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port); |
744 | extern struct ip_vs_conn *ip_vs_ct_in_get | 744 | extern struct ip_vs_conn *ip_vs_ct_in_get |
745 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); | 745 | (int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port); |
746 | extern struct ip_vs_conn *ip_vs_conn_out_get | 746 | extern struct ip_vs_conn *ip_vs_conn_out_get |
747 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port); | 747 | (int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port); |
748 | 748 | ||
749 | /* put back the conn without restarting its timer */ | 749 | /* put back the conn without restarting its timer */ |
750 | static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) | 750 | static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) |
@@ -752,11 +752,11 @@ static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) | |||
752 | atomic_dec(&cp->refcnt); | 752 | atomic_dec(&cp->refcnt); |
753 | } | 753 | } |
754 | extern void ip_vs_conn_put(struct ip_vs_conn *cp); | 754 | extern void ip_vs_conn_put(struct ip_vs_conn *cp); |
755 | extern void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __u16 cport); | 755 | extern void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __be16 cport); |
756 | 756 | ||
757 | extern struct ip_vs_conn * | 757 | extern struct ip_vs_conn * |
758 | ip_vs_conn_new(int proto, __u32 caddr, __u16 cport, __u32 vaddr, __u16 vport, | 758 | ip_vs_conn_new(int proto, __be32 caddr, __be16 cport, __be32 vaddr, __be16 vport, |
759 | __u32 daddr, __u16 dport, unsigned flags, | 759 | __be32 daddr, __be16 dport, unsigned flags, |
760 | struct ip_vs_dest *dest); | 760 | struct ip_vs_dest *dest); |
761 | extern void ip_vs_conn_expire_now(struct ip_vs_conn *cp); | 761 | extern void ip_vs_conn_expire_now(struct ip_vs_conn *cp); |
762 | 762 | ||
@@ -887,7 +887,7 @@ extern int sysctl_ip_vs_nat_icmp_send; | |||
887 | extern struct ip_vs_stats ip_vs_stats; | 887 | extern struct ip_vs_stats ip_vs_stats; |
888 | 888 | ||
889 | extern struct ip_vs_service * | 889 | extern struct ip_vs_service * |
890 | ip_vs_service_get(__u32 fwmark, __u16 protocol, __u32 vaddr, __u16 vport); | 890 | ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport); |
891 | 891 | ||
892 | static inline void ip_vs_service_put(struct ip_vs_service *svc) | 892 | static inline void ip_vs_service_put(struct ip_vs_service *svc) |
893 | { | 893 | { |
@@ -895,7 +895,7 @@ static inline void ip_vs_service_put(struct ip_vs_service *svc) | |||
895 | } | 895 | } |
896 | 896 | ||
897 | extern struct ip_vs_dest * | 897 | extern struct ip_vs_dest * |
898 | ip_vs_lookup_real_service(__u16 protocol, __u32 daddr, __u16 dport); | 898 | ip_vs_lookup_real_service(__u16 protocol, __be32 daddr, __be16 dport); |
899 | extern int ip_vs_use_count_inc(void); | 899 | extern int ip_vs_use_count_inc(void); |
900 | extern void ip_vs_use_count_dec(void); | 900 | extern void ip_vs_use_count_dec(void); |
901 | extern int ip_vs_control_init(void); | 901 | extern int ip_vs_control_init(void); |